[Toolserver-l] RAM disk?

Derrick Coetzee dc at moonflare.com
Sun Nov 14 21:21:26 UTC 2010


> From: "Matthew P. Del Buono" <mpdelbuono at gmail.com>
>
> I'm in the conceptual phase of a new bot but it requires a bit of
> processing. Unfortunately the only way this processing can be done is by
> writing out two small files.
>
> However, the processing should be very fast, and after it's done the
> files can be trashed. For that reason, I don't think it's very logical
> to tax the hard drive with this processing.

Hi Matthew,

In my experience, the use of temporary files is not that bad (for
example, gcc uses multiple temporary files in the course of compiling
a .c file). I once did a test build of the Linux kernel on a RAM disk
instead of the real disk and the difference in build time was less
than 1%. The buffer cache is large enough that your program never
reads them from disk anyway. The only downside to using real files
instead of a RAM disk is that the system will eventually flush real
files to disk for durability - but if you delete them quickly enough,
this is unlikely to occur very often.

-- 
Derrick Coetzee
User:Dcoetzee



More information about the Toolserver-l mailing list