[Linux, steam, 0.17.69] Slow startup first time, quick after that

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.
pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

[Linux, steam, 0.17.69] Slow startup first time, quick after that

Post by pieppiep »

After a fresh computer boot, the first time I open factorio it will take a long time to open.
86.895 Factorio initialised

When I close and reopen or when I restart factorio because mod selection changed, it starts quick.
15.274 Factorio initialised

Is there anyway to get a more detailed log to see what takes such a long time the first start?
Attachments
factorio-previous.log
Slow boot
(4.07 KiB) Downloaded 92 times
factorio-current.log
Fast boot
(4.09 KiB) Downloaded 89 times

posila
Factorio Staff
Factorio Staff
Posts: 5330
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Linux, steam, 0.17.69] Slow startup first time, quick after that

Post by posila »

It's basically just loading all spritesheet files from the disk. The second time around they are already in OS filesystem cache, so they get loaded substantially faster. I have the game installed on WD Black HDD and it loads in about 45 seconds the first time around (and I think that's pretty slow even for HDD, I might need defragment it). And I have development version on SSD, and that loads in roughly 20 seconds (at which point most of the time is spent decompressing images and sorting them to atleses on GPU; only maybe 2 seconds are spent loading the files)

pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: [Linux, steam, 0.17.69] Slow startup first time, quick after that

Post by pieppiep »

Thanks, that's it!
When I flush the cache it takes a long time again.
When I copy all factorio files to /dev/null so they're in the cache again, the startup is fast again.
Only thing I'm disappointed at is that it seems the cache size used is about 1100MB and filled in about 70 seconds, so that's just under 16MB/s.

posila
Factorio Staff
Factorio Staff
Posts: 5330
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Linux, steam, 0.17.69] Slow startup first time, quick after that

Post by posila »

pieppiep wrote:
Fri Oct 11, 2019 8:52 pm
Only thing I'm disappointed at is that it seems the cache size used is about 1100MB and filled in about 70 seconds, so that's just under 16MB/s.
That's expected speed ... if you play the game from USB 2.0 thumb drive, which I guess you don't. What hard drive do you have? (Not that I am gonna be able to help, I am just curious)

pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: [Linux, steam, 0.17.69] Slow startup first time, quick after that

Post by pieppiep »

Kingston A400 480GB
Advertised SATA-600 500MB/s read 450MB/s write for sequential data.
hdparm gives me 234 MB/sec, I think that's sequential.
fio gives me IOPS 64.9k with bandwidth 266MiB/s.
Online benchmarks from other people show similar speeds, so that seems okay.

I've done another test, first flush the cache with
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
Then,
iostat -h -d 1 -p /dev/sda

This shows me one second with more than 100MB/s, only 3 more with more 50MB/s.
I think about 7/8th of the time the read speed above 5MB/s.
The read speed is on the system, so clearly nothing else is trying to read disk.

Btw, also the cpu usage is low most of the time. (core I7-3770 with 16GB memory)

Post Reply

Return to “Technical Help”