Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto reduce the time of startup?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Fri Jun 02, 2006 6:03 pm    Post subject: Howto reduce the time of startup? Reply with quote

I have installed Gentoo and Archlinux at the same machine. The startup of Gentoo is about 40 sec. and startup of Archlinux is under 20 sec. I know that Archlinux is i686-optimised. So I think that I could optimise also Gentoo for my machine if I had known how to do it before I installed Gentoo.

I have ASUS P4P800-VM, Intel Pentium 4, 2.8 GHz, 1G RAM

What should I do to tweak my Gentoo installation?


Last edited by mirojira on Fri Jun 02, 2006 7:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Jun 02, 2006 7:11 pm    Post subject: Reply with quote

See what's different in /usr/src/linux/.config between the 2 installations.
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Fri Jun 02, 2006 7:55 pm    Post subject: Reply with quote

you could also watch to see which services gentoo loads vs archlinux, and check their docs to see what CFLAGS, and LDFLAGS they use when compiling. If you do find that out. Post it here, I would be interested to see how they compare to mine.
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Fri Jun 02, 2006 8:03 pm    Post subject: Reply with quote

As a very rough observation, you can check the memory usage immediately after a reboot on both installations with "free -m".

This will at least tell you if more libraries are being copied to RAM when you boot Gentoo (which is usually proportional to the amount of services you have starting automatically, anything being preloaded, etc.).
Back to top
View user's profile Send private message
brazzmonkey
Guru
Guru


Joined: 16 Jan 2005
Posts: 372
Location: between keyboard and chair

PostPosted: Fri Jun 02, 2006 8:28 pm    Post subject: Reply with quote

arch linux is able to start services in parallel, by default gentoo isn't. you may want to give initng a shot (check the wiki, it is known to really speedup boot process - i haven't tried it myself though).
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Fri Jun 02, 2006 8:41 pm    Post subject: Reply with quote

brazzmonkey wrote:
arch linux is able to start services in parallel


Good to know :)
Back to top
View user's profile Send private message
Shan
Guru
Guru


Joined: 04 Nov 2003
Posts: 558
Location: /dev/null

PostPosted: Fri Jun 02, 2006 9:54 pm    Post subject: Reply with quote

Gentoo can do semi-paralell startup; checkout /etc/conf.d/rc and make sure you have RC_PARALLEL_STARTUP="yes"
_________________
{ NO -U } { STRIP }
{ TINY }
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Fri Jun 02, 2006 11:50 pm    Post subject: Reply with quote

update to baselayout-0.12. I did and shaved 20seconds off my boot time!
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sat Jun 03, 2006 9:02 am    Post subject: Reply with quote

Shan wrote:
Gentoo can do semi-paralell startup; checkout /etc/conf.d/rc and make sure you have RC_PARALLEL_STARTUP="yes"


I did not save almost nothing.

beatryder wrote:
update to baselayout-0.12. I did and shaved 20seconds off my boot time!


I can't find baselayout-0.12
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sat Jun 03, 2006 10:47 am    Post subject: Reply with quote

beatryder wrote:
you could also watch to see which services gentoo loads vs archlinux, and check their docs to see what CFLAGS, and LDFLAGS they use when compiling. If you do find that out. Post it here, I would be interested to see how they compare to mine.


There is only few info about compiling because Archlinux is binary package system. But it is possible to build own packages using command makepkg. In /etc/makepkg.conf is only:
Code:

########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
export CARCH="i686"
export CHOST="i686-pc-linux-gnu"
#-- Exclusive: will only run on i686 or higher (P6, Athlon)
export CFLAGS="-march=i686 -O2 -pipe"
export CXXFLAGS="-march=i686 -O2 -pipe"
#-- Optimized: will run on any x86, but optimized for i686
#export CFLAGS="-mcpu=i686 -O2 -pipe"
#export CXXFLAGS="-mcpu=i686 -O2 -pipe"
#-- Make Flags: change this for DistCC/SMP systems
#export MAKEFLAGS="-j2"
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Sat Jun 03, 2006 6:39 pm    Post subject: Reply with quote

mirojira wrote:
Shan wrote:
Gentoo can do semi-paralell startup; checkout /etc/conf.d/rc and make sure you have RC_PARALLEL_STARTUP="yes"


I did not save almost nothing.

beatryder wrote:
update to baselayout-0.12. I did and shaved 20seconds off my boot time!


I can't find baselayout-0.12


In baselayout-0.11.x the RC_PARALLEL_STARTUP is not actually parallel. Also baselayout-0.12 backgrounds the net.* init scripts.

See here: http://gentoo-portage.com/sys-apps/baselayout

you will have to unmask it.
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
Sachankara
l33t
l33t


Joined: 11 Jun 2004
Posts: 696
Location: Stockholm, Sweden

PostPosted: Sat Jun 03, 2006 8:05 pm    Post subject: Re: Howto reduce the time of startup? Reply with quote

Use init-ng (if you can make it work), or write your own init scripts on top of the SysV system. I've done the latter myself, and my Gentoo systems boot quite fast. Around 12-15 seconds from post to login on my 1.5 GHz laptop. :)
_________________
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Sat Jun 03, 2006 9:29 pm    Post subject: Re: Howto reduce the time of startup? Reply with quote

Sachankara wrote:
Use init-ng (if you can make it work), or write your own init scripts on top of the SysV system. I've done the latter myself, and my Gentoo systems boot quite fast. Around 12-15 seconds from post to login on my 1.5 GHz laptop. :)


Could you expand on that please?
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sun Jun 04, 2006 10:32 am    Post subject: Reply with quote

beatryder wrote:


In baselayout-0.11.x the RC_PARALLEL_STARTUP is not actually parallel. Also baselayout-0.12 backgrounds the net.* init scripts.

See here: http://gentoo-portage.com/sys-apps/baselayout

you will have to unmask it.


It is baselayout-1.12.x isn't it?
It is very 1th time when I use command ebuild. Following http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds I succefully made digest. But trying unpacking I'v got
Quote:

localhost miro # ebuild /usr/local/portage/sys-apps/baselayout/baselayout-1.12.0-r1.ebuild unpack
>>> md5 files ;-) baselayout-1.12.0-r1.ebuild
>>> md5 files ;-) files/digest-baselayout-1.12.0-r1
>>> md5 src_uri ;-) baselayout-1.12.0.tar.bz2
>>> Unpacking source...
>>> Unpacking baselayout-1.12.0.tar.bz2 to /var/tmp/portage/baselayout-1.12.0-r1/work

* Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is:
*
* /usr/local/portage/sys-apps/baselayout/files/baselayout-1.12.0-svn-2046.patch
* ( baselayout-1.12.0-svn-2046.patch )


!!! ERROR: sys-apps/baselayout-1.12.0-r1 failed.
!!! Function epatch, Line 196, Exitcode 0
!!! Cannot find $EPATCH_SOURCE!
!!! If you need support, post the topmost build error, NOT this status message.

In directory /usr/local/portage/sys-apps/baselayout/files/ is not patch but baselayout-1.12.0-r1.ebuild

I need a bit of advice.
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sun Jun 04, 2006 1:41 pm    Post subject: Reply with quote

I solved problem ( wrong path to directory with .patch ) and finished the ebuild. Restarted and find out that network was not started and startx doesn' t work.
I manually set the conection, masked baselayout-1.12 and went back to the baselayout-1.11. Reboot and the same problem. I have fixed network connection
adding module e100 into /etc/module.autoload/kernel-2.6 which was overwritten. I am just looking for the reason why I can't run startx.
So I have lost courage to continue until I won't have the new instruction from you.
Back to top
View user's profile Send private message
Empire
Tux's lil' helper
Tux's lil' helper


Joined: 06 Aug 2003
Posts: 94
Location: Europe / Switzerland

PostPosted: Sun Jun 04, 2006 2:38 pm    Post subject: Reply with quote

You probably want to take a look at /var/log/Xorg.0.log
_________________
One of the great mistakes is to judge policies and
programs by their intentions rather than their results.
Milton Friedman
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Sun Jun 04, 2006 5:57 pm    Post subject: Reply with quote

mirojira wrote:
beatryder wrote:


In baselayout-0.11.x the RC_PARALLEL_STARTUP is not actually parallel. Also baselayout-0.12 backgrounds the net.* init scripts.

See here: http://gentoo-portage.com/sys-apps/baselayout

you will have to unmask it.


