View previous topic :: View next topic |
Author |
Message |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Fri Jun 02, 2006 6:03 pm Post subject: Howto reduce the time of startup? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
PaulBredbury Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/15669254994381f44a81f83.jpg)
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Jun 02, 2006 7:11 pm Post subject: |
|
|
See what's different in /usr/src/linux/.config between the 2 installations. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Fri Jun 02, 2006 7:55 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
GetCool Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1565351838445b15bd7c336.jpg)
Joined: 23 Nov 2003 Posts: 324 Location: Madison, Wisconsin
|
Posted: Fri Jun 02, 2006 8:03 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
brazzmonkey Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/169256772645a60277ad5cc.png)
Joined: 16 Jan 2005 Posts: 372 Location: between keyboard and chair
|
Posted: Fri Jun 02, 2006 8:28 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
GetCool Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1565351838445b15bd7c336.jpg)
Joined: 23 Nov 2003 Posts: 324 Location: Madison, Wisconsin
|
Posted: Fri Jun 02, 2006 8:41 pm Post subject: |
|
|
brazzmonkey wrote: | arch linux is able to start services in parallel |
Good to know ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Shan Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/The Matrix/movie_the_matrix_agent_smith.gif)
Joined: 04 Nov 2003 Posts: 558 Location: /dev/null
|
Posted: Fri Jun 02, 2006 9:54 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Fri Jun 02, 2006 11:50 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sat Jun 03, 2006 9:02 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sat Jun 03, 2006 10:47 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Sat Jun 03, 2006 6:39 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Sachankara l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/20654153364410b1c04b571.png)
Joined: 11 Jun 2004 Posts: 696 Location: Stockholm, Sweden
|
Posted: Sat Jun 03, 2006 8:05 pm Post subject: Re: Howto reduce the time of startup? |
|
|
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. ![Smile :)](images/smiles/icon_smile.gif) _________________ Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Sat Jun 03, 2006 9:29 pm Post subject: Re: Howto reduce the time of 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. ![Smile :)](images/smiles/icon_smile.gif) |
Could you expand on that please? _________________ Dont make it idiot proof, make it work.
Neucode.org
<suppressed key> |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sun Jun 04, 2006 10:32 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sun Jun 04, 2006 1:41 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Empire Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/54558074418936f16e8ca.jpg)
Joined: 06 Aug 2003 Posts: 94 Location: Europe / Switzerland
|
Posted: Sun Jun 04, 2006 2:38 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Sun Jun 04, 2006 5:57 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
GenYetiToo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/92930703541b36736a34b6.png)
Joined: 03 Feb 2004 Posts: 165 Location: Siegen, Germany
|
Posted: Sun Jun 04, 2006 6:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sun Jun 04, 2006 6:51 pm Post subject: |
|
|
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. ![Smile :)](images/smiles/icon_smile.gif) |
??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Sun Jun 04, 2006 7:05 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Sun Jun 04, 2006 7:17 pm Post subject: |
|
|
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. ![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sachankara l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/20654153364410b1c04b571.png)
Joined: 11 Jun 2004 Posts: 696 Location: Stockholm, Sweden
|
Posted: Mon Jun 05, 2006 11:32 pm Post subject: |
|
|
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. ![Smile :)](images/smiles/icon_smile.gif) |
??? | www.initng.org _________________ Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mirojira l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Feb 2006 Posts: 685
|
Posted: Tue Jun 06, 2006 3:26 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
beatryder Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1864706406445b6f8183868.jpg)
Joined: 08 Apr 2005 Posts: 1138
|
Posted: Tue Jun 06, 2006 5:13 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|