multithread
Moderator: ickputzdirwech
multithread
Will there be multithread support for factorio in 1,2 or 10 years?
It's a bit annoying when the computer has enough performance left but the game has trouble to keep up. You can see that very easy when you try to join a (very) big map in multiplayer and the catching up bar goes in reverse.
It's a bit annoying when the computer has enough performance left but the game has trouble to keep up. You can see that very easy when you try to join a (very) big map in multiplayer and the catching up bar goes in reverse.
Re: multithread
Multithreading has been discussed extensively in this thread.
I especially found this post by Factorio developer Harkonnen on page 4 of the thread to be very interesting. In that post, he describes why the main bottleneck is not the actual CPU processing power, but rather memory bandwidth.
I especially found this post by Factorio developer Harkonnen on page 4 of the thread to be very interesting. In that post, he describes why the main bottleneck is not the actual CPU processing power, but rather memory bandwidth.
Re: multithread
As far as I can see it with my monitoring tools (CPU,RAM,GPU) there is no component that is being used more than 50% while running factorio.
If its memory bandwith then what can I upgrade on my PC to let factorio run better?
If its memory bandwith then what can I upgrade on my PC to let factorio run better?
Re: multithread
You could get DDR4 Ram with higher mhz. But it'd have to be compatible with your motherboard. Resulting in you having to upgrade your motherboard & CPU just to upgrade to insane ramNexarius wrote:As far as I can see it with my monitoring tools (CPU,RAM,GPU) there is no component that is being used more than 50% while running factorio.
If its memory bandwith then what can I upgrade on my PC to let factorio run better?
Re: multithread
Theoretically, I guess you could buy faster memory, with a higher clock speed and lower latency. But I doubt that this will give you any significant performance gains. Therefore, I would only recommend to upgrade your computer if it is very old. In that case, I would recommend upgrading CPU, Mainboard and Memory (and possibliy also the graphics card, if you want to use the new high-res graphics).Nexarius wrote:If its memory bandwith then what can I upgrade on my PC to let factorio run better?
In the post by Factorio developer Harkonnen, which I linked to in my previous post, he mentioned that the main issue is that with most common CPU architectures, all CPUs share the same memory bank. Therefore, using several CPUs (multithreading) only increases total calculation speed, but not memory bandwidth. For example, if one CPU has a memory bandwidth of 20GB/s, 4 CPUs will still only have a total memory bandwidth of 20GB/s and not 80GB/s. That is the main reason why Factorio does not benefit much from multithreading. But Factorio does already use multithreading in a few places.
For this reason, I guess there are only three things you can do to improve performance in Factorio:
- Upgrade your computer if it is very old.
- Design your base in such a way that it does it does not cause too much CPU load, for example by trying to limit the number of belts (preferably using underground belts) and also limiting the number of inserters and pipes.
- Wait for Factorio version 0.16, which will include further optimizations, especially belt optimizations, as described in Factorio Friday Facts #176.
Re: multithread
Thanks for the quick anwers.
Factorie wrote:You could get DDR4 Ram with higher mhz. But it'd have to be compatible with your motherboard. Resulting in you having to upgrade your motherboard & CPU just to upgrade to insane ram
So basically "only" upgrade all expensive parts? :OTekky wrote:In that case, I would recommend upgrading CPU, Mainboard and Memory (and possibliy also the graphics card, if you want to use the new high-res graphics).
- AileTheAlien
- Filter Inserter
- Posts: 326
- Joined: Sat Mar 11, 2017 4:30 pm
- Contact:
Re: multithread
You could try painting speed lines on the computer, but there's no guarantee that will make the computer go any faster. :)
Re: multithread
The reason it appears as though no component is using more than 50% is because Factorio (for the most part) runs on a single thread. So if you have a multicore processor (most modern processors have many cores) it will appear as though it isn't being maxed - when in fact one of those cores it's being pushed to the limit.Nexarius wrote:As far as I can see it with my monitoring tools (CPU,RAM,GPU) there is no component that is being used more than 50% while running factorio.
Re: multithread
In fact there is no real need to upgrade CPU, the real question is : choose a CPU that doesn't focus on multithreading. You don't need a 16 core cpu with low frequency, you'd prefer a 4 core with high frequency.
I have an old i7-2600k (4 cores, 8 threads) it runs wonderfully. I could find a "better" CPU for Factorio, but at what price ? Moreover, I have cooled it right, so it runs at 4.4 GHz, which is a nice upgrade to the stock 3.4.
I think running on a 6 year old CPU isn't exactly ruining myself on CPU. My GPU is an old GTX 670. The only thing I regreat about it is the fact it lacks VRAM for high res textures (only 2 GB), but it does the job. Again, I think I bought it like 4 or 5 years ago. Then again, that's not ruining oneself.
What is the size of your factory, and how have you built it if you feel limited by your hardware ?
I have an old i7-2600k (4 cores, 8 threads) it runs wonderfully. I could find a "better" CPU for Factorio, but at what price ? Moreover, I have cooled it right, so it runs at 4.4 GHz, which is a nice upgrade to the stock 3.4.
I think running on a 6 year old CPU isn't exactly ruining myself on CPU. My GPU is an old GTX 670. The only thing I regreat about it is the fact it lacks VRAM for high res textures (only 2 GB), but it does the job. Again, I think I bought it like 4 or 5 years ago. Then again, that's not ruining oneself.
What is the size of your factory, and how have you built it if you feel limited by your hardware ?
Koub - Please consider English is not my native language.
Re: multithread
I'm playing on a server with a 100h map and joining takes over 5mins or sometimes never because of all the catching up time and sometimes it goes in reverse.
Last edited by Nexarius on Sat Jun 10, 2017 6:11 pm, edited 1 time in total.
Re: multithread
Ideally you want a high frequency 4 core processor with memory as fast as possible.
You might find this interesting even though it is from very old version:
https://www.reddit.com/r/factorio/comme ... ed_fpsups/
You might find this interesting even though it is from very old version:
Test setup HW: CPU-Intel Core i7-6700K, RAM-Vengeance® LPX 16GB (2x8GB) DDR4 DRAM 3200MHz, GPU-nvidia GTX 980Ti
Test settings: Factorio version 0.12.32, factorio graphics setting, resolution 2560x1440
https://www.reddit.com/r/factorio/comme ... ed_fpsups/
Re: multithread
Interesting graph. Ram clock speed is pretty damn important in this game
Re: multithread
Yes, I also find the graph very interesting. Thanks for posting it.
According to the mentioned reddit thread, having a fast RAM CAS latency can also improve performance by 5-10%.
According to the mentioned reddit thread, having a fast RAM CAS latency can also improve performance by 5-10%.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: multithread
I think my DDR3 is 1600. It's hard to be sure since I recall having to tell my motherboard "No, that is NOT my RAM speed! Use this speed for it!"
it seems dumb spending extra money for higher speed RAM, a speed that your motherboard will support, and then it sets the clock speed way lower.
it seems dumb spending extra money for higher speed RAM, a speed that your motherboard will support, and then it sets the clock speed way lower.
Add Multi-CPU support for heavy lifting
I read somewhere, and I quote
When I play, I see 1 core (out of 16) is maxed, with hyperthreading turned off. The game lags severely when transitioning from belts to bots, yet less than 10% of the available CPU power is being used.
Since there are so many great mods for this game, and there is a trend towards building it better and bigger. It would be excellent if the heavy lifting could be distributed to more CPU cores/threads. Possibly, give an option for a player to set the number of cores for the game to use, but at least quadruple the current default of 1.Factorio currently only uses 1 core/thread for the main calculations (the heavy part). Some minor stuff is done on other threads.
When I play, I see 1 core (out of 16) is maxed, with hyperthreading turned off. The game lags severely when transitioning from belts to bots, yet less than 10% of the available CPU power is being used.
Re: multithread
You should read the 20-page-long, non-necro post on this topic with explanations from the developers: viewtopic.php?f=5&t=39893
Everything that can be offloaded has been, and the main thread cannot be effectively broken up further because it would break the deterministic model of the game engine. This is especially true for mod code which the devs do not control.
And there is no one I trust more than the Factorio devs to look for and implement new optimizations without us needing to ask
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: multithread
He didn't even read THIS thread, why would you try to help him? And that thread has already been linked before in this thread. And all the advice you gave has already been given.robot256 wrote: ↑Wed Apr 13, 2022 7:33 pmYou should read the 20-page-long, non-necro post on this topic with explanations from the developers: viewtopic.php?f=5&t=39893
donsch managed to necro with his first post. GJ
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Well how was I supposed to know? There's no post by a moderator saying that they merged the threads.
Not sure I believe you.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser