Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I read articles on running Linux from a flash drive, many recommend that directories that see many or constant writes be mounted in ram (e.g. as tmpfs). My question is - Which directories will these typically be, and is there any way to monitor disk activity that would show which directories see many writes?

share|improve this question
hmm... /var and /proc? Can't give you a list complete enough to qualify as an answer, but that's what seems logical at first glance. – rumtscho Mar 30 '10 at 21:05
Also, /tmp earns a few frequent flyer miles. – Dennis Williamson Mar 30 '10 at 21:36
The swap partitions – Nifle Mar 30 '10 at 21:38
up vote 2 down vote accepted

/proc is generally a procfs system which doesn't live in disk. So I wouldn't worry about that.

The obvious one would be /tmp -- this is where any temporary files that get generated are going to be stored.

/var/run and /var/lock can be mounted as tmpfs since they do not need to persist over a reboot.

/var/log could be a possibility as well as long as you are OK not keeping logs over a system reboot.

share|improve this answer

/var and /tmp are obvious candidates.

Ksfmd may be of help (I don't have direct experience with it, but it seems to have the potential to help you monitor your system to decide what gets mounted where).

You might be able to build a more exact match to what you want to do with the inotify toolkit.

share|improve this answer

The new utility fatrace can show you exactly. See:

sudo fatrace

For example:

# sudo fatrace
chrome(6514): W /home/xxxx/.config/google-chrome/Default/Current Session
chrome(6514): R /home/xxxx/.pki/nssdb/cert9.db
chrome(6514): R /home/xxxx/.pki/nssdb/cert9.db
chrome(6514): W /home/xxxx/.cache/google-chrome/Default/Cache/data_1
chrome(6514): RW /home/xxxx/.cache/google-chrome/Default/Cache/data_0
chrome(6514): W /home/xxxx/.cache/google-chrome/Default/Cache/data_1
wicd(29613): RO /lib/x86_64-linux-gnu/
ifconfig(29613): R /lib/x86_64-linux-gnu/
ifconfig(29613): CO /etc/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.