I could really use some help trying to save my megabase from UPS death

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
netherous
Inserter
Inserter
Posts: 20
Joined: Fri Aug 10, 2018 2:36 am
Contact:

I could really use some help trying to save my megabase from UPS death

Post by netherous »

My AngelBob megabase which isn't even 20% done has two problems:
1) UPS has dropped to 22
2) The game has grown to often exceed 10g while running, causing Windows to hard crash and forcing a cold reboot

Sometimes the memory usage drops down to 4-5g and the game keeps running fine, as though it has performed some massive cleanup, but I can't trigger this behavior at will. I could get another 16g stick of ram and deal with it, but the other issue is the UPS. I've spent about 10 hours trying to track down which active entities are dragging things down. Most of the megabase is not yet built, and all I've done is lay rails and reveal parts of the map and it feels like that's what's hurting things.

Map, Time Usage, Entity Types, Active Chunks
https://imgur.com/a/XDSFwFh


The game is quite large and the modlist is extensive so I don't actually expect anyone to download it but it's here.
https://www.dropbox.com/s/t7sl9y4lvxw4l ... s.zip?dl=0 (200MB)
https://www.dropbox.com/s/00xhu0dbrj0ljvr/mods.rar?dl=0 (731MB)

I've been using the documentation on the lua runtime to try some things:

-Deleting all biters and nests got me some UPS but only raised it to 22.
-Deleting all pipes only got me ~1 UPS
-Deleting all belts only got me ~1 UPS
-Deleting all active bots got me no UPS
-Deleting all locomotives got me no UPS
-Deleting all decoratives on the surface got me 1 UPS
-Deleting all 300,000+ fish got me no UPS
-Deleting rail signals or rails hangs the game unless done in very small batches
-Deleting all radars got me ~2 UPS
-Deleting all lamps got me no UPS
-Deleting all trees/rocks/resource/simply-entity/item-entity in a big radius only seems to help a tiny bit, and only while I stay in that area
-Tearing down my nuclear facility got me no UPS
-Tearing down vast swaths of my existing base got me no UPS
-Disabling all mods but the bare minimum AngelBob's setup got me about 8 UPS, and I think this is mostly Miniloaders. If all the loaders are gone then nothing is running so I can't tell how much of that is from the mod versus things simply being inactive.

My save used to be at 50 UPS, and all I've done since then is reveal and clear chunks and build rails. I have barely got around to building the actual base parts. The game doesn't provide any more detailed breakdown of entity update time consumption and randomly deleting things seems to be getting me nowhere. I've googled until steam has shot out of my ears and none of the infamous UPS-eaters seems to be responsible. I've tried enumerating entities on the neutral force to count their types but there seem to be so many that the game runs out of memory and crashes even if I limit it to an operation on a small batch of entities, like 500. There don't seem to be any superfluous active chunks or obvious indicators of tons of entities that shouldn't be there. I'm at a loss.

Anyone have any ideas? I've put probably 100 hours into this particular save and I don't want it to die. The rail system is large but I've built similarly large rail systems before and they haven't tanked like this.
netherous
Inserter
Inserter
Posts: 20
Joined: Fri Aug 10, 2018 2:36 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by netherous »

Deleting all "rail-signal" and "rail-chain-signal" netted me 18 UPS. I find this very odd since 0 locomotives existed and the game reported no significant time spent under the Trains section. Chunks with only signals in them do not seem to be considered active chunks. Disabling LTN did not get me this benefit. The debug indicates nothing is trying to path along the tracks. Since signals are light sources, could this be a rendering or shadowing issue?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by Optera »

Generally the more chunks you generate the bigger your save gets.
Revealed chunks use up more resources than those in fog of war.

Most of your performance is spent on entity updates. Where possible replace belts with small, local logistic networks, anything above 1-2 chunks will not give benefits.

A lot of your mods add new HR sprites that may fill up all memory.
Either get rid of some, or use lower graphic settings.

Reducing mods might help as well.
You have a bunch of mods that feel at least partially redundant with Dectorio.
YARM, EVO Gui, Helmmod, Bottleneck are nice to have, but when fighting for single digit ups those should be removed first.
On my megabase I also got rid of AAI, Helicopters and Vehicle snap to save a little bit more.
netherous
Inserter
Inserter
Posts: 20
Joined: Fri Aug 10, 2018 2:36 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by netherous »

> Generally the more chunks you generate the bigger your save gets.
Revealed chunks use up more resources than those in fog of war.

I've noticed the save has got up to 250MB. I can trim it as low as 150MB by removing decoratives and entities and other things, but doing so didn't really help my UPS problem :( I have a hell of a lot of revealed chunks, but only like 1% of them are active. They have no biters or anything, just rocks and trees.

Literally deleting all belts via lua didn't help UPS either. I was thinking the same thing about belt performance, but I have about 220k belts and getting rid of them just doesn't help for some reason.

The base memory footprint for the game with this set of mods is 2.1GB. I actually can't run the high-res mods because I run out of VRAM. What I have does work fine though, it's the process' total memory that's the issue. Would the memory consumed by sprites actually increase as the game manages more entities that use those sprites? I wouldn't expect that it would but I'm not a graphics programmer.

I've spent hours trying this with different mods including a very minimal AB mod set. I had suspected things like LTN (and Belt Sorter turned out to be a major hog so I ditched it). Disabling the mods had no effect on UPS, other than, again, Miniloaders.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by Optera »

netherous wrote: Thu Jan 31, 2019 6:56 am Would the memory consumed by sprites actually increase as the game manages more entities that use those sprites? I wouldn't expect that it would but I'm not a graphics programmer.
If VRAM is too small sprites will be stored in RAM. But the size is constant, and doesn't grow during play.
netherous wrote: Thu Jan 31, 2019 6:56 am I have a hell of a lot of revealed chunks, but only like 1% of them are active. They have no biters or anything, just rocks and trees.
Try removing your radars first and then purge unused chunks: https://mods.factorio.com/mod/DeleteEmptyChunks


Using 1 wide chest limited to 100 slots instead of 6 angel warehouses could also help a little.
According to devs huge chests put severe strain on the chest update logic even if you lock 90% of their slots.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14363
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by Rseding91 »

Of the time spent each tick:

84.61% is spent in update() - the rest is spent rendering.

Of that 84.61%:
  • 5% is calling on_tick for mods
  • 5.5% is spent updating the minimap from all the radars you've got active
  • 12.4% is spent transferring energy around electric networks
  • 3% is spent updating transport belts
  • 1.8% is spent updating lamps with circuit wires attached
  • 1% is spent on trains driving around
  • 20% is spent updating loaders
  • 7.8% is spent updating underground pipes
  • 5.5% is spent updating inserters
  • 4.3% is spent updating pipes
  • 4.1% is spent updating radars
No part of the time spent was shown to be in rail signals or chain signals. Unless you've got a mod which makes tiny electric poles on rail/chain signals and destroying the rail/chain signals also destroyed those electric poles - which could be a thing with how many mods you have.

You have:
  • 70'218 ultimate miniloaders
  • 28'879 steel pipe-to-ground
  • 11'703 ultimate miniloaders
  • 8'792 steel pipe
  • 8'220 ultimate filter miniloaders
  • 7'231 tungsten pipe-to-ground
and the list keeps going.

Each tick the game is updating 79'885 entities - as in update() is called on that many entities each tick.

To put it simply: you've built far more than the game and or any computer could ever process.

There's nothing you can do except not build that big.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by Optera »

With 20% taken by loader entities downsizing your loader constructs to only as many and as fast as necessary would boost performance a fair bit.

From Miniloaders restrictions and warnings paragraph:
Ultimate Belts Caveats and Warnings

Ultimate Belts support is in BETA state.

Factorio core engine limitations restrict inserters pulling from belts to
60 items/second, or 4.5x yellow belt speed. Further, loader entities are
restricted to 120 items/second.

Miniloaders at "Ultra fast" and faster speeds use vanilla loader entities in
addition to inserters, giving a max throughput of ~180 items/second when
interacting with chests and other containers. They will not give full
throughput when loading cargo wagons, and circuit control is disabled since
vanilla loaders cannot be circuit controlled.
To get rid of loader entities altogether use only miniloaders slower than 60 item/s.
Edit: I just looked at miniloaders code. It always creates a loader entity it just wont connect to chests below 0.16 speed.
billbo99
Fast Inserter
Fast Inserter
Posts: 137
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by billbo99 »

I thought mini-loaders use invisible inserters which impact UPS. An alternate option is to use DeadlockLoaders.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 493
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by GrumpyJoe »

since i cannot load it at work and i cant see details of the base in the screens: dont load trains with loaders, that´d be a massive UPS drop. it was for me at least. (another map tho, not the one described below)

I have about the same issue, where its going down soon, the game already slows down to 58UPS, map size ( revealed chunks) seems about the same, and i too would call my progress about 20% and i also have a huge mod list beside the usual AB mods. I too have rail blocks laid in advance, so its only waiting to build stuff in them. I even killed all visible trees, would need to change map settings (biter gen) via another mod, since creative mode is permanently disabled since a few starter cheats (some bots +power armor 2). I dont know how much biters are generated in the hidden chunks, i tend to kill them with console, just dont wanna disable them permanently, but pollution is not reaching them.

there must be a difference in build style involved, since my PC is almost exactly 5y old, and your drop is massive compared to mine

The warehouse tip is also good if its true. I think they are overused in AB anyway. I only use them if i need a 6 lane ore sorter, other than that i use silos, or smaller warehouses from the Warehouse mod.

rethinking all that. Completely offtopic, but lets team up, we seem to have alot in common in base planning ;)
netherous
Inserter
Inserter
Posts: 20
Joined: Fri Aug 10, 2018 2:36 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by netherous »

Rseding91 wrote: Thu Jan 31, 2019 8:34 am Of the time spent each tick:

84.61% is spent in update() - the rest is spent rendering.

Of that 84.61%:
  • 5% is calling on_tick for mods
  • 5.5% is spent updating the minimap from all the radars you've got active
  • 12.4% is spent transferring energy around electric networks
  • 3% is spent updating transport belts
  • 1.8% is spent updating lamps with circuit wires attached
  • 1% is spent on trains driving around
  • 20% is spent updating loaders
  • 7.8% is spent updating underground pipes
  • 5.5% is spent updating inserters
  • 4.3% is spent updating pipes
  • 4.1% is spent updating radars
No part of the time spent was shown to be in rail signals or chain signals. Unless you've got a mod which makes tiny electric poles on rail/chain signals and destroying the rail/chain signals also destroyed those electric poles - which could be a thing with how many mods you have.

You have:
  • 70'218 ultimate miniloaders
  • 28'879 steel pipe-to-ground
  • 11'703 ultimate miniloaders
  • 8'792 steel pipe
  • 8'220 ultimate filter miniloaders
  • 7'231 tungsten pipe-to-ground
and the list keeps going.

Each tick the game is updating 79'885 entities - as in update() is called on that many entities each tick.

To put it simply: you've built far more than the game and or any computer could ever process.

