Game FPS at End game

Post all other topics which do not belong to any other category.
Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Game FPS at End game

Post by Malryn »

So I have reached a point where my base has gotten too large and my FPS has gotten to 10. I thought it was because of Mods I have been using but it appears not to the case.
Example: I have 27,000 active inserters running all the time. Those are mostly train drop off sorting, smelting, and circuit construction.
Is there any advice with optimizing my base to avoid major slow down in game performance?

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Game FPS at End game

Post by Koub »

You can replace belts by underground belts of the same type. It helps.
Koub - Please consider English is not my native language.

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

Koub wrote:You can replace belts by underground belts of the same type. It helps.
Thanks! So belts in numbers cause major performance drops? Would logistics robots do a better job performance than using a bus design?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Game FPS at End game

Post by Rseding91 »

If you keep building more eventually it slows. That's just how computers work - the more you ask them to do the longer it takes to do that :)
If you want to get ahold of me I'm almost always on Discord.

User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Re: Game FPS at End game

Post by Xterminator »

Malryn wrote:
Koub wrote:You can replace belts by underground belts of the same type. It helps.
Thanks! So belts in numbers cause major performance drops? Would logistics robots do a better job performance than using a bus design?
Yup, robots will help your performance compared to Belts. Belts cause quite a bit of performance drop when there are a lot of them because they have to constantly do collision checks and stuff. Bots on the other hand don't.

Few quick things though. I still wouldn't recommend using robots for super long distance transport of huge amounts of resources. And even though bots will impact performance less than Belts, they will still cause issues if you have massive numbers of them like in the many thousands. Below that though and it will definitely help to switch to bots wherever possible. :)
Image Image Image

User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: Game FPS at End game

Post by Afforess »

Xterminator wrote: Yup, robots will help your performance compared to Belts. Belts cause quite a bit of performance drop when there are a lot of them because they have to constantly do collision checks and stuff.
Fairly certain this is no longer true since 0.12. Items on belts are not entities, so there are no collision checks.

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

Rseding91 wrote:If you keep building more eventually it slows. That's just how computers work - the more you ask them to do the longer it takes to do that :)
Of course :). But the game engine never maxes out my resources on my PC. If my PC was maxing out in resources I would either upgrade my PC or overclock it. Correct me if I am wrong but is it the game engine not allowing to to just take all the resources available? I have read from others where they have run this game on a 5 year old PC and it performs just as well a brand new PC with all the latest and greatest. Their game starts to slow down without ever maxing out any resources.

Also, I am not trying to be negative with the game. I just pointing out behavior I am noticing. I absolutely LOVE this game. Since buying it on steam I am at 650 hours played and I dream of belts and inserters.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Game FPS at End game

Post by orzelek »

Malryn wrote:
Rseding91 wrote:If you keep building more eventually it slows. That's just how computers work - the more you ask them to do the longer it takes to do that :)
Of course :). But the game engine never maxes out my resources on my PC. If my PC was maxing out in resources I would either upgrade my PC or overclock it. Correct me if I am wrong but is it the game engine not allowing to to just take all the resources available? I have read from others where they have run this game on a 5 year old PC and it performs just as well a brand new PC with all the latest and greatest. Their game starts to slow down without ever maxing out any resources.

Also, I am not trying to be negative with the game. I just pointing out behavior I am noticing. I absolutely LOVE this game. Since buying it on steam I am at 650 hours played and I dream of belts and inserters.
Game engine is mainly limited by performance of single CPU core since thats how simulation is done.
So overclocking should give you a benefit and you shouldn't expect game to max out your resources - it will max out one core.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Game FPS at End game

Post by Koub »

Afforess wrote:
Xterminator wrote: Yup, robots will help your performance compared to Belts. Belts cause quite a bit of performance drop when there are a lot of them because they have to constantly do collision checks and stuff.
Fairly certain this is no longer true since 0.12. Items on belts are not entities, so there are no collision checks.
viewtopic.php?f=5&t=17782
This test was done with 0.12.17. I don't remember major changes in the core belt mechanics since then.
Koub - Please consider English is not my native language.

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

orzelek wrote:
Malryn wrote:
Rseding91 wrote:If you keep building more eventually it slows. That's just how computers work - the more you ask them to do the longer it takes to do that :)
Of course :). But the game engine never maxes out my resources on my PC. If my PC was maxing out in resources I would either upgrade my PC or overclock it. Correct me if I am wrong but is it the game engine not allowing to to just take all the resources available? I have read from others where they have run this game on a 5 year old PC and it performs just as well a brand new PC with all the latest and greatest. Their game starts to slow down without ever maxing out any resources.

Also, I am not trying to be negative with the game. I just pointing out behavior I am noticing. I absolutely LOVE this game. Since buying it on steam I am at 650 hours played and I dream of belts and inserters.
Game engine is mainly limited by performance of single CPU core since thats how simulation is done.
So overclocking should give you a benefit and you shouldn't expect game to max out your resources - it will max out one core.
I just triple checked Resource Monitor on Facotorio running at 10 fps and cores 0-7 on my PC and none are hitting 99% usage. When I changed my the PID's affinity to a specific core it is at 100%. If i gave it only two courses it used 80% of core 7 and about 40% of core 6. So I think the game is multithreading. Just read this post by a dev (viewtopic.php?f=5&t=4900&p=37918&hilit=Threads#p37918) about things and from what I got from this is that game updates is single thread but most everything else part of the using different cores. This makes sense in what I am seeing but I would still think I would see a single core at near 100% if the game is being limited by a resource limitation even if the game is operating as a single threading process.

againey
Inserter
Inserter
Posts: 31
Joined: Thu Jul 31, 2014 10:57 pm
Contact:

Re: Game FPS at End game

Post by againey »

Malryn wrote:I just triple checked Resource Monitor on Facotorio running at 10 fps and cores 0-7 on my PC and none are hitting 99% usage. When I changed my the PID's affinity to a specific core it is at 100%. If i gave it only two courses it used 80% of core 7 and about 40% of core 6. So I think the game is multithreading. Just read this post by a dev (viewtopic.php?f=5&t=4900&p=37918&hilit=Threads#p37918) about things and from what I got from this is that game updates is single thread but most everything else part of the using different cores. This makes sense in what I am seeing but I would still think I would see a single core at near 100% if the game is being limited by a resource limitation even if the game is operating as a single threading process.
Modern operating systems like to bounce a single process around different cores so that no single core experiences the bulk of the processing. This spreads out the heat generated on the physical chip, reducing stress on the chip, reducing likelihood of data errors and crashes (akin to what happens when someone overclocks their computer too far), and reducing the chip's need to defensively lower its clock speed in order to keep its temperature manageable.

So you'll often see a single-threaded program using 25% per core on a 4-core system. Since it is single-threaded, it can't run the program on multiple cores simultaneously, but it will run it on the first core for a few milliseconds, then on the second core for a few milliseconds, and so on. The utilization of the cores should still add up to 100%. Anything over 100% in this scenario could be small bits of multi-threaded capability from the program (such as handling network communications or audio processing), ineffectual attempts at multi-threading (it uses more than a single core's worth of processing, but all that extra work is wasted coordinating among the multiple threads), or other programs also running independently on those cores (I don't think setting affinity forces other processes off that core, just restricts that process to that core).

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

againey wrote:
Malryn wrote:I just triple checked Resource Monitor on Facotorio running at 10 fps and cores 0-7 on my PC and none are hitting 99% usage. When I changed my the PID's affinity to a specific core it is at 100%. If i gave it only two courses it used 80% of core 7 and about 40% of core 6. So I think the game is multithreading. Just read this post by a dev (viewtopic.php?f=5&t=4900&p=37918&hilit=Threads#p37918) about things and from what I got from this is that game updates is single thread but most everything else part of the using different cores. This makes sense in what I am seeing but I would still think I would see a single core at near 100% if the game is being limited by a resource limitation even if the game is operating as a single threading process.
Modern operating systems like to bounce a single process around different cores so that no single core experiences the bulk of the processing. This spreads out the heat generated on the physical chip, reducing stress on the chip, reducing likelihood of data errors and crashes (akin to what happens when someone overclocks their computer too far), and reducing the chip's need to defensively lower its clock speed in order to keep its temperature manageable.

So you'll often see a single-threaded program using 25% per core on a 4-core system. Since it is single-threaded, it can't run the program on multiple cores simultaneously, but it will run it on the first core for a few milliseconds, then on the second core for a few milliseconds, and so on. The utilization of the cores should still add up to 100%. Anything over 100% in this scenario could be small bits of multi-threaded capability from the program (such as handling network communications or audio processing), ineffectual attempts at multi-threading (it uses more than a single core's worth of processing, but all that extra work is wasted coordinating among the multiple threads), or other programs also running independently on those cores (I don't think setting affinity forces other processes off that core, just restricts that process to that core).
If it is jumping between cores it should still show a CPU spike at 100% in the core it was working at at that time if it was the CPU resource limit. What am I missing in this? Here is a screenshot of the cores with the game running with a Mega base at 10 fps.

I really should get this game running on a Linux box so I can do better troubleshooting -.-
Attachments
CPUclocking.PNG
CPUclocking.PNG (26.95 KiB) Viewed 6184 times

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Game FPS at End game

Post by prg »

The thread might get migrated around every few milliseconds while a pixel in that image spans maybe a whole second so the peaks get averaged out.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Game FPS at End game

Post by Frightning »

^That:

You won't see the spikes in taskmanager because they are too brief (read: few milliseconds). It will get averaged over the 'tick-rate' that task manager's graphs use. Hence the net load summing to 100%+ but no 1 core being pegged to max.

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

Well I guess I need to find some kind of data that shows this to be the case before I go out and upgrade my system but is there any way for me to have a high output factory without having this lag? Can I spread the factories out or anything? Like placing all smelting operations on the other side of the map, circuits in a corner some place else?

Killavirus
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Wed Apr 13, 2016 10:39 am
Contact:

Re: Game FPS at End game

Post by Killavirus »

Or goto suggestions ; WE WANT MULTITHREADING

Careful you don't get hit by chairs and bottles thrown by the devs !!!
Addiction Thy Name be Factorio, FACTORIO IS NOT A LIE.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Game FPS at End game

Post by Rseding91 »

Killavirus wrote:Or goto suggestions ; WE WANT MULTITHREADING

Careful you don't get hit by chairs and bottles thrown by the devs !!!
Got it! We'll spawn threads and have them eat 100% of the cpu so it looks like it's using all of the computer's processor.
If you want to get ahold of me I'm almost always on Discord.

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

Rseding91 wrote:
Killavirus wrote:Or goto suggestions ; WE WANT MULTITHREADING

Careful you don't get hit by chairs and bottles thrown by the devs !!!
Got it! We'll spawn threads and have them eat 100% of the cpu so it looks like it's using all of the computer's processor.
Well the direction technology has gone in the last decade is not faster cores but more cores. Its unfortunate but that is the direction intel has gone. I think that is the only way to get more computation work from a computer.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: Game FPS at End game

Post by AutoMcD »

there will be another breakthrough that increases speed, just makes more sense to go out instead of up at the moment. :)

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: Game FPS at End game

Post by Malryn »

AutoMcD wrote:there will be another breakthrough that increases speed, just makes more sense to go out instead of up at the moment. :)
Heck to the no. There is people out there.

Just started to overclock my PC to see if I can get a boost in performance. Kind of wondering if steam engines / nuclear power mod would have less work on a PC than a bunch of accumulators and solar plants.

Post Reply

Return to “General discussion”