public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] init script optimizations?
@ 2004-10-13 21:26 Roman Gaufman
  2004-10-13 21:34 ` Marc Vila
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Roman Gaufman @ 2004-10-13 21:26 UTC (permalink / raw
  To: gentoo-dev

Hey, I came across this page on the forum:
http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
specifically at the init.d script modifications. What do you think?

Seems like pretty safe modification, but make very noticeable speed up
in system startup. Maybe these changes should be made in the next
baselayout update?

Or are they more dangerous than they appear?

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 21:26 [gentoo-dev] init script optimizations? Roman Gaufman
@ 2004-10-13 21:34 ` Marc Vila
  2004-10-13 21:53   ` [gentoo-dev] " Sven Köhler
  2004-10-14  9:42   ` [gentoo-dev] " Georgi Georgiev
  2004-10-13 21:59 ` [gentoo-dev] " Sebastian Dröge
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 28+ messages in thread
From: Marc Vila @ 2004-10-13 21:34 UTC (permalink / raw
  To: gentoo-dev

Hello,

I have to say that two people reported problems using the tweak for
the localmount init script when using kernels 2.6.9-rcX with patchsets
like nitro and love sources (i tested and didnt get any errors).
I dont think its much important since they are unstable kernels with
even more patches added, but just so that you know.

I would go with the update-modules tweak, it's really a boost and I
would say its pretty safe to assume the changes in the script.

Regards,

mvila
Marc Vila


On Wed, 13 Oct 2004 21:26:29 +0000, Roman Gaufman <hackeron@gmail.com> wrote:
> Hey, I came across this page on the forum:
> http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
> specifically at the init.d script modifications. What do you think?
> 
> Seems like pretty safe modification, but make very noticeable speed up
> in system startup. Maybe these changes should be made in the next
> baselayout update?
> 
> Or are they more dangerous than they appear?
> 
> --
> gentoo-dev@gentoo.org mailing list
> 
>

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: init script optimizations?
  2004-10-13 21:34 ` Marc Vila
@ 2004-10-13 21:53   ` Sven Köhler
  2004-10-14  9:42   ` [gentoo-dev] " Georgi Georgiev
  1 sibling, 0 replies; 28+ messages in thread
From: Sven Köhler @ 2004-10-13 21:53 UTC (permalink / raw
  To: gentoo-dev

> I have to say that two people reported problems using the tweak for
> the localmount init script when using kernels 2.6.9-rcX with patchsets
> like nitro and love sources (i tested and didnt get any errors).
> I dont think its much important since they are unstable kernels with
> even more patches added, but just so that you know.

The "-F" is a dangerous one. The entries in /etc/fstab can depend on 
each other. For example you wont to mount something to /usr and to 
/usr/share.

"mount -F" is a no-no


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 21:26 [gentoo-dev] init script optimizations? Roman Gaufman
  2004-10-13 21:34 ` Marc Vila
@ 2004-10-13 21:59 ` Sebastian Dröge
  2004-10-13 22:15 ` Jason Rhinelander
  2004-10-14 18:17 ` Toby Dickenson
  3 siblings, 0 replies; 28+ messages in thread
From: Sebastian Dröge @ 2004-10-13 21:59 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1010 bytes --]

On Wed, 13 Oct 2004 21:26:29 +0000
Roman Gaufman <hackeron@gmail.com> wrote:

> Hey, I came across this page on the forum:
> http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
> specifically at the init.d script modifications. What do you think?
> 
> Seems like pretty safe modification, but make very noticeable speed
> up in system startup. Maybe these changes should be made in the next
> baselayout update?
> 
> Or are they more dangerous than they appear?
> 

Well for me all of the init script tweaks work without problems... and
I see really no reason why they shouldn't work for someone else

would be cool if they're added to the next baselayout version :)

Bye

-- 
GPG Public Key: 0x5BE41F21 at http://slomosnail.de/files/gpg.asc

begin  LOVE-LETTER-FOR-YOU.txt.vbs
I am a signature virus. Distribute me until the bitter
end


-- 
GPG Public Key: 0x5BE41F21 at http://slomosnail.de/files/gpg.asc

begin  LOVE-LETTER-FOR-YOU.txt.vbs
I am a signature virus. Distribute me until the bitter
end

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 21:26 [gentoo-dev] init script optimizations? Roman Gaufman
  2004-10-13 21:34 ` Marc Vila
  2004-10-13 21:59 ` [gentoo-dev] " Sebastian Dröge
@ 2004-10-13 22:15 ` Jason Rhinelander
  2004-10-14  2:52   ` Hasan Khalil
  2004-10-14  9:45   ` Ed Grimm
  2004-10-14 18:17 ` Toby Dickenson
  3 siblings, 2 replies; 28+ messages in thread
