Page 1 of 2

Performance test: basic belts vs underground belts

Posted: Sun Nov 15, 2015 7:26 am
by DaveMcW
I set up a test to measure the cpu performance of basic belts and underground belts in Factorio 0.12.17. In each case I have 64 full belts moving items 1088 tiles.

You can download the save to test for yourself, just connect the top or bottom electric network and wait for the belts to fill up.
belt-performace-test.zip
performance-test.jpg
Basic belts
FPS/UPS = 13.9/41.6
Entity update: 23.923/22.933/25.798

Underground belts
FPS/UPS = 22.9/68.7
Entity update: 14.124/13.789/15.342

Underground belts are the clear winner. If you care about cpu performance, you should replace all belts longer than 5 tiles with underground belts.


I hope the developers can do more optimizations for long-distance belts. I think basic belts look much better than underground belts, and I hate being forced to replace them.

Re: Performance test: basic belts vs underground belts

Posted: Sun Nov 15, 2015 10:18 am
by Smarty
those are some pretty nice number dave

did you test with the other types of belts too?

Re: Performance test: basic belts vs underground belts

Posted: Sun Nov 15, 2015 4:50 pm
by Jaridan
Doesn't this rely on the cpu you use? So, isn't this a non-issue for haswell + ?

Re: Performance test: basic belts vs underground belts

Posted: Sun Nov 15, 2015 5:49 pm
by Xterminator
I always somewhat figured that underground Belts would be a bit better performance wise than normal Belts, but it is good to know this for sure now. Thanks Dave!
It's actually a bigger difference than I would have thought. Definitely using !ore undergrounds in the future wherever I can. :)

Re: Performance test: basic belts vs underground belts

Posted: Mon Nov 16, 2015 12:38 am
by Tev
This is very good to know, thank you!

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 9:28 am
by hoho
Jaridan wrote:Doesn't this rely on the cpu you use? So, isn't this a non-issue for haswell + ?
Having a faster CPU only means you can build a bit more stuff before performance becomes an issue. Underground belts are still more efficient even on a supercomputer :)


Also, note that I'm almost certain underground belts are more efficient when you use max lenght of them. If you put entry and exit right next to each other without any space, they are at least as slow, if not slower than normal belts. As was said in OP:

you should replace all belts longer than 5 tiles with underground belts

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 10:02 am
by Kewlhotrod
Jaridan wrote:Doesn't this rely on the cpu you use? So, isn't this a non-issue for haswell + ?
I have a i5 4690k still have 20fps on one of my maps. so not really.

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 4:09 pm
by kinnom
fps depends on your gpu. a stronger cpu only means more ups

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 6:53 pm
by orzelek
kinnom wrote:fps depends on your gpu. a stronger cpu only means more ups
Thats not entirely correct - scene still needs to be prepared and that goes on cpu. So good cpu helps always for both fps and ups.

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 7:20 pm
by ratchetfreak
orzelek wrote:
kinnom wrote:fps depends on your gpu. a stronger cpu only means more ups
Thats not entirely correct - scene still needs to be prepared and that goes on cpu. So good cpu helps always for both fps and ups.
and opengl/directX11 adds quite a bit of overhead before things get to the GPU

Re: Performance test: basic belts vs underground belts

Posted: Tue Nov 17, 2015 7:50 pm
by Lee_newsum
My test useing this map
system intel I5-2400 3.10 Cores: 4, 32bit, 4GB RAM, Win7, factorio 0.12.17

load map FPS/UPS= 60.3/179.6 Entity update: 0.420/0.206/0.576

underground belts
man zoom out FPS/UPS= 26.5/79.4 Entity update: 11.622/8.891/15.749
min zome in FPS/UPS= 28.4/85.3 Entity update: 11.319/8.990/17.038

basic belts
man zoom out FPS/UPS= 12.8/38.5 Entity update: 23.158/18.916/30.919
min zome in FPS/UPS= 15.1/45.2 Entity update: 21.739/18.762/28.650

Re: Performance test: basic belts vs underground belts

Posted: Thu Nov 19, 2015 3:11 pm
by ssilk
Hm.

Some more experiments might be interesting... What is faster:

- Assembly: An empty assembly or a full assembly? A limiting smart inserter on the insert-side or on the output-side?
- An empty belt or full belt? Or a belt with only some items on it?
- inserting onto a full or empty belt?
- train transport vs. belt transport
- logistic bots vs. belt transport
- ...

Re: Performance test: basic belts vs underground belts

Posted: Thu Dec 17, 2015 3:33 pm
by Rseding91
ssilk wrote:Hm.

Some more experiments might be interesting... What is faster:

- Assembly: An empty assembly or a full assembly? A limiting smart inserter on the insert-side or on the output-side?
- An empty belt or full belt? Or a belt with only some items on it?
- inserting onto a full or empty belt?
- train transport vs. belt transport
- logistic bots vs. belt transport
- ...
Assembling machines (provided they have no fluid in the results/ingredients) will take 0 CPU time when they can't work due to lack of items or too many items.

The same applies for transport belts. If the items aren't moving or if there are no items they take 0 CPU time.

As for the others, that depends on how they're used.

Re: Performance test: basic belts vs underground belts

Posted: Thu Dec 17, 2015 10:17 pm
by ssilk
I rebuild some parts of my factory to remove all items on belts, when the part of production is not used (was an really interesting task) and it brought some milliseconds. :)

Re: Performance test: basic belts vs underground belts

Posted: Thu Dec 17, 2015 10:26 pm
by kovarex
I have plan for some hardcore belt optimisation for belts for the future. It would be especially effective for long belts.

Re: Performance test: basic belts vs underground belts

Posted: Fri Dec 18, 2015 3:42 am
by Nugetto
Would the different belts/underground belts put more/less stress on the CPU?

Re: Performance test: basic belts vs underground belts

Posted: Fri Dec 18, 2015 8:53 am
by ratchetfreak
Rseding91 wrote:
Assembling machines (provided they have no fluid in the results/ingredients) will take 0 CPU time when they can't work due to lack of items or too many items.

The same applies for transport belts. If the items aren't moving or if there are no items they take 0 CPU time.

As for the others, that depends on how they're used.
not if they have to be rendered

you still need to push the position of the sprite at least to the GPU

Re: Performance test: basic belts vs underground belts

Posted: Sun Dec 20, 2015 12:25 pm
by vanatteveldt
If the fun in this game is derived from seeing a hugely complicated factory move around large numbers of goods in complicated processes, how can moving part of that underground possibly be a good idea? :)

I guess this (i.e. the pure fact that belts are a non-trivial performance drain) is also another argument for trying to eliminate belts wherever possible by feeding intermediate products directly into the next assembler.

Re: Performance test: basic belts vs underground belts

Posted: Mon Dec 21, 2015 4:59 pm
by kovarex
DaveMcW wrote:I set up a test to measure the cpu performance of basic belts and underground belts in Factorio 0.12.17. In each case I have 64 full belts moving items 1088 tiles.
This is 69 632 full belts, not something one would naturally build in a game. So unless you are building some huge monstrosity, it should be smooth.
But yes, optimising is always fun just to prove myself that I can push it further :)

Re: Performance test: basic belts vs underground belts

Posted: Mon Dec 21, 2015 8:25 pm
by SpeedDaemon
kovarex wrote:So unless you are building some huge monstrosity...
But... but... isn't that the whole point of this game?? :)

If your FPS isn't impacted, you're not done yet!