[gentoo-amd64] Re: boottime

2008-11-13 Thread Duncan
Mark Haney [EMAIL PROTECTED] posted
[EMAIL PROTECTED], excerpted below, on  Wed, 12 Nov 2008
15:43:35 -0500:

 [EMAIL PROTECTED] wrote:
 
 I allready took everything out of my kernel but is there a big
 difference with modules or buildin's ? And X allready starts at boot.
 
 And why shouldn't I use genkernel?
 
 I don't know about moving X, but this is a thread I thought about
 starting yesterday so this is very timely.  I'll look at X to see how
 things are affected.

I'd suggest /not/ putting X in the boot runlevel, unless you're one of 
the It's not booted until I have a nice pretty GUI with a pointer to 
click stuff because I don't know how to use the command line folks, and 
on Gentoo at least, those folks should be comparatively rare, since 
Gentoo never has been and is not now designed for folks who aren't 
willing to be their own admins, including those scared of the command 
line.  There's other distributions that are a better fit for people who 
prefer to let someone else do the command line and admin stuff.

Here, even tho I'm on an always-on Internet connection, I boot to 
initlevel 2, nonetwork, and without X as well.  I start all services 
(including named and privoxy, which are normally of use only when the 
net's up, but don't require it; they start fast enough) except ntp/ntp-
client and the network they depend on.  This way, if I'm just doing local 
admin work, say backups, or doing a git-bisect/build/install/reboot cycle 
while debugging a kernel regression, I get a faster boot, and don't end 
up constantly connecting to the NTP servers I sync to, every time I 
reboot.

I have one each of the gpm triple-click functions set to init 3 (network) 
and init 2 (nonetwork) so I can switch between them without having to 
sudo.  That way, if I AM going to be starting X (or doing something else 
that needs the network and Internet connection), I can log in as my 
regular user, and triple-click to start the network and time services.

Then I run startx as my regular user if that's what I want to do.  
Actually, I have a couple scripts that set XSESSION appropriately and 
take care of a bit of additional housekeeping for whatever X environment 
I'll be running (called k3 and k4, for the kde3 and kde4 environments I 
run), then invoke startx.  I have it setup so I can source these scripts 
and it'll log me out at the text VC as it starts X and whichever KDE, so 
I don't have the unused text login sitting there wasting resources.

So I don't have X in any runlevel, DEFINITELY not in the boot runlevel, 
as I start it from my text login using a script that calls startx.  Of 
course, some folks may indeed want X started in their default runlevel, 
which is fine, but putting it in boot, so it runs for every runlevel 
except single, just doesn't make sense to me, because there are valid 
tasks one may wish to do at the text console, in which case starting X 
just wastes startup time and computer resources.

As for fast boots...

Really, here, the BIOS initialization takes longer than anything else.  
Here are some observations and optimizations I've made.

* Under some circumstances, fsck can take a significant amount of time, 
particularly if there are a lot of partitions to fsck and mount, but 
since I use reiserfs, which doesn't really do more in a boot-time fsck 
than it does automatically at mount anyway (if there's something damaged 
beyond what it can automatically fix at mount, you gotta run the longer 
fsck with it unmounted, anyway), so I just set the fstab fsck field to 0 
for all partitions and let reiserfs do its thing at mount.

