Page 1 of 2
Run from ramdisk - offtopic
Posted: Tue Feb 11, 2020 7:47 pm
by Klonan
Camylarde wrote: Tue Feb 11, 2020 7:05 pm
is there a way to move factorio to ramdisk?
Why?
Re: Run from ramdisk
Posted: Wed Feb 12, 2020 7:54 pm
by Honktown
Ramdisk might sound like a good idea, until you watch factorio during start/saving and find 100% cpu usage. Disk isn't the bottleneck unless you're on some slow 5400 RPM disk. Also the system shutting down and losing everything.
It could be the protection they have against symlinks and stuff is catching you (they added that so in theory, someone couldn't hijack where files are coming/going, which upset the people redirecting script output).
Suggestion: don't

lol
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 6:59 am
by Laramy65
Could you try non steam version? If you bought factorio on steam you should still be able to download it from factorio.com
Also why would you do this?
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 8:03 am
by billbo99
Within the config.ini there is a new option added since 0.18 (this is an experimental option) that will help with start up times when using lots of mods.
The second time you start your game after using this flag your startup time should reduce quite a bit. I went from 80 seconds to 16.
If I also enabled the atlas cache option I got startup time reduced to 6 seconds.
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 6:39 pm
by movax20h
I run Factorio from ramdisk. It works just fine. Not for speed or anything, I simply do. I doubt it have any effect on loading speed at all, and is not the reason I am using ramdisk.
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 6:55 pm
by ptx0
factorio writes to disk an awful lot during runtime, you can see this by monitoring something like `atop` on Linux, the WRDSK column shows 2.3GiB of writes after about 2 hours of uptime.
i don't see why to ask why they want to run on ramdisk, instead, you can help by answering the actual question or admit you know nothing and bow out.
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 7:01 pm
by movax20h
ptx0 wrote: Thu Feb 13, 2020 6:55 pm
factorio writes to disk an awful lot during runtime, you can see this by monitoring something like `atop` on Linux, the WRDSK column shows 2.3GiB of writes after about 2 hours of uptime.
i don't see why to ask why they want to run on ramdisk, instead, you can help by answering the actual question or admit you know nothing and bow out.
The game will write the save to file system cache. If you have enough memory it will simply have it in memory anyway. From the user perspective there will be zero difference if you run the game and save directory on ramdisk or not.
2.3GiB over 2 hours is probably accumulated stat. In 2 hours you will have probably 10 autosaves for example.
If you want to run of ramdisk, you can. Factorio doesn't care.
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 7:14 pm
by ptx0
you run on Linux, where ramdisk works differently from Windows, where this user reported bug originated. read the original post, dude.
Re: Run from ramdisk
Posted: Thu Feb 13, 2020 7:24 pm
by movax20h
ptx0 wrote: Thu Feb 13, 2020 7:14 pm
you run on Linux, where ramdisk works differently from Windows, where this user reported bug originated. read the original post, dude.
The problem he is having, has nothing to do with the ramdisk itself.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 12:21 pm
by Rseding91
ptx0 wrote: Thu Feb 13, 2020 6:55 pm
factorio writes to disk an awful lot during runtime, you can see this by monitoring something like `atop` on Linux, the WRDSK column shows 2.3GiB of writes after about 2 hours of uptime.
i don't see why to ask why they want to run on ramdisk, instead, you can help by answering the actual question or admit you know nothing and bow out.
We write to the log file when something is logged (not frequent) and to the save file when the game saves.
Other than that, we don't touch the disk for writing runtime. So, your statement is false

Re: Run from ramdisk
Posted: Fri Feb 14, 2020 1:52 pm
by planetmaker
Rseding91 wrote: Fri Feb 14, 2020 12:21 pm
ptx0 wrote: Thu Feb 13, 2020 6:55 pm
factorio writes to disk an awful lot during runtime, you can see this by monitoring something like `atop` on Linux, the WRDSK column shows 2.3GiB of writes after about 2 hours of uptime.
i don't see why to ask why they want to run on ramdisk, instead, you can help by answering the actual question or admit you know nothing and bow out.
We write to the log file when something is logged (not frequent) and to the save file when the game saves.
Other than that, we don't touch the disk for writing runtime. So, your statement is false
2 GiB (or 250MByte) in two hours is not really that much, if you have autosave every 5 minutes. Thus I think both statements can be reconciled easily.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 7:02 pm
by ptx0
Rseding91 wrote: Fri Feb 14, 2020 12:21 pm
Other than that, we don't touch the disk for writing runtime. So, your statement is false
uhm, how does that mean my statement is false? you just described where all the IO is coming from.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 7:04 pm
by ptx0
planetmaker wrote: Fri Feb 14, 2020 1:52 pm
2 GiB (or 250MByte) in two hours is not really that much, if you have autosave every 5 minutes. Thus I think both statements can be reconciled easily.
some servers run from SD card mirror built into the motherboard, if you were to write this much data to them constantly over the course of a year, it would fail early. someone else's definition of "that much" might be very different from yours.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 7:32 pm
by Rseding91
ptx0 wrote: Fri Feb 14, 2020 7:02 pm
Rseding91 wrote: Fri Feb 14, 2020 12:21 pm
Other than that, we don't touch the disk for writing runtime. So, your statement is false
uhm, how does that mean my statement is false? you just described where all the IO is coming from.
factorio writes to disk an awful lot during runtime
That statement is false: 100% false.
"All the IO" is 100% expected and the minimal amount that can be done to save the game. Nothing about any of this is unusual or excessive. The game literally can not write less and still do what you've asked of it.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 8:02 pm
by movax20h
Rseding91 wrote: Fri Feb 14, 2020 7:32 pm
ptx0 wrote: Fri Feb 14, 2020 7:02 pm
Rseding91 wrote: Fri Feb 14, 2020 12:21 pm
Other than that, we don't touch the disk for writing runtime. So, your statement is false
uhm, how does that mean my statement is false? you just described where all the IO is coming from.
factorio writes to disk an awful lot during runtime
That statement is false: 100% false.
"All the IO" is 100% expected and the minimal amount that can be done to save the game. Nothing about any of this is unusual or excessive. The game literally can not write less and still do what you've asked of it.
I think what ptx wanted to say, is that for certain low end hardware / storage, 2G per hour is not the best for the longevity of the hardware (cheap sd cards).
Options to fix: 1) increase the autosave interval, 2) run on ramdisk, and possibly sync the ramdisk to permanent storage (or to networked share) periodically.
But obviously I agree it is not "awful lot". Which is misleading, as it is writing as little as possible. And "awful" here is extremal subjective.
One way or another, it is not a concern for factorio or factorio devs, and user can set it up anyway they want to solve it themselves. Factorio can't fix it, because it already doing the right thing.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 8:21 pm
by ptx0
okay, sure. it is all relative. to someone with an AMD R9 3990x, requiring 8 cores is "not a lot". by "awful lot", I really meant, "an awful lot more than nothing". and you can read between the lines or you can say it's 100% false, in which case, reading comprehension is lacking.
Re: Run from ramdisk
Posted: Fri Feb 14, 2020 11:02 pm
by posila
ptx0 wrote: Fri Feb 14, 2020 8:21 pm
okay, sure. it is all relative. to someone with an AMD R9 3990x, requiring 8 cores is "not a lot". by "awful lot", I really meant, "an awful lot more than nothing". and you can read between the lines or you can say it's 100% false, in which case, reading comprehension is lacking.
Hello. You seem like you want to be helpful. If that is so, please consider asking the OP to provide useful information that will allow reproducing the issue, like postin the Factorio log, and explain the steps in more detail. For example statements like "Created a ramdisk", "Applied the article" are very vague. There is more than one way how to create a ramdisk, and I know what are the instructions in the article, but I don't know what the OP actually did (and if they say they followed it to the letter, I won't believe them). While for issues that seem to be important to fix (e.g. normally installed game doesn't run or crashes) I, one of the other devs, or one of the mods will ask the person to provide more information if missing in the initial post. But if an issue caused by obscure use case doesn't contain all the info, I'll just skip over it. Trying to explain why the use case is not so obscure, by making it to be a solution to a hypothetical, even more obscure use case is not helping to solve the problem.
Re: Run from ramdisk
Posted: Sat Feb 15, 2020 12:09 am
by ptx0
posila wrote: Fri Feb 14, 2020 11:02 pmthe problem.
ruh oh raggy, we got in trouble.
the problem was microsoft windows all along, and in all of your words you didn't address their issue once.
Re: Run from ramdisk
Posted: Sat Feb 15, 2020 10:38 pm
by Camylarde
posila wrote: Fri Feb 14, 2020 11:02 pm
... but I don't know what the OP actually did (and if they say they followed it to the letter, I won't believe them).
OUCH!
Re: Run from ramdisk
Posted: Sat Feb 15, 2020 10:39 pm
by Camylarde
Klonan wrote: Tue Feb 11, 2020 7:47 pm
Camylarde wrote: Tue Feb 11, 2020 7:05 pm
is there a way to move factorio to ramdisk?
Why?
A) Well, vgot lot of ram and wanted to see if there is startup improvement over my SSD.
B) Because we (hopefully) can?