You are not logged in.

#26 2011-12-06 11:23:59

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: Improved e4rat-preload

There is another thing that maybe could be integrated in the WIKI: I would really like to see how e4rat runs with pre-allocation ioctl. Sadly, I didn't got a Kernel-patch for testing this.

Has anyone got this working?

Offline

#27 2011-12-06 13:00:13

sploit
Member
Registered: 2011-11-26
Posts: 11

Re: Improved e4rat-preload

Improved the PKGBUILD to search for the right configuration and patch the source. Anyone care to test?

https://aur.archlinux.org/packages.php?ID=54631

This is where we're at now:

build() {
  cd "$srcdir/$pkgname-$pkgver"
  
  echo " "
  echo "Searching for startup.log"
  e4rat_list=`grep startup_log_file /etc/e4rat.conf | grep -v ";" | grep -v grep | awk '{print $2}'`
  src_list=`grep "#define LIST" e4rat-preload-lite.c | grep -v grep | awk '{print $3}'` 
  echo " -> $e4rat_list"
  if [ $e4rat_list ] && [ -f $e4rat_list ]
  then
    sed -i "s|$src_list|\"$e4rat_list\"|g" e4rat-preload-lite.c
    echo "Patched e4rat-preload-lite.c for $e4rat_list"
  else
    echo 'Using default startup.log location, no need to patch'
  fi
  echo " "

  echo "Searching for init configuration"
  e4rat_init=`grep init /etc/e4rat.conf | grep -v ";" | grep -v grep | awk '{print $2}'`
  src_init=`grep "#define INIT" e4rat-preload-lite.c | grep -v grep | awk '{print $3}'`
  echo " -> $e4rat_init"
  if [ $e4rat_init ] && [ -x $e4rat_init ]
  then
    sed -i "s|$src_init|\"$e4rat_init\"|g" e4rat-preload-lite.c
    echo "Patched e4rat-preload-lite.c for $e4rat_init"
  else
    echo 'Using default /sbin/init, no need to patch'
  fi
  echo " "

  gcc -std=c99 -Wall -O2 -o e4rat-preload-lite e4rat-preload-lite.c
  strip -s e4rat-preload-lite
  echo "Finished compiling e4rat-preload-lite"
}

Edit: Added -lite to the wiki: https://wiki.archlinux.org/index.php/E4 … eload-lite

Last edited by sploit (2011-12-06 18:44:35)

Offline

#28 2011-12-07 20:30:08

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: Improved e4rat-preload

Works fine for me.

Offline

#29 2011-12-07 21:49:53

kyla
Member
From: Arlington, VA
Registered: 2011-03-12
Posts: 112
Website

Re: Improved e4rat-preload

Works fine for me as well. Thanks !

Offline

#30 2011-12-08 11:08:12

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: Improved e4rat-preload

Seems to work fine here as well. Also, you probably want to add "e4rat-preload" as dependency in the PKGBUILD.

Offline

#31 2011-12-09 10:40:35

Lothium
Member
Registered: 2009-10-10
Posts: 192

Re: Improved e4rat-preload

Wow thanks a lot! It speeds up my boot process for a few seconds! Good work!

Offline

#32 2011-12-20 13:33:24

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: Improved e4rat-preload

Thorsten Reinbold wrote:

There is another thing that maybe could be integrated in the WIKI: I would really like to see how e4rat runs with pre-allocation ioctl. Sadly, I didn't got a Kernel-patch for testing this.

Has anyone got this working?

Pushing this question. Has anyone tried this?


Another thing. Maybe the question is dumb, but would it be possible to run the realloc-process from, lets say, a LiveCD to get ALL files prozessed? Even if you run it in init1, not all files are processible.

Offline

#33 2011-12-30 14:20:16

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Improved e4rat-preload

Hello everyone!
For me, e4rat-preload-lite didn't work at all. Well, almost. It sat for close to 60 seconds (!) with the message "Loading xxxx files" before init finally kicked in and the system booted.
Weird! My startup.log has 2400-something files though - could that be the problem? I like to have e4rat preload lots of stuff, even firefox and tmux.  Is that bad?

Offline

#34 2011-12-30 15:10:23

sploit
Member
Registered: 2011-11-26
Posts: 11

Re: Improved e4rat-preload

abstrakct wrote:

Hello everyone!
For me, e4rat-preload-lite didn't work at all. Well, almost. It sat for close to 60 seconds (!) with the message "Loading xxxx files" before init finally kicked in and the system booted.
Weird! My startup.log has 2400-something files though - could that be the problem? I like to have e4rat preload lots of stuff, even firefox and tmux.  Is that bad?

Nop, I do exactly the same, I preload services + desktop environment smile

Offline

#35 2012-01-18 18:30:15

quiquex
Member
Registered: 2011-01-25
Posts: 35

Re: Improved e4rat-preload

System:
AMD 64 X2 6000+ 3.1Ghz
4GB RAM DDR2-800
WD Caviar SATAII 7200RPM 500GB
DE: Gnome-Shell (lots of daemons and extensions running)

Without E4rat
56s

With E4rat
32s - 42% Faster

With E4rat+Improved preload
30s - 46% Faster

Last edited by quiquex (2012-01-18 18:31:15)

Offline

#36 2012-04-07 14:53:30

Sachiru
Member
Registered: 2012-04-07
Posts: 1

Re: Improved e4rat-preload

Would it be possible to modify this so that it can accept a command-line argument to specify the number of files to preload before continuing with boot, instead of being statically set to 100?

Offline

#37 2013-02-20 23:34:19

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: Improved e4rat-preload

Just installed this, where does it keep it's config?
I tried booting with it but I just get kernel panics complaining that /var/lib/e4rat/startup.log doesn't exist (even though it does and e4rat-preload works fine)

Offline

#38 2013-02-21 12:07:54

Ax
Member
Registered: 2012-12-18
Posts: 2

Re: Improved e4rat-preload

hello kaipee,

First, you have to collect boot-process log by e4rat-collect.
And then run this command by root,

e4rat-realloc  /var/lib/e4rat/startup.log

Finally, try reboot with e4rat-preload.

Files you have to edit are;
1. /etc/e4rat.conf
2. /your/bootloader/config file

Anyway, it'd be better to read wiki E4rat beforehand.

Offline

#39 2013-02-21 12:30:36

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: Improved e4rat-preload

Cheers Ax - already done all that (note the bit where e4rat-preload works fine)

installed
checked config
added to syslinux kernel options
rebooted, waited specified time
ran systemctl rescue
ran e4rat-realloc  /var/lib/e4rat/startup.log
changed syslinux kernel to /usr/bin/e4rat-preload-lite
rebooted and got kernel panics

Last edited by kaipee (2013-02-21 12:31:16)

Offline

#40 2013-02-21 12:54:47

Ax
Member
Registered: 2012-12-18
Posts: 2

Re: Improved e4rat-preload

Kaipee, I'm sorry I didn't read you did it all.
I installed e4rat today with newely installed Arch linux, and it works fine for me.
Did you tried "ls" or "find" to check whether startup.log were made or not after runnning e4rat-realloc?

Offline

#41 2013-02-21 12:56:15

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: Improved e4rat-preload

It's not e4rat that is the problem, it is this custom remake e4rat-preload-lite

Offline

Board footer

Powered by FluxBB