Re: FreeBSD Boot Times

2012-06-15 Thread Peter Jeremy
On 2012-Jun-13 21:55:22 +0200, Hans Petter Selasky hsela...@c2i.net wrote:
Try setting:

sysctl hw.usb.no_boot_wait=1

Note that this is a tunable and will need to be specified in /boot/loader.conf
to have any effect.

-- 
Peter Jeremy


pgpojiOBCDYfk.pgp
Description: PGP signature


Re: FreeBSD Boot Times

2012-06-14 Thread Nathan Whitehorn
Thanks for the information -- I got scared by SysV init. This actually 
does look very nice.

-Nathan

On 06/13/12 13:35, Richard Yao wrote:

The OpenRC is sysvinit compatible, but it has few of sysvinit's flaws.
It has named runlevels, the presence of an init script does not cause it
to start and it is in my opinion a joy to use.

I suggest that you try OpenRC before drawing conclusions. You can
install Gentoo FreeBSD in a jail. There are instructions for this on the
Gentoo wiki:

http://wiki.gentoo.org/wiki/Gentoo_FreeBSD#Howto_run_G.2FFBSD_in_vanilla_FreeBSD.27s_jail

If you find deficiencies, I am certain that the OpenRC developers would
appreciate feedback regarding them.

On 06/13/12 10:19, Nathan Whitehorn wrote:

On 06/12/12 18:00, Richard Yao wrote:

On 06/11/12 18:51, Garrett Cooper wrote:

On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falkbfalk_...@brandonfa.lk   wrote:

Greetings,

I was just wondering what it is that FreeBSD does that makes it take so long
to boot. Booting into Ubuntu minimal or my own custom Linux distro,
literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about
10-20 seconds. I'm not sure if anything could be parallelized in the boot
process, but Linux somehow manages to do it. The Ubuntu install I do pretty
much consists of a shell and developers tools, but it still has a generic
kernel. There must be some sort of polling done in the FreeBSD boot process
that could be parallelized or eliminated.

Anyone have any suggestions?

Note: This isn't really an issue, moreso a curiosity.

  The single process nature of rc is a big part of the problem, as
is the single AP bootup of FreeBSD right before multiuser mode. There
are a number of threads that discuss this (look for parallel rc bootup
or something like that in the current, hacker, and rc archives -- the
most recent discussion was probably 6~9 months ago).
  Given past experience, a big part of getting past the parallelized
rc mess would be to make services fail/wait gracefully for all their
resources to come up before proceeding. It's not easy, but it's
possible with enough resources.
HTH,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Please don't change any of the user-facing aspects of the RC system. One
of the things that brought me (and many others I know) to FreeBSD,
besides working sound, was having an rc.conf that was easy to configure
instead of the nightmare that is System V init.
-Nathan
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-14 Thread Russell Cattelan
On 6/13/12 6:29 PM, Mehmet Erol Sanliturk wrote:
 
 
 On Wed, Jun 13, 2012 at 3:49 PM, Russell Cattelan catte...@thebarn.com
 mailto:catte...@thebarn.com wrote:
 
 On 6/13/12 2:16 AM, Poul-Henning Kamp wrote:
  In message
 alpine.bsf.2.00.1206130909310.73...@wojtek.tensor.gdynia.pl
 mailto:alpine.bsf.2.00.1206130909310.73...@wojtek.tensor.gdynia.pl,
 Wojci
  ech Puchar writes:
 
  One of the major slowdowns is that we do all the device drivers
  serially  synchronously.
 Yes definitely.
 
 I have been looking into how to potentially defer or parallelize
 device_attach'es. Defer is turning out to be hard enough since each
 system is has different requirements to reach a state where it can
 run /sbin/init. I've started with the John Baldwin's multipass work
 and have a system stops probing/attaching devices and allows the boot
 to continue on.
 
 The remaining passes I'm triggering from userspace once the system
 is up.
 
 This is all very crude at this point and has been an some work just
 to understand how the kernel startup code all links together.
 
 Note systemd looks interesting from from a demand based startup scheme
 much like apples launchd. (note systemd uses linux process groups so
 porting it would take some effort)
 
 Ideally it would be nice to get to the point where many devices are only
 attached once there is a demand for it. Say network interfaces for
 example: attach it once the init scripts need to config it and then
 hopefully in an async fashion. Unfortunately that will require locking
 a bit more fine grain than the current Giant lock.
 
 -Russell
 
 
 
 
 To reduce the boot time , my opinion is as follows :
 
 During install or by using a program , generate a Hardware Profile File .
 
 By editing it , mark some devices No check ( for example , a network
 card or 
 PS/2 mouse or key board , is not connected , RS-232 , Firewire , 
 unused SATA ports , unused IDE ports , etc. ,
 then it is not necessary to check them . )
 
 During boot , first read that Hardware Profile File .
 Only check ports marked as Check .
Linux does this by keeping a list of driver id's and corresponding
driver modules. The installers can then generate of list of modules
to load based on a scan done at install time.
FreeBSD is much more into build everything into the kernel vs having
a smaller kernel + modules. There really isn't anything limiting a
smaller kernel right now. I have a config with just about everything
stripped out to do multipass ordering testing and not have a ton of
extra probes going on.
 
 After completion of boot , the other ports may checked to update 
 Hardware Profile File if it is requested in Hardware Profile File .
 
 Later on , assume a new device is attached .
 
 Run the Hardware Profile program to regenerate the Hardware Profile
 File ,
 or by using dmesg , manually add this device into Hardware Profile File .
 
 
 For removable devices , if some USB , etc. ports are not used , they all
 may be 
 marked as No Check , for example internal USB ports , unused back
 panel ports .