* As already mentioned by others, initramfs/initrd take significant 
additional time, as do loading modules.  Therefore, build into the kernel 
(not as modules) all your normally loaded modules and drivers, and don't 
run an initramfs/initrd unless you have special case needs that require 
it.  Additionally, don't build stuff that's never loaded at all, and 
build as modules (and don't load by default) stuff that's only 
occasionally used.  As examples, I build fat/vfat, ext2 (and no ext3 at 
all, my system's all reiserfs as mentioned above), floppy, loop, and usb-
storage as modules because I don't use them much of the time.

* With stable baselayout (1.x), the parallel startup didn't work too 
well.  It works much better with ~baselayout (2.0.0) and openrc (0.3-rc1 
is what I have currently), but it's still off by default, and there may 
be a few dependency tweaks necessary to get everything loading in the 
right order, depending on your system configuration.  Of course, 
baselayout 2 and openrc are quite different than the old baselayout 1 as 
well, so if you upgrade, be prepared for a decent amount of reconfiguring 
and perhaps some tweaking before you get your boot sequence running 
smoothly.  There are definitely reasons it's not marked stable yet, and 
probably won't be any time in the real near future, either.  Openrc in 
particular is still under heavy 

Re: [gentoo-amd64] Re: boottime

2008-11-13 Thread Volker Armin Hemmann
On Thursday 13 November 2008, Matthias Bethke wrote:
 Hi Volker,

 on Thu, Nov 13, 2008 at 11:29:22AM +0100, you wrote:
  there are people who know how to use a commandline and STILL want X. In
  fact out of 100 boots I want X 99 times - and I guess most people want X
  too. So just because you 'think' gentoo users don't like X, does not make
  it true at all.

 I agree having X in the default runlevel is a good idea for the vast
 majority of users, even the most CLI-savvy. But having it in the boot
 runlevel was a major PITA when SuSE started doing it and I had to manage
 some installations that used NIS and LDAP. We wanted a nice user list in
 kdm for students to click on, and it just doesn't work if *dm starts
 before ypbind. You can choose not to have the user list or live with the
 inconsistent broken look on first boot, or put X back in level 5.

 cheers,
   Matthias

that might all be true for your setup, but for a single user desktop putting X 
in boot (in gentoo), can be a GOOD THING to do. 
Why wait for cron, hddtemp, nscd, metalog, postfix, cpufrequtils, smartd? It 
is all very non essential - this services can all savely start while you are 
typing in your password at that nice kdm prompt.




Re: [gentoo-amd64] Re: boottime

2008-11-13 Thread Matthias Bethke
Hi Volker,
on Thu, Nov 13, 2008 at 11:29:22AM +0100, you wrote:
 there are people who know how to use a commandline and STILL want X. In fact 
 out of 100 boots I want X 99 times - and I guess most people want X too. So 
 just because you 'think' gentoo users don't like X, does not make it true at 
 all.

I agree having X in the default runlevel is a good idea for the vast
majority of users, even the most CLI-savvy. But having it in the boot
runlevel was a major PITA when SuSE started doing it and I had to manage
some installations that used NIS and LDAP. We wanted a nice user list in
kdm for students to click on, and it just doesn't work if *dm starts
before ypbind. You can choose not to have the user list or live with the
inconsistent broken look on first boot, or put X back in level 5.

cheers,
Matthias
-- 
I prefer encrypted and signed messages. KeyID: FAC37665
Fingerprint: 8C16 3F0A A6FC DF0D 19B0  8DEF 48D9 1700 FAC3 7665


pgpfVRy7mWoTV.pgp
Description: PGP signature


Re: [gentoo-amd64] Re: boottime

2008-11-13 Thread Richard Freeman

Volker Armin Hemmann wrote:

*snip the rest because it is too long to read and usual duncan talk*.


Let's be nice.  I'll confess I often don't read everything duncan types, 
but it isn't like he spams the list such that you can't easily hit 
delete if you're not interested in his two emails per month.


For those topics I'm interested in I find his perspective helpful.  Even 
if I don't always agree with everything he posts there is often some 
useful stuff in there.  I still use his CFLAGS 80% of the time.


Regardless, your post would have stood just fine on its own without the 
personal attacks.  I agree that booting into X is hardly the exception 
among gentoo users/devs/etc.  If I were running a back-end server I'd 
absolutely refrain from booting into X (granted, such as server would 
DEFININTELY run NTP), but there's no sense having to use startx on a 
desktop unless you really do spend most of your time staring at a shell.





Re: [gentoo-amd64] Re: boottime

2008-11-13 Thread Volker Armin Hemmann
On Thursday 13 November 2008, Duncan wrote:
 Mark Haney [EMAIL PROTECTED] posted
 [EMAIL PROTECTED], excerpted below, on  Wed, 12 Nov 2008

 15:43:35 -0500:
  [EMAIL PROTECTED] wrote:
  I allready took everything out of my kernel but is there a big
  difference with modules or buildin's ? And X allready starts at boot.
 
  And why shouldn't I use genkernel?
 
  I don't know about moving X, but this is a thread I thought about
  starting yesterday so this is very timely.  I'll look at X to see how
  things are affected.

 I'd suggest /not/ putting X in the boot runlevel, unless you're one of
 the It's not booted until I have a nice pretty GUI with a pointer to
 click stuff because I don't know how to use the command line folks, and
 on Gentoo at least, those folks should be comparatively rare, since
 Gentoo never has been and is not now designed for folks who aren't
 willing to be their own admins, including those scared of the command
 line.  There's other distributions that are a better fit for people who
 prefer to let someone else do the command line and admin stuff.

there are people who know how to use a commandline and STILL want X. In fact 
out of 100 boots I want X 99 times - and I guess most people want X too. So 
just because you 'think' gentoo users don't like X, does not make it true at 
all.
 

 Here, even tho I'm on an always-on Internet connection, I boot to
 initlevel 2, nonetwork, and without X as well.  I start all services
 (including named and privoxy, which are normally of use only when the
 net's up, but don't require it; they start fast enough) except ntp/ntp-
 client and the network they depend on.  This way, if I'm just doing local
 admin work, say backups, or doing a git-bisect/build/install/reboot cycle
 while debugging a kernel regression, I get a faster boot, and don't end
 up constantly connecting to the NTP servers I sync to, every time I
 reboot.

and for most people such a runlevel would be very, very useless. Add to that 
that after a boot you have to log in as root and then switch to the right boot 
level - another 20seconds lost.

*snip the rest because it is too long to read and usual duncan talk*.

a) yes we know you have great hardware
b) the topic was 'how to boot faster' and not 'how to make everything suck the 
duncan way'.

