The case for the /usr merge
The case for the /usr merge
Posted Jan 27, 2012 0:42 UTC (Fri) by tchernobog (subscriber, #73595)In reply to: The case for the /usr merge by cantsin
Parent article: The case for the /usr merge
The idea of having /usr containing everything a system might want after booting (in terms of shared resources) is better, especially if you want to share it as a network filesystem or mount different guest systems using the same kernel.
For instance, to keep updated a distributed environment like a university lab you wouldn't have to care if running an update writes in /usr/bin (only one instance in the network, you update it centrally) or in /bin (changes need to be propagated manually).
Having /var and /etc in the root is because they offer different assets than /usr: they are machine-specific: each machine has its own version with its own configuration and spool directories (think of /var/mail). Binaries and shared files instead pertain to /usr.
Incidentally, if you were to put the whole /usr on a slower disk, considering 90% of libraries in use by a running system are in /usr/lib(64) and executables are in /usr, you wouldn't perceive much of a difference in performance. You'd waste your money on a SSD then. If you want to check, just try opening the normal applications you use (I don't know: firefox, evolution, libreoffice...) and run:
sudo lsof | awk '$9 ~ /^\/([s]?bin|lib)/ { print $9; }' | sort | uniq | wc -l
sudo lsof | awk '$9 ~ /^\/usr\/([s]?bin|lib)/ { print $9; }' | sort | uniq | wc -l
This actually doesn't tell you the whole story, because it should be seen also how many files are read at application startup from other directories such as /usr/share (all icons, desktop files, resources, databases, etc.). That bumps up the number considerably.