Making usb async would be a big help in terms of boot time it is one
of the slowest subsystems to attach.
cam already has a thread for drive scanning but unfortunately the boot
still waits for it to scan everything before proceeding.

One thing I would like to do is release the boot process once the root
drive is found and let the rest of drive discovery happen in the background.
The problem that then arises is what is the next barrier point? say
when mount -a happening? Right now the rc scripts assume everything
is probed and attached. What if the rc scripts could say load all
drives, notify me when done, get notification, run mount -a.

I was thinking anything new would have to take existing scripts and
run them normally. But provide a new framework to allow for things to
be migrated over.


 
 
 I do not know such a scheme is useful or not , or usable or not .
 
 If I were a boot manager program writer , I would try it .
 
 To my knowledge which I may be wrong , at present there is no such a
 facility .
yes something could / should be done.
So lets keep the discussion going.

-Russell

 
 
 Thank you very much .
 
 
 Mehmet Erol Sanliturk
 
 
 
 
 



signature.asc
Description: OpenPGP digital signature


Re: FreeBSD Boot Times

2012-06-14 Thread Dieter BSD
Brandon writes:
 Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell

0.5-2 seconds from power-on to a shell prompt?  How do you
get through the firmware that fast, much less firmware plus
an OS?

Which reminds me, back when I was triple-booting Free, Net, and
penguinix, I noticed that when rebooting, penguinix didn't go
through all the firmware stuff like the BSDs do.  That is one
way to save a lot of time, at least for reboots.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-14 Thread Wojciech Puchar

Linux does this by keeping a list of driver id's and corresponding
driver modules. The installers can then generate of list of modules
to load based on a scan done at install time.


what a problem to compile custom kernel?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-14 Thread Richard Yao
That is a fairly common response. I would appreciate suggestions on how
I can convey that OpenRC is a good init system.

Also, I am certain that the OpenRC developers would be thrilled if
FreeBSD adopted OpenRC. If FreeBSD core is interested in OpenRC, feel
free to contact the OpenRC and/or the Gentoo FreeBSD developers. We
would all love to see OpenRC in upstream FreeBSD.

On 06/14/12 10:34, Nathan Whitehorn wrote:
 Thanks for the information -- I got scared by SysV init. This actually
 does look very nice.
 -Nathan
 
 On 06/13/12 13:35, Richard Yao wrote:
 The OpenRC is sysvinit compatible, but it has few of sysvinit's flaws.
 It has named runlevels, the presence of an init script does not cause it
 to start and it is in my opinion a joy to use.

 I suggest that you try OpenRC before drawing conclusions. You can
 install Gentoo FreeBSD in a jail. There are instructions for this on the
 Gentoo wiki:

 http://wiki.gentoo.org/wiki/Gentoo_FreeBSD#Howto_run_G.2FFBSD_in_vanilla_FreeBSD.27s_jail


 If you find deficiencies, I am certain that the OpenRC developers would
 appreciate feedback regarding them.

 On 06/13/12 10:19, Nathan Whitehorn wrote:
 On 06/12/12 18:00, Richard Yao wrote:
 On 06/11/12 18:51, Garrett Cooper wrote:
 On Mon, Jun 11, 2012 at 3:21 PM, Brandon
 Falkbfalk_...@brandonfa.lk   wrote:
 Greetings,

 I was just wondering what it is that FreeBSD does that makes it
 take so long
 to boot. Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell, where FreeBSD
 takes about
 10-20 seconds. I'm not sure if anything could be parallelized in
 the boot
 process, but Linux somehow manages to do it. The Ubuntu install I
 do pretty
 much consists of a shell and developers tools, but it still has a
 generic
 kernel. There must be some sort of polling done in the FreeBSD
 boot process
 that could be parallelized or eliminated.

 Anyone have any suggestions?

 Note: This isn't really an issue, moreso a curiosity.
   The single process nature of rc is a big part of the problem, as
 is the single AP bootup of FreeBSD right before multiuser mode. There
 are a number of threads that discuss this (look for parallel rc bootup
 or something like that in the current, hacker, and rc archives -- the
 most recent discussion was probably 6~9 months ago).
   Given past experience, a big part of getting past the
 parallelized
 rc mess would be to make services fail/wait gracefully for all their
 resources to come up before proceeding. It's not easy, but it's
 possible with enough resources.
 HTH,
 -Garrett
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 freebsd-hackers-unsubscr...@freebsd.org
 Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD
 2-clause
 licensed System V init system replacement that supports parallel boot.
 Its boot performance is competitive with systemd and Ubuntu's upstart.

 If FreeBSD's init system is serializing the boot process, it might be
 worthwhile to consider importing OpenRC.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 freebsd-hackers-unsubscr...@freebsd.org
 Please don't change any of the user-facing aspects of the RC system. One
 of the things that brought me (and many others I know) to FreeBSD,
 besides working sound, was having an rc.conf that was easy to configure
 instead of the nightmare that is System V init.
 -Nathan
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 freebsd-hackers-unsubscr...@freebsd.org
 

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Wojciech Puchar

Greetings,

I was just wondering what it is that FreeBSD does that makes it take so long 
to boot. Booting into Ubuntu minimal or my own custom Linux distro, literally 
takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about 10-20 
seconds. I'm not sure if anything could be parallelized in the boot process,


mostly kernel time. 

Note: This isn't really an issue, moreso a curiosity.


true. system that never crash are not often booted
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread David Wolfskill
On Wed, Jun 13, 2012 at 09:10:04AM +0200, Wojciech Puchar wrote:
 
 mostly kernel time. 
 Note: This isn't really an issue, moreso a curiosity.
 
 true. system that never crash are not often booted
 ...

I'd rather not get into a long discussion about this, but the above
reflects a perception that I do not share, for the simple reason that I
track FreeBSD stable/8, stable/9, and head daily on my laptop.  And
since each of these is an in-place source upgrade, I reboot to get
into each of those environments.  And since I actually track stable/9
twice (one slice has stable/9 built with gcc; the other with clang) --
well, my mornings tend to be busy.  (Just installing the stable/8
freshly-built kernel as I type.)

In addition, I normally power the laptop off when I put it in my
backpack  cycle to or from the train station.  (Well, if I'm running
stable/9 or head at the time, I can suspend it  resume once I've
arrived.)

Granted, neither of the above may be especially common, but diversity
[in this case, of experience] is a wonderful thing.

Let us not assume that others' experiences and perceptions are limited
to our own -- please?  :-)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpMSL26mqKiE.pgp
Description: PGP signature


Re: FreeBSD Boot Times

2012-06-13 Thread Poul-Henning Kamp
In message alpine.bsf.2.00.1206130909310.73...@wojtek.tensor.gdynia.pl, Wojci
ech Puchar writes:

One of the major slowdowns is that we do all the device drivers
serially  synchronously.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Ian Lepore
On Wed, 2012-06-13 at 09:10 +0200, Wojciech Puchar wrote:
  Greetings,
 
  I was just wondering what it is that FreeBSD does that makes it take so 
  long 
  to boot. Booting into Ubuntu minimal or my own custom Linux distro, 
  literally 
  takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about 10-20 
  seconds. I'm not sure if anything could be parallelized in the boot process,
 
 mostly kernel time. 
  Note: This isn't really an issue, moreso a curiosity.
 
 true. system that never crash are not often booted

An embedded system may be booted or powered cycled dozens of times a
day, and boot time can be VERY important.  Don't assume that the way you
use FreeBSD is the only way.

-- Ian


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Nathan Whitehorn

On 06/12/12 18:00, Richard Yao wrote:

On 06/11/12 18:51, Garrett Cooper wrote:

On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falkbfalk_...@brandonfa.lk  wrote:

Greetings,

I was just wondering what it is that FreeBSD does that makes it take so long
to boot. Booting into Ubuntu minimal or my own custom Linux distro,
literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about
10-20 seconds. I'm not sure if anything could be parallelized in the boot
process, but Linux somehow manages to do it. The Ubuntu install I do pretty
much consists of a shell and developers tools, but it still has a generic
kernel. There must be some sort of polling done in the FreeBSD boot process
that could be parallelized or eliminated.

Anyone have any suggestions?

Note: This isn't really an issue, moreso a curiosity.

 The single process nature of rc is a big part of the problem, as
is the single AP bootup of FreeBSD right before multiuser mode. There
are a number of threads that discuss this (look for parallel rc bootup
or something like that in the current, hacker, and rc archives -- the
most recent discussion was probably 6~9 months ago).
 Given past experience, a big part of getting past the parallelized
rc mess would be to make services fail/wait gracefully for all their
resources to come up before proceeding. It's not easy, but it's
possible with enough resources.
HTH,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Please don't change any of the user-facing aspects of the RC system. One 
of the things that brought me (and many others I know) to FreeBSD, 
besides working sound, was having an rc.conf that was easy to configure 
instead of the nightmare that is System V init.

-Nathan
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Brandon Falk

On 6/13/2012 10:19 AM, Nathan Whitehorn wrote:

On 06/12/12 18:00, Richard Yao wrote:

On 06/11/12 18:51, Garrett Cooper wrote:
On Mon, Jun 11, 2012 at 3:21 PM, Brandon 
Falkbfalk_...@brandonfa.lk  wrote:

Greetings,

I was just wondering what it is that FreeBSD does that makes it 
take so long

to boot. Booting into Ubuntu minimal or my own custom Linux distro,
literally takes 0.5-2 seconds to boot up to shell, where FreeBSD 
takes about
10-20 seconds. I'm not sure if anything could be parallelized in 
the boot
process, but Linux somehow manages to do it. The Ubuntu install I 
do pretty
much consists of a shell and developers tools, but it still has a 
generic
kernel. There must be some sort of polling done in the FreeBSD boot 
process

that could be parallelized or eliminated.

Anyone have any suggestions?

Note: This isn't really an issue, moreso a curiosity.

 The single process nature of rc is a big part of the problem, as
is the single AP bootup of FreeBSD right before multiuser mode. There
are a number of threads that discuss this (look for parallel rc bootup
or something like that in the current, hacker, and rc archives -- the
most recent discussion was probably 6~9 months ago).
 Given past experience, a big part of getting past the parallelized
rc mess would be to make services fail/wait gracefully for all their
resources to come up before proceeding. It's not easy, but it's
possible with enough resources.
HTH,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
freebsd-hackers-unsubscr...@freebsd.org

Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
freebsd-hackers-unsubscr...@freebsd.org


Please don't change any of the user-facing aspects of the RC system. 
One of the things that brought me (and many others I know) to FreeBSD, 
besides working sound, was having an rc.conf that was easy to 
configure instead of the nightmare that is System V init.

-Nathan
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
freebsd-hackers-unsubscr...@freebsd.org


Sorry guys, I was very busy last night.

The issue is not the init system, rather the kernel. Maybe for a server 
does the init system start to get lengthy, but at least on my desktop 
environment where I have almost nothing for RC to do, the kernel bootup 
takes about 95% of the boot process.