Why fiddle around with breaky scripts, if kdm, gdm, whatever can do that for 
you? In a proven and stable way?

And why booting into a useless runlevel (and a runlevel without network is 
useless, for doing root stuff - except everything is broken) and then start 
all the stuff you need manually? Sounds really, really stupid. 

c) putting X in boot is something even gentoo devs do. So not only stupid 
users are 'infected' with that meme

d) command line and X are not exclusive. In fact - konsole beats the shit out 
io vts in every aspect. And I can have a lot more konsole sessions then vt's.



[gentoo-amd64] Re: boottime

2008-11-13 Thread Duncan
Richard Freeman [EMAIL PROTECTED] posted [EMAIL PROTECTED],
excerpted below, on  Thu, 13 Nov 2008 06:53:51 -0500:

 Let's be nice.  I'll confess I often don't read everything duncan types,
 
 For those topics I'm interested in I find his perspective helpful.  Even
 if I don't always agree with everything he posts there is often some
 useful stuff in there.  I still use his CFLAGS 80% of the time.

Thanks...

 Regardless, your post would have stood just fine on its own without the
 personal attacks.

That applies to me to some extent as well.  It wasn't obviously personal 
as I kept it generally worded and allowed exceptions for X in default 
(just not in boot), but I could have cushioned it with an explicit 
disclaimer to the effect that it was /not/ targeted at anyone 
specifically and was simply my opinion.

IOW, maybe my post didn't go to the personal attack degree his did, but I 
did sort of ask for it as it could have been worded better even if saying 
the same thing, and could/should really learn something from the results 
of the exchange as well.

-- 
Duncan - List replies preferred.   No HTML msgs.
Every nonfree program has a lord, a master --
and if you use the program, he is your master.  Richard Stallman