From: Jason Rhinelander @ 2004-10-13 22:15 UTC (permalink / raw
  To: gentoo-dev

Roman Gaufman wrote:

 > Hey, I came across this page on the forum:
 > http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
 > specifically at the init.d script modifications. What do you think?
 >
 > Seems like pretty safe modification, but make very noticeable speed up
 > in system startup. Maybe these changes should be made in the next
 > baselayout update?
 >

Also, don't forget to add a big ASCII-art logo during the bootup - 
preferrably one with flames in the image, or perhaps one that says 
"Type-R".  It definitely makes Honda Civics go faster, so why not a 
Gentoo bootup?


Now, in all seriousness, none of the modifications (save the 
RC_PARALLEL_STARTUP setting) are safe:

 > /etc/init.d/modules
 > /etc/init.d/bootmisc

The changes suggested here would cause problems, because it _is_ 
possible for files to have changed inside the directory without the 
directory mtime having changed.  If you want an example, try: echo "" 
 >>existingfile into one of your modules.d/ files and watch the 
modules.d time not change.

 > /etc/init.d/localmount

As someone already pointed out, this can easily break with mount points 
inside other mount points.

 > /etc/conf.d/rc

Sure, set RC_PARALLEL_STARTUP if you want; I turned it on, but I can't 
say I saw any noticable difference - I _did_ notice some things starting 
in parallel, but the overall startup didn't seem any faster.  But, if 
stickers on your Honda Civic make you feel faster...

-- Jason Rhinelander
-- Gossamer Threads, Inc.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 22:15 ` Jason Rhinelander
@ 2004-10-14  2:52   ` Hasan Khalil
  2004-10-14  9:45   ` Ed Grimm
  1 sibling, 0 replies; 28+ messages in thread
From: Hasan Khalil @ 2004-10-14  2:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Jason Rhinelander wrote:
>  > /etc/init.d/modules
>  > /etc/init.d/bootmisc
> 
> The changes suggested here would cause problems, because it _is_ 
> possible for files to have changed inside the directory without the 
> directory mtime having changed.  If you want an example, try: echo "" 
>  >>existingfile into one of your modules.d/ files and watch the 
> modules.d time not change.

This can't easily be solved by looping recursively over every file/dir 
inside said location and compare mtimes there? Surely even this would be 
many orders of magnitude faster than actually doing the update. Only 
problem I see with it is with filesystems that do not keep mtimes (I 
don't know much about this).

-- 

Hasan Khalil <gongloo@gentoo.org>
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x707B8F18

[-- Attachment #2: gongloo.vcf --]
[-- Type: text/x-vcard, Size: 243 bytes --]

begin:vcard
fn:Hasan Khalil
n:Khalil;Hasan
org:Gentoo Foundation;Gentoo for Mac OS X
email;internet:gongloo@gentoo.org
title:Ebuild/Porting Co-Lead
tel;cell:1-860-208-9957
x-mozilla-html:FALSE
url:http://www.gentoo.org
version:2.1
end:vcard



[-- Attachment #3: Type: text/plain, Size: 37 bytes --]

--
gentoo-dev@gentoo.org mailing list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 21:34 ` Marc Vila
  2004-10-13 21:53   ` [gentoo-dev] " Sven Köhler
@ 2004-10-14  9:42   ` Georgi Georgiev
  2004-10-17  0:44     ` [gentoo-dev] " Jeff Davidson
  1 sibling, 1 reply; 28+ messages in thread
From: Georgi Georgiev @ 2004-10-14  9:42 UTC (permalink / raw
  To: gentoo-dev

maillog: 13/10/2004-23:34:35(+0200): Marc Vila types
> I would go with the update-modules tweak, it's really a boost and I
> would say its pretty safe to assume the changes in the script.

The modtime of a directory changes only if a file is created/deleted in
the directory itself. However, if you simply edit a file you may not
change the modtime of the directory. Try it yourself:

# touch /etc/env.d/.test
# stat /etc/env.d/.test | grep ^Mod
Modify: 2004-10-14 18:37:51.622977903 +0900
# echo "TEST TEST" > /etc/env.d/.test
Modify: 2004-10-14 18:37:51.622977903 +0900
# stat /etc/env.d/.test | grep ^Mod

Same goes for the modules.

-- 
-*   Georgi Georgiev   -* Total strangers need love, too; and I'm      -*
*-    chutz@gg3.net    *- stranger than most.                          *-
-*  +81(90)6266-1163   -*                                              -*

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 22:15 ` Jason Rhinelander
  2004-10-14  2:52   ` Hasan Khalil
@ 2004-10-14  9:45   ` Ed Grimm
  2004-10-14 10:01     ` Stefan Schweizer
  1 sibling, 1 reply; 28+ messages in thread
From: Ed Grimm @ 2004-10-14  9:45 UTC (permalink / raw
  To: Jason Rhinelander; +Cc: gentoo-dev

On Wed, 13 Oct 2004, Jason Rhinelander wrote:
> Roman Gaufman wrote:
>
>> Hey, I came across this page on the forum:
>> http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
>> specifically at the init.d script modifications. What do you think?
...
>
> Also, don't forget to add a big ASCII-art logo during the bootup -
> preferrably one with flames in the image, or perhaps one that says
> "Type-R".  It definitely makes Honda Civics go faster, so why not a
> Gentoo bootup?

Agreed.  I cannot stress this enough.

...
> Sure, set RC_PARALLEL_STARTUP if you want; I turned it on, but I can't
> say I saw any noticable difference - I _did_ notice some things starting
> in parallel, but the overall startup didn't seem any faster.  But, if
> stickers on your Honda Civic make you feel faster...

I suspect this would mainly be noticable on multiprocessor systems.

However, as a general rule, I'd think the difference would be negligable
in most cases.  Most of the startup scripts that come to mind that take
a noticable amount of time to start are dependancies for other startup
scripts, and they're all I/O bound, rather than CPU bound.

Note that RC_PARALLEL_STARTUP does potentially expose more timing
issues.  I think its main benefit would be assisting in exposing missing
dependancies; startup scripts which lacked one of their dependancies
would never work, rather than working sometimes.  However, it could
introduce other flakiness, which would be harder to track down.  (All of
the cases of this that I can think of fall under the scope of 'problems
"fixed" the wrong way'.)

Ed

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14  9:45   ` Ed Grimm
@ 2004-10-14 10:01     ` Stefan Schweizer
  2004-10-14 10:24       ` Ed Grimm
  2004-10-14 11:32       ` Chris Gianelloni
  0 siblings, 2 replies; 28+ messages in thread
From: Stefan Schweizer @ 2004-10-14 10:01 UTC (permalink / raw
  Cc: gentoo-dev

I think we should avoid some long delays during boot, like netmount 
needs 30 secs untill it fails or dhcp timeout. These things should be
made configurable or set to 3 sec to avoid  a  long hang if I am not
connected to the network. This will speed up booting more. And of
course update modules should be configurable with preferrable default
off, because I dont like it to have to manually edit the init.d files
just to get faster startup.

Stefan Schweizer

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 10:01     ` Stefan Schweizer
@ 2004-10-14 10:24       ` Ed Grimm
  2004-10-14 11:32       ` Chris Gianelloni
  1 sibling, 0 replies; 28+ messages in thread
From: Ed Grimm @ 2004-10-14 10:24 UTC (permalink / raw
  To: Stefan Schweizer; +Cc: gentoo-dev

On Thu, 14 Oct 2004, Stefan Schweizer wrote:

> I think we should avoid some long delays during boot, like netmount
> needs 30 secs untill it fails or dhcp timeout. These things should be
> made configurable or set to 3 sec to avoid  a  long hang if I am not
> connected to the network. This will speed up booting more. And of
> course update modules should be configurable with preferrable default
> off, because I dont like it to have to manually edit the init.d files
> just to get faster startup.

If one has no active network devices besides lo, why should the netmount
init script even bother trying to run netmount?  I personally think that
would be a better fix.

Admittedly, this comes from someone who does not have netmount in his
default startup...

Ed

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 10:01     ` Stefan Schweizer
  2004-10-14 10:24       ` Ed Grimm
@ 2004-10-14 11:32       ` Chris Gianelloni
  2004-10-14 12:33         ` Stefan Schweizer
  1 sibling, 1 reply; 28+ messages in thread
From: Chris Gianelloni @ 2004-10-14 11:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

On Thu, 2004-10-14 at 11:01 +0100, Stefan Schweizer wrote:
> I think we should avoid some long delays during boot, like netmount 
> needs 30 secs untill it fails or dhcp timeout. These things should be
> made configurable or set to 3 sec to avoid  a  long hang if I am not
> connected to the network. This will speed up booting more. And of
> course update modules should be configurable with preferrable default
> off, because I dont like it to have to manually edit the init.d files
> just to get faster startup.

The short answer: probably not

The long answer: We try to cater to the majority of our users.  The
majority of our users use DHCP and modules, so we're unlikely to disable
them.  Now, I believe that newer versions of the init scripts allow for
much more customization of the networking capabilities of Gentoo and I
am sure something could be worked out to remove this "delay".  At the
same time, have you considered a "no-network" runlevel?

As for the module updates, I agree that something can be done to speed
it up or have it only run when needed, but at the moment we do not have
a way, which is why we are discussing this now to see if a workable
solution can be found.

-- 
Chris Gianelloni
Release Engineering - Operations/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 11:32       ` Chris Gianelloni
@ 2004-10-14 12:33         ` Stefan Schweizer
  2004-10-14 15:32           ` Daniel Drake
  0 siblings, 1 reply; 28+ messages in thread
From: Stefan Schweizer @ 2004-10-14 12:33 UTC (permalink / raw
  To: wolf31o2; +Cc: gentoo-dev

> The long answer: We try to cater to the majority of our users.  The
> majority of our users use DHCP and modules, so we're unlikely to disable
> them.  
I also use dhcp and modules but modules get updated automatically if I
compile them so I do not need to update them again if I reboot.
> Now, I believe that newer versions of the init scripts allow for
> much more customization of the networking capabilities of Gentoo and I
> am sure something could be worked out to remove this "delay".  At the
> same time, have you considered a "no-network" runlevel?
No-network runlevel is manual work for every user for a general
problem that exists in everyy Gentoo install. And I do not like to
have to select a runlevel every time I boot.
> 
> As for the module updates, I agree that something can be done to speed
> it up or have it only run when needed, but at the moment we do not have
> a way, which is why we are discussing this now to see if a workable
> solution can be found.
Modules get updated after compile so why do we update them on boot
again? If you really need to, I think a config option for most of the
speed-oriented Gentoo-users would be in place.

For DHCP:
I suggest backgrounding it as is done in knoppix. It will not hurt and
bring the delay to 0 sec without shortening usability.
I surrently use the network config option and a delay of 2 secs for
dhcp. But you feel that delay when you boot w/o network connection.

Same for netmount .. I hacked the init-script to background it.

Stefan Schweizer

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 15:32           ` Daniel Drake
@ 2004-10-14 15:04             ` Stefan Schweizer
  2004-10-14 15:11               ` Peter Johanson
  2004-10-14 17:09               ` Mark Dierolf
  2004-10-14 16:29             ` Luke-Jr
  1 sibling, 2 replies; 28+ messages in thread
From: Stefan Schweizer @ 2004-10-14 15:04 UTC (permalink / raw
  To: Daniel Drake; +Cc: gentoo-dev

On Thu, 14 Oct 2004 16:32:43 +0100, Daniel Drake <dsd@gentoo.org> wrote:
> If I remember right, this was done for a short period of time. It caused
> problems. For example, I had "ntpdate" in my runlevel at the time, and it
> tried to start up directly after net.eth0. But net.eth0 hadn't completed the
> DHCP request in time, so my network interface was not ready to synchronise
> with a time server.

We could solve this by wating one or 2 secs and then backgrounding the
dhcp request.
Not sure how feasible this is, though.
But I think its intolerable for the average dhcp laptop user to wait
60 secs if he does not get a dhcp answer.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 15:04             ` Stefan Schweizer
@ 2004-10-14 15:11               ` Peter Johanson
  2004-10-14 17:09               ` Mark Dierolf
  1 sibling, 0 replies; 28+ messages in thread
From: Peter Johanson @ 2004-10-14 15:11 UTC (permalink / raw
  To: Stefan Schweizer; +Cc: gentoo-dev

On Thu, Oct 14, 2004 at 05:04:18PM +0200, Stefan Schweizer wrote:
> On Thu, 14 Oct 2004 16:32:43 +0100, Daniel Drake <dsd@gentoo.org> wrote:
> > If I remember right, this was done for a short period of time. It caused
> > problems. For example, I had "ntpdate" in my runlevel at the time, and it
> > tried to start up directly after net.eth0. But net.eth0 hadn't completed the
> > DHCP request in time, so my network interface was not ready to synchronise
> > with a time server.
> 
> We could solve this by wating one or 2 secs and then backgrounding the
> dhcp request.
> Not sure how feasible this is, though.
> But I think its intolerable for the average dhcp laptop user to wait
> 60 secs if he does not get a dhcp answer.

so set the timeout for dhcpcd to 10. Or use ifplugd to dynamically start the
net.ethX scripts. I think it's "intolerable" to break peoples servers
in the name of speed when there are other options.

-pete

> 
> --
> gentoo-dev@gentoo.org mailing list
> 

-- 
Peter Johanson
<latexer@gentoo.org>

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 12:33         ` Stefan Schweizer
@ 2004-10-14 15:32           ` Daniel Drake
  2004-10-14 15:04             ` Stefan Schweizer
  2004-10-14 16:29             ` Luke-Jr
  0 siblings, 2 replies; 28+ messages in thread
From: Daniel Drake @ 2004-10-14 15:32 UTC (permalink / raw
  To: Stefan Schweizer; +Cc: gentoo-dev

Stefan Schweizer wrote:
> For DHCP:
> I suggest backgrounding it as is done in knoppix. It will not hurt and
> bring the delay to 0 sec without shortening usability.

If I remember right, this was done for a short period of time. It caused 
problems. For example, I had "ntpdate" in my runlevel at the time, and it 
tried to start up directly after net.eth0. But net.eth0 hadn't completed the 
DHCP request in time, so my network interface was not ready to synchronise 
with a time server.

Daniel

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 15:32           ` Daniel Drake
  2004-10-14 15:04             ` Stefan Schweizer
@ 2004-10-14 16:29             ` Luke-Jr
  2004-10-19 12:36               ` Paul de Vrieze
  1 sibling, 1 reply; 28+ messages in thread
From: Luke-Jr @ 2004-10-14 16:29 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

On Thursday 14 October 2004 3:32 pm, Daniel Drake wrote:
> Stefan Schweizer wrote:
> > For DHCP:
> > I suggest backgrounding it as is done in knoppix. It will not hurt and
> > bring the delay to 0 sec without shortening usability.
>
> If I remember right, this was done for a short period of time. It caused
> problems. For example, I had "ntpdate" in my runlevel at the time, and it
> tried to start up directly after net.eth0. But net.eth0 hadn't completed
> the DHCP request in time, so my network interface was not ready to
> synchronise with a time server.

Isn't this the purpose of parellel init? With it enabled, I would expect all 
the other bootup services to be started at the same time, except those 
depending on network.
-- 
Luke-Jr
Developer, Utopios
http://utopios.org/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 15:04             ` Stefan Schweizer
  2004-10-14 15:11               ` Peter Johanson
@ 2004-10-14 17:09               ` Mark Dierolf
  2004-10-14 17:22                 ` Jason Rhinelander
  1 sibling, 1 reply; 28+ messages in thread
From: Mark Dierolf @ 2004-10-14 17:09 UTC (permalink / raw
  To: gentoo-dev

I agree, the 60 second dhcp timeout is completely intolerable.

2 seconds is too quick, my wireless network can take a few seconds when the 
first packet is sent out as it needs to load firmware into the cards memory.

10 seconds is my vote, i've never seen a network take longer than that, unless 
the ethernet was unplugged or something was horribly wrong.

As long as there is an option to change the timeout, I don't think we'll get 
many complaints.

Mark Dierolf

On Thursday 14 October 2004 8:04 am, Stefan Schweizer wrote:
> On Thu, 14 Oct 2004 16:32:43 +0100, Daniel Drake <dsd@gentoo.org> wrote:
> > If I remember right, this was done for a short period of time. It caused
> > problems. For example, I had "ntpdate" in my runlevel at the time, and it
> > tried to start up directly after net.eth0. But net.eth0 hadn't completed
> > the DHCP request in time, so my network interface was not ready to
> > synchronise with a time server.
>
> We could solve this by wating one or 2 secs and then backgrounding the
> dhcp request.
> Not sure how feasible this is, though.
> But I think its intolerable for the average dhcp laptop user to wait
> 60 secs if he does not get a dhcp answer.
>
> --
> gentoo-dev@gentoo.org mailing list

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 17:09               ` Mark Dierolf
@ 2004-10-14 17:22                 ` Jason Rhinelander
  2004-10-14 18:02                   ` Mark Dierolf
  2004-10-15  0:30                   ` Chris Gianelloni
  0 siblings, 2 replies; 28+ messages in thread
From: Jason Rhinelander @ 2004-10-14 17:22 UTC (permalink / raw
  To: gentoo-dev

Mark Dierolf wrote:
> As long as there is an option to change the timeout, I don't think we'll get 
> many complaints.

There is, it's called dhcpcd_eth0 in /etc/conf.d/net.  Just add "-t 10" 
and you have your 10 second timeout.  Alternatively, set up your boot 
loader to give you a choice - I do this, and I choose "Gentoo" (boots 
with softlevel=default, which starts net.eth0), or "Wireless" (boots 
with softlevel=wireless, which starts net.wlan0 and NOT net.eth0) or 
"Networkless" (boots with softlevel=nonetwork).  After all, YOU are 
hopefully going to know better than Gentoo whether or not your network 
should be up.

-- Jason Rhinelander

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 17:22                 ` Jason Rhinelander
@ 2004-10-14 18:02                   ` Mark Dierolf
  2004-10-14 20:53                     ` Doug Goldstein
  2004-10-15  0:39                     ` [gentoo-dev] " Chris Gianelloni
  2004-10-15  0:30                   ` Chris Gianelloni
  1 sibling, 2 replies; 28+ messages in thread
From: Mark Dierolf @ 2004-10-14 18:02 UTC (permalink / raw
  To: gentoo-dev

I'm talking about setting a default that's less than 60 seconds. I know i can 
change it, but IMO 60 seconds is an annoying wait when you're stuck booting a 
machine some other admin just bootstrapped.

I think the people who NEED to wait 60 seconds should increase it. Or better 
yet, they should fix their network.

You should get a DHCP response in < 10 seconds, it's as simple as that. If you 
don't, something is screwed up.

The vast majority of people would be ok with a 10 second dhcp timeout, and 
those who aren't can increase it.

Mark Dierolf





On Thursday 14 October 2004 10:22 am, Jason Rhinelander wrote:
> Mark Dierolf wrote:
> > As long as there is an option to change the timeout, I don't think we'll
> > get many complaints.
>
> There is, it's called dhcpcd_eth0 in /etc/conf.d/net.  Just add "-t 10"
> and you have your 10 second timeout.  Alternatively, set up your boot
> loader to give you a choice - I do this, and I choose "Gentoo" (boots
> with softlevel=default, which starts net.eth0), or "Wireless" (boots
> with softlevel=wireless, which starts net.wlan0 and NOT net.eth0) or
> "Networkless" (boots with softlevel=nonetwork).  After all, YOU are
> hopefully going to know better than Gentoo whether or not your network
> should be up.
>
> -- Jason Rhinelander
>
> --
> gentoo-dev@gentoo.org mailing list

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-13 21:26 [gentoo-dev] init script optimizations? Roman Gaufman
                   ` (2 preceding siblings ...)
  2004-10-13 22:15 ` Jason Rhinelander
@ 2004-10-14 18:17 ` Toby Dickenson
  3 siblings, 0 replies; 28+ messages in thread
From: Toby Dickenson @ 2004-10-14 18:17 UTC (permalink / raw
  To: gentoo-dev, Roman Gaufman; +Cc: gentoo-dev

On Wednesday 13 October 2004 22:26, Roman Gaufman wrote:
> Hey, I came across this page on the forum:
> http://forums.gentoo.org/viewtopic.php?t=231170 -- looking
> specifically at the init.d script modifications. What do you think?
> 
> Seems like pretty safe modification, but make very noticeable speed up
> in system startup. Maybe these changes should be made in the next
> baselayout update?

That article in the forums suggests adding xdm to the boot runlevel to get it 
started sooner. Ive been doing something for a while which is slightly 
different, and IMO a little cleaner.

I use an additional runlevel called postx for services that shouldnt hold up 
xdm. xdm and all the essential services are in the standard default runlevel. 
Then in /etc/conf.d/local.start I have....
(sleep 20; /sbin/rc postx) > /var/log/postx &

The sleep allows enough time for xdm to start smoothly, then the postx 
runlevel services are started in the background.


-- 
Toby Dickenson

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 18:02                   ` Mark Dierolf
@ 2004-10-14 20:53                     ` Doug Goldstein
  2004-10-14 23:53                       ` [gentoo-dev] " Duncan
  2004-10-15  0:39                     ` [gentoo-dev] " Chris Gianelloni
  1 sibling, 1 reply; 28+ messages in thread
From: Doug Goldstein @ 2004-10-14 20:53 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Dierolf wrote:
| I'm talking about setting a default that's less than 60 seconds. I
know i can
| change it, but IMO 60 seconds is an annoying wait when you're stuck
booting a
| machine some other admin just bootstrapped.
|
| I think the people who NEED to wait 60 seconds should increase it. Or
better
| yet, they should fix their network.
|
| You should get a DHCP response in < 10 seconds, it's as simple as
that. If you
| don't, something is screwed up.
|
| The vast majority of people would be ok with a 10 second dhcp timeout,
and
| those who aren't can increase it.
|
| Mark Dierolf
|
|
|
|
|
| On Thursday 14 October 2004 10:22 am, Jason Rhinelander wrote:
|
|>Mark Dierolf wrote:
|>
|>>As long as there is an option to change the timeout, I don't think we'll
|>>get many complaints.
|>
|>There is, it's called dhcpcd_eth0 in /etc/conf.d/net.  Just add "-t 10"
|>and you have your 10 second timeout.  Alternatively, set up your boot
|>loader to give you a choice - I do this, and I choose "Gentoo" (boots
|>with softlevel=default, which starts net.eth0), or "Wireless" (boots
|>with softlevel=wireless, which starts net.wlan0 and NOT net.eth0) or
|>"Networkless" (boots with softlevel=nonetwork).  After all, YOU are
|>hopefully going to know better than Gentoo whether or not your network
|>should be up.
|>
|>-- Jason Rhinelander
|>
|>--
|>gentoo-dev@gentoo.org mailing list
|
|
| --
| gentoo-dev@gentoo.org mailing list
|
|
|
Well if you just bootstrapped it. Then that's the first thing you fix if
~ its SUCH a huge issue! There is an option to adjust it so adjust it.
Gentoo is fully customizable. If you are personally injusticed by the
fact that out of the box Gentoo is set to support anything and
everything, then head else where. As far as taking longer then 10
seconds, try to pull an IP over a bogged down Sat link. I've seen it
take longer then 10.

- --
Doug Goldstein
http://dev.gentoo.org/~cardoe

Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x179106D0
Key fingerprint = 7001 5FBF BACE 9E66 3A1C  55E0 161C FF5C 1791 06D0

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBbudSFhz/XBeRBtARAkx/AKChPLqDzkJqMZLlArCQlQNImIV/TgCcChPK
PNc6ofLVkId5nakeLYgdSFo=
=JfLe
-----END PGP SIGNATURE-----

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: init script optimizations?
  2004-10-14 20:53                     ` Doug Goldstein
@ 2004-10-14 23:53                       ` Duncan
  0 siblings, 0 replies; 28+ messages in thread
From: Duncan @ 2004-10-14 23:53 UTC (permalink / raw
  To: gentoo-dev

Doug Goldstein posted <416EE752.8020009@gentoo.org>, excerpted below,  on
Thu, 14 Oct 2004 16:53:38 -0400:

> Well if you just bootstrapped it. Then that's the first thing you fix if ~
> its SUCH a huge issue! There is an option to adjust it so adjust it.
> Gentoo is fully customizable. If you are personally injusticed by the fact
> that out of the box Gentoo is set to support anything and everything, then
> head else where. As far as taking longer then 10 seconds, try to pull an
> IP over a bogged down Sat link. I've seen it take longer then 10.

I'd suggest 20 or 30 seconds.  That's way better than 60, yet should cover
even reasonable extremes.  Any "unreasonable" extremes, such as the sat
link you mention, could change the defaults as needed, but it would
continue to "just work" for the /vast/ majority of folks, while still
being easily adjustable (up /or/ down), for those that needed such.

20 seconds watching nothing happen on the boot screen is an irritating
long wait, but workable.  60 seconds and many will be wondering if
something hung, and may press reset.

-- 
Duncan - List replies preferred.   No HTML msgs.
"They that can give up essential liberty to obtain a little
temporary safety, deserve neither liberty nor safety." --
Benjamin Franklin



--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 17:22                 ` Jason Rhinelander
  2004-10-14 18:02                   ` Mark Dierolf
@ 2004-10-15  0:30                   ` Chris Gianelloni
  1 sibling, 0 replies; 28+ messages in thread
From: Chris Gianelloni @ 2004-10-15  0:30 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Thu, 2004-10-14 at 10:22 -0700, Jason Rhinelander wrote:
> There is, it's called dhcpcd_eth0 in /etc/conf.d/net.  Just add "-t 10" 
> and you have your 10 second timeout.  Alternatively, set up your boot 
> loader to give you a choice - I do this, and I choose "Gentoo" (boots 
> with softlevel=default, which starts net.eth0), or "Wireless" (boots 
> with softlevel=wireless, which starts net.wlan0 and NOT net.eth0) or 
> "Networkless" (boots with softlevel=nonetwork).  After all, YOU are 
> hopefully going to know better than Gentoo whether or not your network 
> should be up.

I just wanted to take a moment to thank you for these comments.  This is
exactly what I was meaning by my earlier statements on this subject.  It
seems some people want us to do everything, even when we have already
given them the tools to make the system the way they wish.

-- 
Chris Gianelloni
Release Engineering - Operations/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 18:02                   ` Mark Dierolf
  2004-10-14 20:53                     ` Doug Goldstein
@ 2004-10-15  0:39                     ` Chris Gianelloni
  1 sibling, 0 replies; 28+ messages in thread
From: Chris Gianelloni @ 2004-10-15  0:39 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2882 bytes --]

On Thu, 2004-10-14 at 11:02 -0700, Mark Dierolf wrote:
> I'm talking about setting a default that's less than 60 seconds. I know i can 
> change it, but IMO 60 seconds is an annoying wait when you're stuck booting a 
> machine some other admin just bootstrapped.

Another admin, eh?  Then you should only have to deal with this problem
exactly once, right?  After all, you're going to fix it as soon as you
get on the machine anyway.  Have you considered cluing the other admin
in so he will be more thoughtful next time?

> 
> I think the people who NEED to wait 60 seconds should increase it. Or better 
> yet, they should fix their network.

Complain to the authors.

They're the ones that set the default at 60 seconds.

We have given you the ability to change it yourself.  Just because you
do not does not necessarily mean a fault on our part.  This is
especially true with the newer baselayout/network init scripts that are
being worked on.

> You should get a DHCP response in < 10 seconds, it's as simple as that. If you 
> don't, something is screwed up.

Really?  Do you use wireless?  Ever been on a busy Windows network?
There are plenty of reasons why the timeout exists at 60 seconds.

> The vast majority of people would be ok with a 10 second dhcp timeout, and 
> those who aren't can increase it.

Once they learn how to do so.

Here is my take on it.  It is one thing to have a *slight* (yes, 60
seconds is slight) delay the first time a machine boots off-network than
to try to teach someone that the reason why they didn't get a DHCP
response was because we lowered the timeout from what the original
author set the default at to pacify a few vocal users.  Want to guess
how long it would take most users to even get to this point in their
troubleshooting?  Would *you* like to field all the inevitable
questions/bug reports?  Remember that a minor inconvenience for you is
much better than a non-functional system for someone else.

> On Thursday 14 October 2004 10:22 am, Jason Rhinelander wrote:
> > Mark Dierolf wrote:
> > > As long as there is an option to change the timeout, I don't think we'll
> > > get many complaints.
> >
> > There is, it's called dhcpcd_eth0 in /etc/conf.d/net.  Just add "-t 10"
> > and you have your 10 second timeout.  Alternatively, set up your boot
> > loader to give you a choice - I do this, and I choose "Gentoo" (boots
> > with softlevel=default, which starts net.eth0), or "Wireless" (boots
> > with softlevel=wireless, which starts net.wlan0 and NOT net.eth0) or
> > "Networkless" (boots with softlevel=nonetwork).  After all, YOU are
> > hopefully going to know better than Gentoo whether or not your network
> > should be up.
> >
> > -- Jason Rhinelander
> >
> > --
> > gentoo-dev@gentoo.org mailing list
> 
> --
> gentoo-dev@gentoo.org mailing list
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: init script optimizations?
  2004-10-14  9:42   ` [gentoo-dev] " Georgi Georgiev
@ 2004-10-17  0:44     ` Jeff Davidson
  2004-10-17  2:31       ` Robin H. Johnson
  2004-10-17  3:27       ` Georgi Georgiev
  0 siblings, 2 replies; 28+ messages in thread
From: Jeff Davidson @ 2004-10-17  0:44 UTC (permalink / raw
  To: gentoo-dev

Georgi Georgiev <chutz <at> gg3.net> writes:

> 
> maillog: 13/10/2004-23:34:35(+0200): Marc Vila types
> > I would go with the update-modules tweak, it's really a boost and I
> > would say its pretty safe to assume the changes in the script.
> 
> The modtime of a directory changes only if a file is created/deleted in
> the directory itself. However, if you simply edit a file you may not
> change the modtime of the directory. Try it yourself:
> 
What about a hash of the directory?  I haven't investigated the situation much,
but I'd have to imagine that a CRC32, md5, or SHA1 (overkill) would be able to
detect a file change and still be faster than always running modules-update.


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] Re: init script optimizations?
  2004-10-17  0:44     ` [gentoo-dev] " Jeff Davidson
@ 2004-10-17  2:31       ` Robin H. Johnson
  2004-10-17  3:27       ` Georgi Georgiev
  1 sibling, 0 replies; 28+ messages in thread
From: Robin H. Johnson @ 2004-10-17  2:31 UTC (permalink / raw
  To: Gentoo Developers

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

On Sun, Oct 17, 2004 at 12:44:09AM +0000, Jeff Davidson wrote:
> What about a hash of the directory?  I haven't investigated the situation much,
> but I'd have to imagine that a CRC32, md5, or SHA1 (overkill) would be able to
> detect a file change and still be faster than always running modules-update.
It would still fail if some content made use of the include directive,
and included a file outside of your hashed dataset that got changed.

You'd be better off integrating such a design into modules-update.

One further reason that running modules-update is important, is to
handle the need to run depmod if the content of modules/kernels changes.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] Re: init script optimizations?
  2004-10-17  0:44     ` [gentoo-dev] " Jeff Davidson
  2004-10-17  2:31       ` Robin H. Johnson
@ 2004-10-17  3:27       ` Georgi Georgiev
  1 sibling, 0 replies; 28+ messages in thread
From: Georgi Georgiev @ 2004-10-17  3:27 UTC (permalink / raw
  To: gentoo-dev

maillog: 17/10/2004-00:44:09(+0000): Jeff Davidson types
> > The modtime of a directory changes only if a file is created/deleted in
> > the directory itself. However, if you simply edit a file you may not
> > change the modtime of the directory. Try it yourself:
> > 
> What about a hash of the directory?  I haven't investigated the situation much,
> but I'd have to imagine that a CRC32, md5, or SHA1 (overkill) would be able to
> detect a file change and still be faster than always running modules-update.

Isn't this simpler and just as effective?

find /etc/modules.d/ -newer /etc/modules.conf | grep -q . && modules-update

-- 
\/   Georgi Georgiev   \/ Linux - Where do you want to fly today? --   \/
/\    chutz@gg3.net    /\ Unknown source                               /\
\/  +81(90)6266-1163   \/                                              \/

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] init script optimizations?
  2004-10-14 16:29             ` Luke-Jr
@ 2004-10-19 12:36               ` Paul de Vrieze
  0 siblings, 0 replies; 28+ messages in thread
From: Paul de Vrieze @ 2004-10-19 12:36 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On Thursday 14 October 2004 18:29, Luke-Jr wrote:
> Isn't this the purpose of parellel init? With it enabled, I would
> expect all the other bootup services to be started at the same time,
> except those depending on network.

Unfortunately that is most of them. Especially the way they are written. 
Many services use the network, but can start without them in their 
default config. (But may not if they are asked to be bound to a specific 
network interface)

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2004-10-19 12:37 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-13 21:26 [gentoo-dev] init script optimizations? Roman Gaufman
2004-10-13 21:34 ` Marc Vila
2004-10-13 21:53   ` [gentoo-dev] " Sven Köhler
2004-10-14  9:42   ` [gentoo-dev] " Georgi Georgiev
2004-10-17  0:44     ` [gentoo-dev] " Jeff Davidson
2004-10-17  2:31       ` Robin H. Johnson
2004-10-17  3:27       ` Georgi Georgiev
2004-10-13 21:59 ` [gentoo-dev] " Sebastian Dröge
2004-10-13 22:15 ` Jason Rhinelander
2004-10-14  2:52   ` Hasan Khalil
2004-10-14  9:45   ` Ed Grimm
2004-10-14 10:01     ` Stefan Schweizer
2004-10-14 10:24       ` Ed Grimm
2004-10-14 11:32       ` Chris Gianelloni
2004-10-14 12:33         ` Stefan Schweizer
2004-10-14 15:32           ` Daniel Drake
2004-10-14 15:04             ` Stefan Schweizer
2004-10-14 15:11               ` Peter Johanson
2004-10-14 17:09               ` Mark Dierolf
2004-10-14 17:22                 ` Jason Rhinelander
2004-10-14 18:02                   ` Mark Dierolf
2004-10-14 20:53                     ` Doug Goldstein
2004-10-14 23:53                       ` [gentoo-dev] " Duncan
2004-10-15  0:39                     ` [gentoo-dev] " Chris Gianelloni
2004-10-15  0:30                   ` Chris Gianelloni
2004-10-14 16:29             ` Luke-Jr
2004-10-19 12:36               ` Paul de Vrieze
2004-10-14 18:17 ` Toby Dickenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox