Temporary files: RAM or disk?
Posted Jun 3, 2012 17:44 UTC (Sun) by giraffedata
In reply to: Temporary files: RAM or disk?
Parent article: Temporary files: RAM or disk?
I'd be very VERY disappointed in any filesystem that allowed its write buffers to get that far behind.
Getting this far behind is a valuable feature and any filesystem that doesn't let you do it is lacking. Someone pointed out earlier that the more modern ext3 is incapable of getting that far behind, whereas the less modern ext2 is not. That's a regression (but effectively explains why a tmpfs /tmp could be faster than an ext3 one).
I've seen filesystems that have mount options and file attributes that specifically indicate that files are temporary -- likely to be overwritten or deleted soon -- so that the page replacement algorithm doesn't waste valuable I/O time cleaning the file's pages.
Furthermore, many people believe that whenever you want data to be hardened to disk, you should fsync. Given that philosophy, the default kernel policy should be not to write the data to disk until you need the memory (with some allowance for forecasting future need for memory).
to post comments)