I wonder how much data in total does a freshly installed vanilla Linux system (like 32-bit CentOS 5.10) read in order to get to a virtual console shell prompt? You know, reading all the configuration files, loading binaries, kernel image, etc.
I am booting 100s of Linux machines, and 95% of their system contents are identical and will remain identical – the machines are clones. I would like to offload the identical/read-only shared part of the filesystem, to an NFS storage, mount it from there, and boot like that. Only writeable part of the filesystem, like /var, /tmp and /home, will remain local to each machine. Since potentially hundred machines may boot simultaneously as part of a "cluster", I need to estimate whether the accessed NFS storage link will be a bottleneck while booting from.
I am looking for order-of-magnitude estimates. I am aware that Linux boot varies greatly with regards to details of the process. Are we talking 10Mb? 100Mb? 1Gb?
Best Answer
Install one system, boot it and check out the block layer statistics from
/sys/block/${DEV}/stat
e.g./sys/block/sda/stat
.Quoting from the documentation:
You can use this one-liner to get the number of bytes more easily:
Results for Scientific Linux 6.1 i386
I tested this on a KVM/qemu virtual machine running Scientific Linux 6.1 i386 (which is similar to RHEL). The following services were enabled: acpid, auditd, crond, network, postfix, rsyslog, sshd and udev-post. The swap is on a separate disk, so it's not taken into account.
The stats for 85 boots, taken remotely with SSH a couple of seconds after the login prompt appeared, were:
The boot time was around 20 seconds.