If I were to really delve into this (as it would require extensive 
changes in the kernel [I think]), I would probably end up branching 
FreeBSD either to a new OS, or if I got permission, to just another 
branch of FreeBSD.


-Brandon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Hans Petter Selasky
On Wednesday 13 June 2012 15:21:29 Ian Lepore wrote:
 On Wed, 2012-06-13 at 09:10 +0200, Wojciech Puchar wrote:
   Greetings,
   
   I was just wondering what it is that FreeBSD does that makes it take so
   long to boot. Booting into Ubuntu minimal or my own custom Linux
   distro, literally takes 0.5-2 seconds to boot up to shell, where
   FreeBSD takes about 10-20 seconds. I'm not sure if anything could be
   parallelized in the boot process,
  
  mostly kernel time.
  
   Note: This isn't really an issue, moreso a curiosity.
  
  true. system that never crash are not often booted
 
 An embedded system may be booted or powered cycled dozens of times a
 day, and boot time can be VERY important.  Don't assume that the way you
 use FreeBSD is the only way.
 
 -- Ian

Try setting:

sysctl hw.usb.no_boot_wait=1

Might help a bit :-)

--HPS
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Eitan Adler
On 13 June 2012 12:55, Hans Petter Selasky hsela...@c2i.net wrote:
 On Wednesday 13 June 2012 15:21:29 Ian Lepore wrote:
 On Wed, 2012-06-13 at 09:10 +0200, Wojciech Puchar wrote:
   Greetings,
  
   I was just wondering what it is that FreeBSD does that makes it take so
   long to boot. Booting into Ubuntu minimal or my own custom Linux
   distro, literally takes 0.5-2 seconds to boot up to shell, where
   FreeBSD takes about 10-20 seconds. I'm not sure if anything could be
   parallelized in the boot process,
 
  mostly kernel time.
 
   Note: This isn't really an issue, moreso a curiosity.
 
  true. system that never crash are not often booted

 An embedded system may be booted or powered cycled dozens of times a
 day, and boot time can be VERY important.  Don't assume that the way you
 use FreeBSD is the only way.

 -- Ian

 Try setting:

 sysctl hw.usb.no_boot_wait=1

Can you explain in a bit more detail what this does and why it isn't default?


-- 
Eitan Adler
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread claudiu vasadi
On Wed, Jun 13, 2012 at 10:58 PM, Eitan Adler li...@eitanadler.com wrote:

 On 13 June 2012 12:55, Hans Petter Selasky hsela...@c2i.net wrote:
  On Wednesday 13 June 2012 15:21:29 Ian Lepore wrote:
  On Wed, 2012-06-13 at 09:10 +0200, Wojciech Puchar wrote:
Greetings,
   
I was just wondering what it is that FreeBSD does that makes it
 take so
long to boot. Booting into Ubuntu minimal or my own custom Linux
distro, literally takes 0.5-2 seconds to boot up to shell, where
FreeBSD takes about 10-20 seconds. I'm not sure if anything could be
parallelized in the boot process,
  
   mostly kernel time.
  
Note: This isn't really an issue, moreso a curiosity.
  
   true. system that never crash are not often booted
 
  An embedded system may be booted or powered cycled dozens of times a
  day, and boot time can be VERY important.  Don't assume that the way you
  use FreeBSD is the only way.
 
  -- Ian
 
  Try setting:
 
  sysctl hw.usb.no_boot_wait=1

 Can you explain in a bit more detail what this does and why it isn't
 default?


 --
 Eitan Adler
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
explanation ;)

-- 
Best regards,
Claudiu Vasadi
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Richard Yao
The OpenRC is sysvinit compatible, but it has few of sysvinit's flaws.
It has named runlevels, the presence of an init script does not cause it
to start and it is in my opinion a joy to use.

I suggest that you try OpenRC before drawing conclusions. You can
install Gentoo FreeBSD in a jail. There are instructions for this on the
Gentoo wiki:

http://wiki.gentoo.org/wiki/Gentoo_FreeBSD#Howto_run_G.2FFBSD_in_vanilla_FreeBSD.27s_jail

If you find deficiencies, I am certain that the OpenRC developers would
appreciate feedback regarding them.

On 06/13/12 10:19, Nathan Whitehorn wrote:
 On 06/12/12 18:00, Richard Yao wrote:
 On 06/11/12 18:51, Garrett Cooper wrote:
 On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falkbfalk_...@brandonfa.lk  
 wrote:
 Greetings,

 I was just wondering what it is that FreeBSD does that makes it take so 
 long
 to boot. Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes 
 about
 10-20 seconds. I'm not sure if anything could be parallelized in the boot
 process, but Linux somehow manages to do it. The Ubuntu install I do pretty
 much consists of a shell and developers tools, but it still has a generic
 kernel. There must be some sort of polling done in the FreeBSD boot process
 that could be parallelized or eliminated.

 Anyone have any suggestions?

 Note: This isn't really an issue, moreso a curiosity.
  The single process nature of rc is a big part of the problem, as
 is the single AP bootup of FreeBSD right before multiuser mode. There
 are a number of threads that discuss this (look for parallel rc bootup
 or something like that in the current, hacker, and rc archives -- the
 most recent discussion was probably 6~9 months ago).
  Given past experience, a big part of getting past the parallelized
 rc mess would be to make services fail/wait gracefully for all their
 resources to come up before proceeding. It's not easy, but it's
 possible with enough resources.
 HTH,
 -Garrett
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
 licensed System V init system replacement that supports parallel boot.
 Its boot performance is competitive with systemd and Ubuntu's upstart.

 If FreeBSD's init system is serializing the boot process, it might be
 worthwhile to consider importing OpenRC.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 Please don't change any of the user-facing aspects of the RC system. One 
 of the things that brought me (and many others I know) to FreeBSD, 
 besides working sound, was having an rc.conf that was easy to configure 
 instead of the nightmare that is System V init.
 -Nathan
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Eitan Adler
On 13 June 2012 14:16, claudiu vasadi claudiu.vas...@gmail.com wrote:
 If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
 explanation ;)

No, you see a one liner that only explains things if you already
understand what is going on:

hw.usb.no_boot_wait: No USB device enumerate waiting at boot.

Does setting this sysctl mean that my { printer, phone, keyboard }
won't function?***


-- 
Eitan Adler


*** I'm being rhetorical here, but we don't have good sysctl documentation.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread claudiu vasadi
On Wed, Jun 13, 2012 at 8:35 PM, Richard Yao r...@gentoo.org wrote:

 The OpenRC is sysvinit compatible, but it has few of sysvinit's flaws.
 It has named runlevels, the presence of an init script does not cause it
 to start and it is in my opinion a joy to use.

 I suggest that you try OpenRC before drawing conclusions. You can
 install Gentoo FreeBSD in a jail. There are instructions for this on the
 Gentoo wiki:


 http://wiki.gentoo.org/wiki/Gentoo_FreeBSD#Howto_run_G.2FFBSD_in_vanilla_FreeBSD.27s_jail

 If you find deficiencies, I am certain that the OpenRC developers would
 appreciate feedback regarding them.

 On 06/13/12 10:19, Nathan Whitehorn wrote:
  On 06/12/12 18:00, Richard Yao wrote:
  On 06/11/12 18:51, Garrett Cooper wrote:
  On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falkbfalk_...@brandonfa.lk
  wrote:
  Greetings,
 
  I was just wondering what it is that FreeBSD does that makes it take
 so long
  to boot. Booting into Ubuntu minimal or my own custom Linux distro,
  literally takes 0.5-2 seconds to boot up to shell, where FreeBSD
 takes about
  10-20 seconds. I'm not sure if anything could be parallelized in the
 boot
  process, but Linux somehow manages to do it. The Ubuntu install I do
 pretty
  much consists of a shell and developers tools, but it still has a
 generic
  kernel. There must be some sort of polling done in the FreeBSD boot
 process
  that could be parallelized or eliminated.
 
  Anyone have any suggestions?
 
  Note: This isn't really an issue, moreso a curiosity.
   The single process nature of rc is a big part of the problem, as
  is the single AP bootup of FreeBSD right before multiuser mode. There
  are a number of threads that discuss this (look for parallel rc bootup
  or something like that in the current, hacker, and rc archives -- the
  most recent discussion was probably 6~9 months ago).
   Given past experience, a big part of getting past the parallelized
  rc mess would be to make services fail/wait gracefully for all their
  resources to come up before proceeding. It's not easy, but it's
  possible with enough resources.
  HTH,
  -Garrett
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to 
 freebsd-hackers-unsubscr...@freebsd.org
  Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
  licensed System V init system replacement that supports parallel boot.
  Its boot performance is competitive with systemd and Ubuntu's upstart.
 
  If FreeBSD's init system is serializing the boot process, it might be
  worthwhile to consider importing OpenRC.
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to 
 freebsd-hackers-unsubscr...@freebsd.org
  Please don't change any of the user-facing aspects of the RC system. One
  of the things that brought me (and many others I know) to FreeBSD,
  besides working sound, was having an rc.conf that was easy to configure
  instead of the nightmare that is System V init.
  -Nathan
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to 
 freebsd-hackers-unsubscr...@freebsd.org
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


@Eitan: I think is simply does what it says (does not wait for the usb
devices to be ready, instead just activates the usb hub and then the device
will signal when it;s ready). My low level programming sucks and this is
just a hunch.

PS: I tried it on my laptop and as far as I've seen, it behaves like that.

corrections are welcomed.

-- 
Best regards,
Claudiu Vasadi
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Mel Flynn
On 13-6-2012 23:16, claudiu vasadi wrote:

 
 If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
 explanation ;)

Probably why Eitan asked as that description:
a) means nothing to people unfamiliar with device enumerations
b) does not point to a manual page that explains how USB does device
enumerations and why it would account for a significant chunk of the
boot process.

-- 
Mel
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Warren Block

On Tue, 12 Jun 2012, Warren Block wrote:


On Tue, 12 Jun 2012, Richard Yao wrote:


Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.


There have been at least two attempts to parallelize the rc scripts. The more 
recent one was posted on the forums.  AFAIR, one advantage it had was no or 
few changes to the rc scripts, and something like 40% improvement in startup 
time.  I'll post a link if I can find it.


Startup time is a big deal for notebooks.


Thanks to pointers from forum members and moderators, links to various 
attempts to improve startup time:


An older attempt in -current:
http://freebsd.1045724.n5.nabble.com/rc-improvements-wanted-td3911390.html

The forums post:
http://forums.freebsd.org/showthread.php?t=25822

And a newer effort from the PC-BSD folks which sounds very promising:
http://comments.gmane.org/gmane.os.pcbsd.testing/6225
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Russell Cattelan
On 6/13/12 2:16 AM, Poul-Henning Kamp wrote:
 In message alpine.bsf.2.00.1206130909310.73...@wojtek.tensor.gdynia.pl, 
 Wojci
 ech Puchar writes:
 
 One of the major slowdowns is that we do all the device drivers
 serially  synchronously.
Yes definitely.

I have been looking into how to potentially defer or parallelize
device_attach'es. Defer is turning out to be hard enough since each
system is has different requirements to reach a state where it can
run /sbin/init. I've started with the John Baldwin's multipass work
and have a system stops probing/attaching devices and allows the boot
to continue on.

The remaining passes I'm triggering from userspace once the system is up.

This is all very crude at this point and has been an some work just
to understand how the kernel startup code all links together.

Note systemd looks interesting from from a demand based startup scheme
much like apples launchd. (note systemd uses linux process groups so
porting it would take some effort)

Ideally it would be nice to get to the point where many devices are only
attached once there is a demand for it. Say network interfaces for
example: attach it once the init scripts need to config it and then
hopefully in an async fashion. Unfortunately that will require locking
a bit more fine grain than the current Giant lock.

-Russell
 



signature.asc
Description: OpenPGP digital signature


Re: FreeBSD Boot Times

2012-06-13 Thread Mel Flynn
On 12-6-2012 0:51, Garrett Cooper wrote:
 On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falk bfalk_...@brandonfa.lk wrote:
 Greetings,

 I was just wondering what it is that FreeBSD does that makes it take so long
 to boot. Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about
 10-20 seconds. I'm not sure if anything could be parallelized in the boot
 process, but Linux somehow manages to do it. The Ubuntu install I do pretty
 much consists of a shell and developers tools, but it still has a generic
 kernel. There must be some sort of polling done in the FreeBSD boot process
 that could be parallelized or eliminated.

 Anyone have any suggestions?

 Note: This isn't really an issue, moreso a curiosity.
 
 The single process nature of rc is a big part of the problem, as
 is the single AP bootup of FreeBSD right before multiuser mode. There
 are a number of threads that discuss this (look for parallel rc bootup
 or something like that in the current, hacker, and rc archives -- the
 most recent discussion was probably 6~9 months ago).
 Given past experience, a big part of getting past the parallelized
 rc mess would be to make services fail/wait gracefully for all their
 resources to come up before proceeding. It's not easy, but it's
 possible with enough resources.

I realize people are working on this and that it's generally a good
thing, however - please don't underestimate the importance of getting an
accurate list of what boots when and equally important how it shuts down.
rcorder is vary valuable in diagnosing why certain services fail to
start or throw fits, but you have to be able to match it with output
from the rc script (something that not all scripts do I might add).
-- 
Mel
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Mehmet Erol Sanliturk
On Wed, Jun 13, 2012 at 3:49 PM, Russell Cattelan catte...@thebarn.comwrote:

 On 6/13/12 2:16 AM, Poul-Henning Kamp wrote:
  In message alpine.bsf.2.00.1206130909310.73...@wojtek.tensor.gdynia.pl,
 Wojci
  ech Puchar writes:
 
  One of the major slowdowns is that we do all the device drivers
  serially  synchronously.
 Yes definitely.

 I have been looking into how to potentially defer or parallelize
 device_attach'es. Defer is turning out to be hard enough since each
 system is has different requirements to reach a state where it can
 run /sbin/init. I've started with the John Baldwin's multipass work
 and have a system stops probing/attaching devices and allows the boot
 to continue on.

 The remaining passes I'm triggering from userspace once the system is up.

 This is all very crude at this point and has been an some work just
 to understand how the kernel startup code all links together.

 Note systemd looks interesting from from a demand based startup scheme
 much like apples launchd. (note systemd uses linux process groups so
 porting it would take some effort)

 Ideally it would be nice to get to the point where many devices are only
 attached once there is a demand for it. Say network interfaces for
 example: attach it once the init scripts need to config it and then
 hopefully in an async fashion. Unfortunately that will require locking
 a bit more fine grain than the current Giant lock.

 -Russell
 



To reduce the boot time , my opinion is as follows :

During install or by using a program , generate a Hardware Profile File .

By editing it , mark some devices No check ( for example , a network card
or
PS/2 mouse or key board , is not connected , RS-232 , Firewire ,
unused SATA ports , unused IDE ports , etc. ,
then it is not necessary to check them . )

During boot , first read that Hardware Profile File .
Only check ports marked as Check .

After completion of boot , the other ports may checked to update
Hardware Profile File if it is requested in Hardware Profile File .

Later on , assume a new device is attached .

Run the Hardware Profile program to regenerate the Hardware Profile
File ,
or by using dmesg , manually add this device into Hardware Profile File .


For removable devices , if some USB , etc. ports are not used , they all
may be
marked as No Check , for example internal USB ports , unused back panel
ports .


I do not know such a scheme is useful or not , or usable or not .

If I were a boot manager program writer , I would try it .

To my knowledge which I may be wrong , at present there is no such a
facility .


Thank you very much .


Mehmet Erol Sanliturk
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Darren Pilgrim

On 2012-06-13 14:18, Eitan Adler wrote:

On 13 June 2012 14:16, claudiu vasadiclaudiu.vas...@gmail.com  wrote:

If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
explanation ;)


No, you see a one liner that only explains things if you already
understand what is going on:


I believe it pertains to mounting root from a USB device.  When set to 
0, usb_attach tells VFS to wait on the USB device being attached.  This 
results in not mounting root until the USB busses are all fully 
explored.  If you don't rely on any USB devices for multi-user start-up, 
set this to 1 and let the kernel launch multi-user without waiting for 
USB probing.  This is nice for those systems where the BIOS takes a long 
time to release control of any hubs with keyboards attached.


IMO I'd rather have my gear do the boot process in a well-ordered 
fashion and get everything right, than try to shave off a handful of 
seconds at the risk of unreliable booting.  For servers, the baseboard, 
OOB management, and SCSI BIOSes can mean minutes between power-on and OS 
bootstrap, so an extra 20 seconds is nothing. :)

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Hans Petter Selasky
On Wednesday 13 June 2012 23:35:17 Mel Flynn wrote:
 On 13-6-2012 23:16, claudiu vasadi wrote:
  If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
  explanation ;)
 
 Probably why Eitan asked as that description:
 a) means nothing to people unfamiliar with device enumerations
 b) does not point to a manual page that explains how USB does device
 enumerations and why it would account for a significant chunk of the
 boot process.

It's not dangerous. It only means that you can't boot off a USB disk for 
example, because the USB stack will then not wait for the BOOT device at 
mount-root time, if you set this options. 

--HPS
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Eitan Adler
On 13 June 2012 22:13, Hans Petter Selasky hsela...@c2i.net wrote:
 It's not dangerous. It only means that you can't boot off a USB disk for
 example, because the USB stack will then not wait for the BOOT device at
 mount-root time, if you set this options.

This is what I expected, but it should be documented somewhere. Thanks!


-- 
Eitan Adler
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-13 Thread Lars Engels
On Thu, Jun 14, 2012 at 07:13:23AM +0200, Hans Petter Selasky wrote:
 On Wednesday 13 June 2012 23:35:17 Mel Flynn wrote:
  On 13-6-2012 23:16, claudiu vasadi wrote:
   If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
   explanation ;)
  
  Probably why Eitan asked as that description:
  a) means nothing to people unfamiliar with device enumerations
  b) does not point to a manual page that explains how USB does device
  enumerations and why it would account for a significant chunk of the
  boot process.
 
 It's not dangerous. It only means that you can't boot off a USB disk for 
 example, because the USB stack will then not wait for the BOOT device at 
 mount-root time, if you set this options. 

Can we disable that by default and add a boot menu entry like Boot from USB
Disk to enable it?


pgpPxWPragKoo.pgp
Description: PGP signature


Re: FreeBSD Boot Times

2012-06-12 Thread Andriy Gapon
on 12/06/2012 01:21 Brandon Falk said the following:
 Greetings,
 
 I was just wondering what it is that FreeBSD does that makes it take so long 
 to
 boot. Booting into Ubuntu minimal or my own custom Linux distro, literally 
 takes
 0.5-2 seconds to boot up to shell, where FreeBSD takes about 10-20 seconds. 
 I'm
 not sure if anything could be parallelized in the boot process, but Linux
 somehow manages to do it. The Ubuntu install I do pretty much consists of a
 shell and developers tools, but it still has a generic kernel. There must be
 some sort of polling done in the FreeBSD boot process that could be 
 parallelized
 or eliminated.
 
 Anyone have any suggestions?

Do you have a breakdown of the boot time between pre-loader, loader, kernel and
rc stages?

 Note: This isn't really an issue, moreso a curiosity.

Ditto. :-)

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-12 Thread Hans Petter Selasky
On Tuesday 12 June 2012 08:23:33 Andriy Gapon wrote:
 on 12/06/2012 01:21 Brandon Falk said the following:
  Greetings,
  
  I was just wondering what it is that FreeBSD does that makes it take so
  long to boot. Booting into Ubuntu minimal or my own custom Linux distro,
  literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes
  about 10-20 seconds. I'm not sure if anything could be parallelized in
  the boot process, but Linux somehow manages to do it. The Ubuntu install
  I do pretty much consists of a shell and developers tools, but it still
  has a generic kernel. There must be some sort of polling done in the
  FreeBSD boot process that could be parallelized or eliminated.
  
  Anyone have any suggestions?
 
 Do you have a breakdown of the boot time between pre-loader, loader, kernel
 and rc stages?
 
  Note: This isn't really an issue, moreso a curiosity.
 
 Ditto. :-)

BTW: Booting over USB is slow because many small chuncks of data is read 
instead of a few big chunks when loading the kernel and modules at the loader 
time.

--HPS
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-12 Thread Brandon Falk
Ill do some profiling tonight and get back to you then.
On Jun 12, 2012 3:27 AM, Hans Petter Selasky hsela...@c2i.net wrote:

 On Tuesday 12 June 2012 08:23:33 Andriy Gapon wrote:
  on 12/06/2012 01:21 Brandon Falk said the following:
   Greetings,
  
   I was just wondering what it is that FreeBSD does that makes it take so
   long to boot. Booting into Ubuntu minimal or my own custom Linux
 distro,
   literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes
   about 10-20 seconds. I'm not sure if anything could be parallelized in
   the boot process, but Linux somehow manages to do it. The Ubuntu
 install
   I do pretty much consists of a shell and developers tools, but it still
   has a generic kernel. There must be some sort of polling done in the
   FreeBSD boot process that could be parallelized or eliminated.
  
   Anyone have any suggestions?
 
  Do you have a breakdown of the boot time between pre-loader, loader,
 kernel
  and rc stages?
 
   Note: This isn't really an issue, moreso a curiosity.
 
  Ditto. :-)

 BTW: Booting over USB is slow because many small chuncks of data is read
 instead of a few big chunks when loading the kernel and modules at the
 loader
 time.

 --HPS

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-12 Thread Richard Yao
On 06/11/12 18:51, Garrett Cooper wrote:
 On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falk bfalk_...@brandonfa.lk wrote:
 Greetings,

 I was just wondering what it is that FreeBSD does that makes it take so long
 to boot. Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about
 10-20 seconds. I'm not sure if anything could be parallelized in the boot
 process, but Linux somehow manages to do it. The Ubuntu install I do pretty
 much consists of a shell and developers tools, but it still has a generic
 kernel. There must be some sort of polling done in the FreeBSD boot process
 that could be parallelized or eliminated.

 Anyone have any suggestions?

 Note: This isn't really an issue, moreso a curiosity.
 The single process nature of rc is a big part of the problem, as
 is the single AP bootup of FreeBSD right before multiuser mode. There
 are a number of threads that discuss this (look for parallel rc bootup
 or something like that in the current, hacker, and rc archives -- the
 most recent discussion was probably 6~9 months ago).
 Given past experience, a big part of getting past the parallelized
 rc mess would be to make services fail/wait gracefully for all their
 resources to come up before proceeding. It's not easy, but it's
 possible with enough resources.
 HTH,
 -Garrett
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-12 Thread Warren Block

On Tue, 12 Jun 2012, Richard Yao wrote:


Gentoo FreeBSD shares OpenRC with Gentoo Linux. OpenRC is a BSD 2-clause
licensed System V init system replacement that supports parallel boot.
Its boot performance is competitive with systemd and Ubuntu's upstart.

If FreeBSD's init system is serializing the boot process, it might be
worthwhile to consider importing OpenRC.


There have been at least two attempts to parallelize the rc scripts. 
The more recent one was posted on the forums.  AFAIR, one advantage it 
had was no or few changes to the rc scripts, and something like 40% 
improvement in startup time.  I'll post a link if I can find it.


Startup time is a big deal for notebooks.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-11 Thread Garrett Cooper
On Mon, Jun 11, 2012 at 3:21 PM, Brandon Falk bfalk_...@brandonfa.lk wrote:
 Greetings,

 I was just wondering what it is that FreeBSD does that makes it take so long
 to boot. Booting into Ubuntu minimal or my own custom Linux distro,
 literally takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about
 10-20 seconds. I'm not sure if anything could be parallelized in the boot
 process, but Linux somehow manages to do it. The Ubuntu install I do pretty
 much consists of a shell and developers tools, but it still has a generic
 kernel. There must be some sort of polling done in the FreeBSD boot process
 that could be parallelized or eliminated.

 Anyone have any suggestions?

 Note: This isn't really an issue, moreso a curiosity.

The single process nature of rc is a big part of the problem, as
is the single AP bootup of FreeBSD right before multiuser mode. There
are a number of threads that discuss this (look for parallel rc bootup
or something like that in the current, hacker, and rc archives -- the
most recent discussion was probably 6~9 months ago).
Given past experience, a big part of getting past the parallelized
rc mess would be to make services fail/wait gracefully for all their
resources to come up before proceeding. It's not easy, but it's
possible with enough resources.
HTH,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-11 Thread Mark Felder
They have a lot of manpower and can spend a lot of time replacing the boot  
subsystems and all startup scripts every 2 releases. For FreeBSD it's not  
a big issue as most people don't reboot often. If it's an itch you want to  
scratch you're more than welcome to look into it; that seems to be the way  
a lot of little things get worked on around here.


Unfortunately the new systemd rc system (which is pretty awful) has issues  
of its own including the inability to handle /usr on a separate filesystem  
under certain situations.[1]


I honestly prefer the freebsd startup system and rc.conf. Speed isn't an  
issue for me right now. It's even less obvious if you just use an SSD for  
/.


[1] http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD Boot Times

2012-06-11 Thread Mark Saad

On Jun 11, 2012, at 6:21 PM, Brandon Falk bfalk_...@brandonfa.lk wrote:

 Greetings,
 
 I was just wondering what it is that FreeBSD does that makes it take so long 
 to boot. Booting into Ubuntu minimal or my own custom Linux distro, literally 
 takes 0.5-2 seconds to boot up to shell, where FreeBSD takes about 10-20 
 seconds. I'm not sure if anything could be parallelized in the boot process, 
 but Linux somehow manages to do it. The Ubuntu install I do pretty much 
 consists of a shell and developers tools, but it still has a generic kernel. 
 There must be some sort of polling done in the FreeBSD boot process that 
 could be parallelized or eliminated.
 
 Anyone have any suggestions?
 
 Note: This isn't really an issue, moreso a curiosity.
 
 -Brandon
 _

In amd64 builds the system checks it's ram twice . Early in the boot phase 
using a slower method , and latter using a faster SMAP method. In 9.0-RELEASE 
you can disable the early men check via a loader tunable ,  here is a snip it 
from the release notes on 9.0 . It should also be mfc'd to 7, and 8 stable. 

[amd64, i386, pc98] A loader(8) tunable hw.memtest.tests has been added. This 
controls whether to perform memory testing at boot time or not. The default 
value is 1 (perform a memory test).[r224516]

The next it is switch to a modular kernel  this speeds up boot times be 
omitting kernel items you do not need, you can also do this via with a static 
kernel by removing / disabling unused options . Look at the Archives for ha 
hackers there is a ton of info on this. 

Most of the rest of the boot up time is  via init / rc'ng starting an 
configuring things . Right now this is not parallel-ized out the box . Pc-bsd 
has something called fastboot ? I am am not sure how it works but it improves 
load time in their setups . See 
http://lists.pcbsd.org/pipermail/testing/2012-January/006358.html

Other then that, there  are some other things being developed check the FreeBSD 
wiki for a rc.ng management daemon frs or fsr ? 

---

Mark saad | mark.s...@longcount.org


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org