It is baselayout-1.12.x isn't it?
It is very 1th time when I use command ebuild. Following http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds I succefully made digest. But trying unpacking I'v got
...
I need a bit of advice.


Yes I meant 1.12.x. and why the hell are you using the ebuild command to install it ???


do this:

Code:

# echo "sys-apps/baselayout" >> /etc/portage/package.keywords
# emerge -av baselayout

_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
GenYetiToo
Apprentice
Apprentice


Joined: 03 Feb 2004
Posts: 165
Location: Siegen, Germany

PostPosted: Sun Jun 04, 2006 6:51 pm    Post subject: Reply with quote

beatryder wrote:
update to baselayout-0.12. I did and shaved 20seconds off my boot time!
you will have to unmask it.
... and you have to name it baselayout-1.12
;-)
Markus
_________________
Cats, cats everywhere ...
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sun Jun 04, 2006 6:51 pm    Post subject: Reply with quote

beatryder wrote:


Yes I meant 1.12.x. and why the hell are you using the ebuild command to install it ???



Well I read in http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds that using emerge -av <package> could be dangerous.
But this time I made emerge -av baselayout . Unfortunatelly I do not see any difference in the startup.
Sachankara wrote:


Use init-ng (if you can make it work), or write your own init scripts on top of the SysV system. I've done the latter myself, and my Gentoo systems boot quite fast. Around 12-15 seconds from post to login on my 1.5 GHz laptop. :)


???
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Sun Jun 04, 2006 7:05 pm    Post subject: Reply with quote

GenYetiToo wrote:
beatryder wrote:
update to baselayout-0.12. I did and shaved 20seconds off my boot time!
you will have to unmask it.
... and you have to name it baselayout-1.12
;-)
Markus


I already corrected that! :p

@mirojira make sure that in /etc/conf.d/rc RC_PARALLEL_STARTUP=yes
_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Sun Jun 04, 2006 7:17 pm    Post subject: Reply with quote

beatryder wrote:

@mirojira make sure that in /etc/conf.d/rc RC_PARALLEL_STARTUP=yes


I set up the variable RC_PARALLEL_STARTUP=yes and saved 5 sec. :D
Back to top
View user's profile Send private message
Sachankara
l33t
l33t


Joined: 11 Jun 2004
Posts: 696
Location: Stockholm, Sweden

PostPosted: Mon Jun 05, 2006 11:32 pm    Post subject: Reply with quote

mirojira wrote:
Sachankara wrote:


Use init-ng (if you can make it work), or write your own init scripts on top of the SysV system. I've done the latter myself, and my Gentoo systems boot quite fast. Around 12-15 seconds from post to login on my 1.5 GHz laptop. :)


???
www.initng.org
_________________
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Tue Jun 06, 2006 3:26 pm    Post subject: Reply with quote

Sachankara wrote:

www.initng.org


I have already read it and also http://gentoo-wiki.com/Initng. There are described two differt method of installing. Which one I should follow?
I am LILO user. There in wiki is described lilo too. Does it mean that I could start gentoo with or without initng?

Quote:

# Working
image = /boot/kernel-2.6.11-gentoo-r9
root = /dev/hda2
label = Gentoo-2.6.11-r9
read-only

# init-ng Test
image = /boot/kernel-2.6.11-gentoo-r9
root = /dev/hda2
label = Gentoo-2.6.11-r9-initng
append = "init=/sbin/initng"
read-only
Back to top
View user's profile Send private message
beatryder
Veteran
Veteran


Joined: 08 Apr 2005
Posts: 1138

PostPosted: Tue Jun 06, 2006 5:13 pm    Post subject: Reply with quote

I would follow the instruction on initng.org to use their overlay, and use the wiki to show you how to use it with lilo.

Here is a conversion for you:

grub.conf:

# boot with InitNG
title Gentoo GNU/Linux (2.6.15) (InitNG)
root (hd,0)
kernel /boot/linux-2.6.15 root=/dev/ROOT init=/sbin/initng
initrd /boot/initrd.gz


becomes
lilo.conf:

label Gentoo GNU/Linux (2.6.15) (InitNG)
image =  /boot/linux-2.6.15
root =  /dev/ROOT #replace with your root partition
initrd = /boot/initrd.gz
append ="init=/sbin/initng"
read-only

_________________
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum