Pondering e4rat - will it speed up GNU/Linux boot times?

This morning I read of e4rat which will purportedly significantly reduce GNU/Linux users boot times (for those with ext4 / partition (which is nominal)). e4rat ? Stands for “Ext4 - Reducing Access Times” and it purportedly is a toolset to accelerate the boot process as well as application startups. Through physical file reallocation e4rat purports to eliminate both seek times and rotational delays.

The project home page is here with some interesting boot charts: e4rat of which I show some thumbnail versions (same time scale) below:

The example on that web site with boot charts shows the boot process of an freshly installed Debian Squeeze. The process includes the startup of the Gnome desktop and the Iceweasel browser. The computer is equipped with a E8200 Intel CPU and a Western Digital WD2500YS-01S hard drive with a total size of 250 GB. At the time of the experiment, only three percent of the entire filesystem were in use.


And this is the result of using e4rat:

Of course no one can read the thumbnail images I put above - but please note the time scales are the same and the colours being very short on the bottom image illustrate the boot time improvement. Again, go to e4rat in order to get the extensive details on this !

There is a wiki page here with guidance on how to use it: Main Page - E4rat

There is an article here on it: How To Cut Your Linux PC’s Boot Time in Half With E4rat - How-To Geek

And I note it is already packaged by some users for openSUSE , with a search providing this: software.opensuse.org: Search Results

Some interesting quotes here (with a warning that SSD users should stay away ! ) :

E4rat is a utility that’s designed to cut your Linux boot time drastically. Essentially you show it what you do when you start your computer normally, and it analyzes the files you access and use. Then, it’ll move them to the beginning of your hard disk so that it takes less time to find them during boot.

E4rat is designed to work with Ext4 partitions only. If you’re using another file system, this isn’t for you. There are reports of it working with LVM but your mileage may vary, so be careful if you have sensitive data.

Furthermore, if you have an SSD, you should stay away from this. Because E4rat moves files for a better seek time, SSD uses won’t see any benefit as their “seek” time is unaffected by this. By moving files and performing extended writes, you may even end up damaging your already-blazing-fast drive.

The source forge page is here: e4rat - Browse Files at SourceForge.net (with version 0.2.1 being the most current version).

Me ? I am the VERY conservative sort, and I have not yet tried this.

I would be worried that the parallel boot process of openSUSE could have problems with this application. But that is a ‘worry’ not supported by any testing nor by any facts.

I guess I should try it sometime. I do have a ‘sandbox’ PC on which I can play. And I see someone has even packaged it for factory: software.opensuse.org: Search Results (as of the time I type this blog) …

Do any openSUSE users have experience with this ?

I made an initial attempt at this, but failed.

I installed e4rat using a repository in factory. I started it from grub (options line) using the boot code:


but no /var/lib/e4rat/startup.log file was created, which is necessary for the next step.

Checking the /var/log/warn file I noted this error :

Aug  7 19:01:45 stonehenge01 kernel:    54.209150] [e4rat-collect] Process auditd [1148] has captured the audit socket.
Aug  7 19:01:45 stonehenge01 kernel:    54.209316] [e4rat-collect] e4rat-collect is in conflict with auditd. Abort

(where stonehenge01 is the name of the PC I am using).

So for some reason e4rat-collect is aborting early and not creating the /var/lib/e4rat/startup.log that it is supposed to create.

If you manually create the /var/lib/e4rat directory how does it then go?

The /var/lib/e4rat directory was created without me having to do this. But the same abort occurs as logged in the /var/log/warn file.

Above I noted this error:

I finally got around tonight to doing a surf on it and I encountered this archlinux page: https://wiki.archlinux.org/index.php/E4rat where they suggest:

It appears to me the conflict with auditd could be the problem.

Of course there is no rc.conf in openSUSE. Instead one can go to YaST > System > System Services (run level) and in there on can see ‘auditd’ is a service that can be stopped. I note it is a ‘daemon that provides core auditing services’ …

I may try stopping auditd later this week, and see then if I can get e4rat to run for few reboots (before re-enabling auditd).

I have tried e4rat on openSUSE 11.3 and it reduced the boot time of 50s by 10 seconds. The boot time dropped by 5s after the reallocation and by 5s after adding the preload command. This was on an old WD80GB harddrive. The system boots now as fast as a freshly installed system or maybe even a few seconds faster. Nice!

Some time ago there was a program that did a similar realignment for a LiveCD iso file (www.alpha.co.jp/biz/rdg/ac-knoppix/index_en.html). This was a really great idea, but for some reason it was not adopted by big distributions. I wonder whether e4rat is going to have a better future?

I was previously testing this on openSUSE-12.1 Milestone3. I updated that to Milestone-4 (from factory with the ‘zypper dup’ command) and then after a successful update (and some testing) I decided to try e4rat again. This time I went to YaST > System > System services (runlevel) and disabled ‘auditd’.

e4rat then successfully ran, as the boot code " init=/usr/sbin/e4rat-collect " , which successfully created the /var/lib/e4rat/startup.log and then after ‘init 1’ I was able to run ’ /usr/sbin/e4rat-realloc /var/lib/e4rat/startup.log ’ and then restart with the boot code ’ init=/usr/sbin/e4rat-preload’.

I think this may have shaved about 5 seconds or possibly a bit more off of the boot. ie from about 65 seconds to 60 or 55 seconds for LXDE desktop to completely come up. I definitely did NOT see any 50% improvement. More like 10% to 15% for me.

I did note a significant improvement in the time to launch firefox (as I had included that in my e4rat collection). Possibly a 30% improvement in start time for that app.

I tried to capture the before/after boot chart, but I struggled. I was easily able to obtain the boot chart (with bootchartd) before trying with e4rat. But after I optimized the ext4 and then tried to capture with the boot chart, I could not get both ‘e4rat-preload’ and ‘bootchartd’ to load at the same time.

I tried the boot code command:

init=/sbin/bootchartd boot_init=/usr/sbin/e4rat-preload

but boot chart would not run at same time as e4rat.

I think I have exceeded my knowledge as to how to use the init command as a boot code when multiple parameters are to be loaded.