0

I need to know how the directories of a Linux system are used, in relation to their approximate read/write behaviour in time.

So far I have not been able to find any references. Can anybody provide some links?

The reason of my interested is due to the fact I have to install Linux on a system with a small, fast and expensive SSD (mainly for read operations), a large, slow and cheap SSD (read and write) and a RAM-disk (temporaries).

I know the answer depends on the kind of activity (mine is mainly a development one), but as I wrote I only need approximate values.

Ideally this is what I am looking for:

| Directory | Size | read/write operations ratio | average N operations per second |

What I would do (without being sure about it) is:

Small and fast SSD: /bin, /boot, /dev?, /etc, /home, /lib, /opt, /root, /sbin, /usr
Large and slow SSD: /lost+found, /media, /mnt, /srv, /tmp, /var
RAM disk: /proc?, /dev?, /run

Is this reasonable?

  • 1
    That are very dependant of the distro, and for what it will be used. For example, if you have a web server in /var with a lot of uploads and downloads from the site, it will get more read/write operations in this folder. Can you be more specific? – Luciano Andress Martini Mar 25 at 15:04
  • @LucianoAndressMartini - It is mainly a development system (Devuan/Debian, C++, laptop). – Pietro Mar 25 at 15:13
  • 2
    that will be very specific for you, so first install everything in the more resistant (the rotative) device, and start meansuring for about 7 days of your normal using. This can help: unix.stackexchange.com/questions/356292/monitor-disk-writes-by-. Remember that ssds, are pretty faster with swap, but they dont like it (the durability can be reduced), but this depends in what you exactly want... – Luciano Andress Martini Mar 25 at 15:22
  • Since you did not describe your need, it is impossible to come up with an answer, because it would be completely different from one use case to another. Maybe you could get more specific? – Paradox Apr 2 at 12:19
1

For your use case (development) I'd say that /home is a very active r/w directory.

/srv is generally not used, unless you want to use it for development. Conventionally, server data (web sites, file storage, possibly sql databases, etc.) goes in there.

/opt is normally meant to contain additional (in fact optional) applications, those ones that are not installable via your distribution’s package manager.

/dev, /tmp, /run, are most most commonly configured as virtual, RAM-only, file-systems (tmpfs) by most mainstream Linux distributions.

/proc as well as /sys are indeed always virtual in-kernel file-systems.

/mnt is mostly a directory for temporary manual mountings, and it is hardly ever used by desktop systems as it is more commonly replaced by /media, which, in fact, you normally don’t have to worry about occupying any space or I/O bandwidth of any of your SSDs because the directories in there are actually just mount-points for removable medias.

/lost+found is not even a file-system per-se, it’s rather a maintenance directory specific of each mounted ext[234] file-system.

Lastly, consider using the noatime mount option on at least all the file-systems containing OS files or anyway mostly-read files, like /bin, /usr, /boot, /lib. You lose access times update of the files in there but you gain in speed and in SSDs non-degradation over time.

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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