2 ms·
Example of exactly when to use hard disk and when to use tmpfs: User browsing the web for a month without rebooting. Flash stores temporary files in /tmp/. For
by peterwwillis 14y ago
Example of exactly when to use hard disk and when to use tmpfs:
User browsing the web for a month without rebooting. Flash stores temporary files in /tmp/. For a month straight, Pandora is pumping out songs to /tmp/ as a cache. 43829 minutes in a month, imagine an average of 3 minutes per song that's 14609 songs, at an average 1.5 megabytes per song that's 7304 megabytes that's 7.13 gigabytes. Probably shouldn't be stored in RAM.
On the other hand, you have ganglia clusters of about 2,000 hosts. You have multiple gmetad's collecting data from different data sources and pooling it into your web interface box. It's updating ~10,000 tiny files every 30 seconds. Your i/o wait and system time is through the roof. You move the place gmetad writes to a tmpfs mount, and rsync to the disk every minute. Suddenly the i/o and system times are at 0.01%.
Tmpfs for /tmp/ is considered harmful, but extremely helpful in other cases.