View previous topic :: View next topic |
Author |
Message |
aoeuaoue n00b
Joined: 26 Feb 2010 Posts: 31
|
Posted: Mon May 30, 2011 7:23 am Post subject: severe boot slowdown problem: login and mingetty fault. |
|
|
hello,
I installed Gentoo on a qemu VM. Everything is mostly OK, except for a odd booting delay. I need to boot as fast as possible for testing purposes. The problem is shown in the bootchart pic below.
http://ompldr.org/vOHVsNg
Everything finishes prior to 5 seconds, and towards the end of second 4. The there are two programs/services that only start after runscript.sh. These are:
Why they only start at the end of second 4 and not way in the beginning? My /etc/rc.conf looks like this:
No changes.
Then I thought it had to do with /etc/inittab settings because tty's where set at a ridiculous slow baud rate:
Code: | c1:12345:respawn:/sbin/agetty 38400 tty1 linux |
So I followed this site that say maximum baud rate can be set to 921600:
Code: | c1:12345:respawn:/sbin/agetty 921600 tty1 linux |
But this gave me this error:
Code: | INIT: Id "c1" respawning too fast: disabled for 5 minutes |
lolwut???!!!11 This led me into a major WTF discovery, linux uses for login an archaic protocol known as 'baud rate'. And default linux inittab uses 38400 baud rate, and to make matters worse the max baud rate agetty IS HARD CODED TO 115200 baud rate!!!! Googling around to convert stupid baud rate to mb/s was nearly impossible due to the fact that baud rate depends on some extremely low clocks speeds that range from 1mhz to 50mhz (if you're lucky) on top of that baud rate can be either in ASCII, BYTE or BINARY. Digging in google results I was able to get an estimate that's equivalent to 1.5MB/sec for 115200.
wow, just wow. This is nuts, I am running a computer with phenom x4, 64bit OS and DDR2 RAM with a transfer rate of 12.8 GB/s and I am FORCED to login at 1.5MB/sec??? It's almost like a bad dream.
The funny thing is that serial stuff is used in things like BAR CODE scanning in supermarkets. Even on this front industry is already moving towards ethernet/usb3/thunderbolt interfaces. Modern RAID controllers use ethernet interfaces, to name one example.
Anyways, after intensive inquiry I was told to get rid off agetty and use mingetty instead which doesn't have HARD CODED baud rate limits, in fact it doesn't use baud rate to login. My new /etc/inittab looks like this with some ttys turned off:
Code: | c1:12345:respawn:/sbin/mingetty tty1 linux
c2:2345:respawn:/sbin/mingetty tty2 linux
c3:2345:off:/sbin/agetty 115200 tty3 linux
c4:2345:off:/sbin/agetty 115200 tty4 linux
c5:2345:off:/sbin/agetty 115200 tty5 linux
c6:2345:off:/sbin/agetty 115200 tty6 linux |
The change to mingetty still gave me the 10s boot time. I deleted a lot of stuff from runlevels, I booted the VM with a combination of if=virtio/ide/scsi and cache=none/writeback, but no improvement. And during my first tries I got ONCE to boot in 5 SECONDS. Then I changed some stuff and never again reached 5 seconds boot time .
Also since one the two late starting process is login I try commenting in /etc/rc.conf this:
Code: | #rc_shell=/sbin/sulogin |
Or trying /bin/bash:
Code: | rc_shell=/sbin/bash |
But nothing ALWAYS 10 SECONDS!!
The interesting thing in the picture is that everything IS ABLE to get started before 5 seconds. The issue lies squarely in login and mingetty that somehow are NOT PARALLELIZED.
Can someone help me understand whether this is a /etc/rc.conf bug, a problem with login and mingetty or a way to start them in parallel with everything else? Is there way to start those at second ONE? |
|
Back to top |
|
|
danielhilst n00b
Joined: 19 Feb 2011 Posts: 35
|
Posted: Fri Mar 29, 2013 6:27 pm Post subject: |
|
|
I'm with slow boot here to,
after put user name on agetty prompt I need to wait about 10secs before being prompted for password
can make agetty start and random command on ttyX before login so.. I'm trying mingetty _________________ "Do or do not, there is no try" Yoda Master |
|
Back to top |
|
|
danielhilst n00b
Joined: 19 Feb 2011 Posts: 35
|
Posted: Tue Apr 16, 2013 12:24 pm Post subject: |
|
|
My problem was using brtfs as root filesystem.. after start I get a really huge I/O..
Moving for xfs root solves my problem.. _________________ "Do or do not, there is no try" Yoda Master |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|