It is currently Mon May 20, 2013 3:16 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to boot faster
PostPosted: Tue Mar 06, 2007 10:36 am 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
After some modifications to scripts in /etc/rc.d/ I have managed to save 6 seconds at boot time. My question is: are there any other services I can remove ? (I also want be on the safe side, so I also need stability). Here are the bootcharts:

Before:
Image

After:
Image

1) ldconfig... Is it really necessary?
2) I don't use suspend to disk or to ram. Is it safe to remove acpid?
3) Is cron used by the system? I don't have any cron jobs.
4) Any other ways I can make this PC boot faster?
5) Is it safe to remove any
Quote:
#### Progress bar ####
[ "$SPLASHSCREEN" = "yes" ] && progressbar 55 &

...I have this in lilo.conf --> append="splash=silent quiet " and also prefer watching the nice text on the screen so no spashscreen with progressbar (I have Zenwalk appearing upper left).

sensors = lm_sensors (I need that)
mpd = I like listening to music even when I'm not using X
athon = a script I made to activate power saving mode (here is the link)

edit:
- I boot to text mode (init 3)

- I'm trying to make my PC boot under 20 seconds

- my hardware: AMD AthlonXP 1700+, 384MB DDR400 Kingmax RAM, Gigabyte KT600 GA-7VT600 (K7 Triton), WD 40GB 8Mb cache, RIVA TNT2 M64 Pro 32MB, Asus CD-ROM, on-board sound, on-board network card

- kernel is 2.6.18.6-k7-rev7z (revision 7 zenwalk) - just took the zenwalk 2.6.18.6 kernel and hardcore stripped anything I don't need (hope nothing I actualy need), like suspend2.

LATER EDIT
Image


Last edited by energiya on Wed Mar 07, 2007 12:56 pm, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 1:29 pm 

Interesting topic  :D

I think it would be nice to have a buildscript where you can simply enable/ disable the things you want/ do not want.

The scripts of ZW are great and ZW is booting faster then most other Linux distro's, but it is still possible to win some time when tweaking it/ just using the things you want to be enabled at your system.

May be, just may be;
a small list of the things probed/ enabled in the scripts when available, to start the script with.
a # to disable it.
A way could be using functions in the scripts and calling those functions when needed.
This way it is very simple to enable just what you need.

But again, just thoughts. I know JP has thought a long time about the scripts and has done a great job.
It is important not to loose functionality, stability and simplicity in this.

Btw, already tried the same thing and had a bootscript less then one screen height.
Booting was indeed much faster (more then 5 seconds difference, what is noticable) without loosing functionality.
Unfortunately lost it when I did something stupid....  :-\


Last edited by Lontronics on Tue Mar 06, 2007 1:31 pm, edited 1 time in total.

  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 1:38 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
For the time, 21 seconds is the best I can get without all kind of warnings. I did push the limit (wanted to see how much can I get) and managed to boot in 16 seconds, but this needed major modifications, and... a lot of warnings like "couldn't mount bla", swap errors, "couldn't bla", but it still worked! X and sound were down (no swap) but I could still repair everything.

I searched the web and found eInit (supposed to be faster than InitNG). Too bad it can't be used with Zenwalk, and even if it could... I wouldn't trust it  ;D

Lontronics wrote:
May be, just may be;
a small list of the things probed/ enabled in the scripts when available, to start the script with.
a # to disable it.
A way could be using functions in the scripts and calling those functions when needed.
This way it is very simple to enable just what you need.

or even an idiot-proof dialog based script. Would be nice not having to risc it all modifying scripts and making improvisations.


Last edited by energiya on Tue Mar 06, 2007 2:08 pm, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 2:18 pm 

Use a fixed IP address in stead of DHCP.


  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 3:28 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Mon Aug 28, 2006 11:57 am
Posts: 1040
Location: Karlsruhe, Germany
Why is modprobe called twice? Do you use netfilter? otherwise you could disable it.
Hmm, i wonder about CRON too. Is is needed if I dont add jobs to it? Then there are about 2secs ob "sleep" in there which I dont really see the use for...

_________________
...and just when you thought, the shadows were safe...


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 3:50 pm 

DodoFXP wrote:
Why is modprobe called twice?

It's actually called three times. Twice by udevd and once for the netfilter modules. But why do you see this as a problem? There is no need for e.g. the modules for networking to wait for e.g. the modules for sound. They can be loaded at the same time.


  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 3:51 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
DodoFXP wrote:
Why is modprobe called twice? Do you use netfilter? otherwise you could disable it.
Hmm, i wonder about CRON too. Is is needed if I dont add jobs to it? Then there are about 2secs ob "sleep" in there which I dont really see the use for...


- yes, I use netfilter (i like knowing that I have some firewall protection)
- I don't know if cron is used by the system, because I don't use it, but just to be sure I'm going to leave it until I see what is going on

- I'm going to further # rc.scanluns, because the only USB think I have is a USB flash memory stick and I don't need to mount it every day.
- I'm going to try using a fixed Ip as Tibors said even thow my ISP delivers IP, gateway and DNS using dhcp.

edit: Can't use fixed IP. It kills my internet connection so I'll keep it to dhcp.


Last edited by energiya on Tue Mar 06, 2007 3:57 pm, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 4:53 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
Sorry about the double post, but the other one was quite large  :P
I have now removed cron and also made additional tweaks in rc.S and managed to get a constant 17 seconds boot without warning or errors.
Image
Image
(Why can't I use table so that the images show more nicely?)

Unfortunately they don't look that safe too me. Anyway, if I recompile the kernel and remove the bootsplash patch and also remove any bootsplash related lines in the rc.* scripts will gain an aditional 2 seconds. If I would also to deactivate netfilter, lm_sensors, athon and mpd...  :o ::) who knows, maybe really close to 10 seconds...  from 27 seconds (I would have loved to check how much would take too boot on the default Zenwalk kernel, lets say 30 seconds)


Last edited by energiya on Tue Mar 06, 2007 5:01 pm, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 5:17 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Wed Oct 25, 2006 4:47 pm
Posts: 582
Location: ever closer to bliss ....
I'll race u for ur pink.

_________________
ThinkZen member #000
Proud Thinkpad Zenwalker


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 5:26 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
sweetnsourbkr wrote:
I'll race u for ur pink.

I don't think my hardware can do much better than this. The kernel is hardcore stripped (except the bootsplash patch), the scripts the same (almost). The only think I can do would be to change the Init, but I still want to be able too boot the PC, so this is out. Maybe you can manage to do this tweaking better and make a tutorial ;D Maybe a precahe?

I never though I could gain 10 seconds by cleaning the init scripts...


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 6:32 pm 
Regular Zenwalker
Regular Zenwalker

Joined: Fri Feb 23, 2007 9:15 pm
Posts: 34
Yes, ldconfig is not needed during boot.  Slackware put that there just in case.  I suppose it is in case a user installs a library and then neither the install script nor the user runs ldconfig, and the user tries rebooting to fix things.

Have you removed fc-cache, also in /etc/rc.d/rc.M?  That's another one that's not needed during boot.  Only need that when changes are made to the fonts in XWindows.


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 6:36 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
Yes, removed fc-cache... I'm now going to also remove ldconfig. The only one that I don't know if its safe to remove is the acpi deamon.


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 7:18 pm 
Promo Team
Promo Team
User avatar

Joined: Sun Mar 19, 2006 7:53 pm
Posts: 1607
Location: Denmark
I suppose you could try to boot with the acpi=off kernel parameter. ACPI = Advanced Configuration and Power Interface so you should be able to live without it if you don't need power management facilities (power-down / stand-by).

Best regards,
Claus


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 8:46 pm 
Master Zenwalker
Master Zenwalker
User avatar

Joined: Fri Feb 09, 2007 8:40 pm
Posts: 529
Location: Romania
Thanks! I removed ldconfig and acpid but added crond (see /etc/cron.daily/logrotate and slocate) and now it takes only 15 seconds to boot.

I'm leaving kernel support for acpi so that I can power-off. I read somewhere that acpid will only influence stand-by/hibernate (and so it seems, as i can power-off), but suspend2ram didn't work for me because of my legacy nvidia driver, and suspend2 worked only from init 3 (and when resuming, network off, sound off)


 Profile Send private message  
 
 Post subject: Re: How to boot faster
PostPosted: Tue Mar 06, 2007 8:48 pm 

Hi Energiya,

What filesystem are you using?

I am asking because there is a lot of difference in mounting the different filetypes.
For example reiser4fs is taking very long, and ext2 is one of the fastest.

Just curious ;)


  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: