Run from ramdisk - offtopic

Things that are not directly connected with Factorio.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 4115
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Run from ramdisk - offtopic

Post by Klonan »

Camylarde wrote:
Tue Feb 11, 2020 7:05 pm
is there a way to move factorio to ramdisk?
Why?

Honktown
Filter Inserter
Filter Inserter
Posts: 638
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Run from ramdisk

Post 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
I have mods! I guess!
Link

Laramy65
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Jan 28, 2020 7:58 am
Contact:

Re: Run from ramdisk

Post 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?

billbo99
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: Run from ramdisk

Post 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.

Code: Select all

 cache-prototype-data=true
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.

movax20h
Fast Inserter
Fast Inserter
Posts: 109
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Run from ramdisk

Post 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.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post 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.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

movax20h
Fast Inserter
Fast Inserter
Posts: 109
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Run from ramdisk

Post 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.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post by ptx0 »

you run on Linux, where ramdisk works differently from Windows, where this user reported bug originated. read the original post, dude.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

movax20h
Fast Inserter
Fast Inserter
Posts: 109
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Run from ramdisk

Post 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.

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

Re: Run from ramdisk

Post 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 :P
If you want to get ahold of me I'm almost always on Discord.

User avatar
planetmaker
Fast Inserter
Fast Inserter
Posts: 163
Joined: Mon Jan 21, 2019 9:30 am
Contact:

Re: Run from ramdisk

Post 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 :P
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.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post 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 :P

uhm, how does that mean my statement is false? you just described where all the IO is coming from.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post 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.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

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

Re: Run from ramdisk

Post 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 :P

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.
If you want to get ahold of me I'm almost always on Discord.

movax20h
Fast Inserter
Fast Inserter
Posts: 109
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Run from ramdisk

Post 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 :P

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.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post 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.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

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

Re: Run from ramdisk

Post 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.

ptx0
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Run from ramdisk

Post by ptx0 »

posila wrote:
Fri Feb 14, 2020 11:02 pm
the 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.
If you want to buy me a beer for my work on eduran's LTN Tracker, send me a private message.

Camylarde
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 04, 2016 4:52 pm
Contact:

Re: Run from ramdisk

Post 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!

Camylarde
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 04, 2016 4:52 pm
Contact:

Re: Run from ramdisk

Post 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?

Locked

Return to “Off topic”

Who is online

Users browsing this forum: No registered users