There's nothing you can do except not build that big.
Thank you for the detailed breakdown Rseding91. I'm not using any mods that modify rail signals. The only train-related mods I'm using are LTN, a few which add custom locomotives with unique graphics (which I haven't actually placed anywhere in the world), and the AngelBob modifications which add higher ranks of locomotives and give them vehicle grids.

I find it very odd that deleting all locomotives nets me no gain, but then deleting all rail signals bumps me straight from 22 UPS to 42 UPS. I'm not sure how this jives with your list. The command takes about an hour to run, but obviously a rail network with no signals isn't useful. I can't check right now but I had about 40k+ chain signals and 35k+ rail signals. Are those entities which need to be updated every tick? Is there a way for a user to get the detailed breakdown of update time like you provided?
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 493
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by GrumpyJoe »

i downloaded it as well, and i hate to say that its too big even for my standards :D

Deleting alien biomes instantly bumped me up 5 UPS. no idea how... It all turn to grass when deleting biomes tho, so it looks like a huge colf corse...
I had this when i wanted to replicate KoS´ PY series which quickly discontinued. I had massive drops from the beginning. Py´s equivalent of vanillas burner miner phase. Like 50 machines in total. Deleting Alien Biomes helped, but PY wasn´t for me anyway, so i also didnt follow that biomes things.

Also, I could see that block rail grid of yours before, but didn´t think about it.
When asking about my base on Discord like 2 weeks back, someone pointed out that big blocks of rails alone may cause this for us. No idea how pathfinding works, but from what you wrote, trains may check all of those "loops" (not the actual turns in the 4way sections), even if the shortest route is waaaaay closer. No idea how that relates to removing signals, but here is a screen of my base, and with 2 trains running, im getting dropped to 58UPS already (with my old PC)
I have 2x3 rectangular blocks in between the 4 track rails, one block is (i think) 4x6 chunks.
I know the logi zone is HUGE, but its not used any more, i just let bots build the rails, this is a screen of when they were done.
You cant see it through the logi zones here, but ive only build like the bottom right corner, and almost everything is backed up there. (most of the sorting and some ingot productiion. It has Madclowns ores, but i havent even built a crusher for that
AB MC.png
AB MC.png (2.37 MiB) Viewed 6085 times
I hate to say that we both might need to think about starting a new game with a different rail layout :cry:
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by darkfrei »

Can you try PXL? The rendering time must be much lower.
netherous
Inserter
Inserter
Posts: 20
Joined: Fri Aug 10, 2018 2:36 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by netherous »

GrumpyJoe wrote: Thu Jan 31, 2019 4:42 pm i downloaded it as well, and i hate to say that its too big even for my standards :D

Deleting alien biomes instantly bumped me up 5 UPS. no idea how... It all turn to grass when deleting biomes tho, so it looks like a huge colf corse...
I had this when i wanted to replicate KoS´ PY series which quickly discontinued. I had massive drops from the beginning. Py´s equivalent of vanillas burner miner phase. Like 50 machines in total. Deleting Alien Biomes helped, but PY wasn´t for me anyway, so i also didnt follow that biomes things.

Also, I could see that block rail grid of yours before, but didn´t think about it.
When asking about my base on Discord like 2 weeks back, someone pointed out that big blocks of rails alone may cause this for us. No idea how pathfinding works, but from what you wrote, trains may check all of those "loops" (not the actual turns in the 4way sections), even if the shortest route is waaaaay closer. No idea how that relates to removing signals, but here is a screen of my base, and with 2 trains running, im getting dropped to 58UPS already (with my old PC)
I have 2x3 rectangular blocks in between the 4 track rails, one block is (i think) 4x6 chunks.
I know the logi zone is HUGE, but its not used any more, i just let bots build the rails, this is a screen of when they were done.
You cant see it through the logi zones here, but ive only build like the bottom right corner, and almost everything is backed up there. (most of the sorting and some ingot productiion. It has Madclowns ores, but i havent even built a crusher for that
AB MC.png
I hate to say that we both might need to think about starting a new game with a different rail layout :cry:
My UPS is at 22 with that network whether or not there are locomotives running on it. For my final layout I did want about 3k locomotives running and I only had maybe 30 so far. I hadn't actually tested it. I knew train pathfinding would probably tank with a real grid and I wanted to see how that would shake out, but I haven't even got that far yet and the update time doesn't indicate any time is being spent in train pathfinding.

I'm just really puzzled by the reality that I get 22 UPS with a rail network that is devoid of locomotives, but 42 with the same network with all signals removed. Those signals shouldn't be costing anything with no trains and no active chunks, and minimizing the mod list doesn't help.
Zavian
Smart Inserter
Smart Inserter
Posts: 1649
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by Zavian »

netherous wrote: Thu Jan 31, 2019 9:03 pm I'm just really puzzled by the reality that I get 22 UPS with a rail network that is devoid of locomotives, but 42 with the same network with all signals removed. Those signals shouldn't be costing anything with no trains and no active chunks, and minimizing the mod list doesn't help.
If you upload the saves (with and without signals), maybe someone will take a look and try to work out why the signals are costing so many ups.
GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 493
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by GrumpyJoe »

LTN is not completely idle
when i fired up your save, i got messages about schedules being created. Didn´t take a look at them tho, could be your starter base on a seperate network?
Also, are you running any of the AAI stuff, like zone scanning? AAI caused alot of trouble on an AB server i was playing on. No idea if it was the scanning, or automating vehicles, or whatever, but it was removed on the very first ore patches and we went on to have a base almost as big as mine

Off to work, will have another look in the afternoon.

Also, i need to test my own base, remove signals.
User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by ptx0 »

test the save in .18 where the rail pathfinder has been improved substantially. those rail signals shouldn't be as big of a deal, but use fewer chain signals if you can.
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: I could really use some help trying to save my megabase from UPS death

Post by disentius »

Downloaded your 200 MB file, loaded it in 0.18.12 with some mods removed.
Runs at 60 UPS on my PC.
Here is the migrated save:
https://mega.nz/#!7w8mmYTY!BuUgs86JxzJx ... djTeMae_EI
My pc
Post Reply

Return to “Technical Help”