Read the post by gnashley referenced above. Or here:
http://www.linuxquestions.org/questi...60#post2673760 |
He doesn't say that running it manually is bad. You can't run it manually during boot, but there is no problem, if you run ldconfig before shutdown.
|
Well, he has a point, but I for example haven't had any problems with ldconfig not being run at all (except source installs, ofcourse) for over a year now.
|
I know, I didn't have any problems either. But, I figure Pat V. put it to run at startup for more than one reason. Maybe it's best to make it run at startup. Of course, you could simply run it manually when you need it.
|
I believe it was made for those programs or users who don't run ldconfig before being compiled (compiling).
|
One more thing that can be done to speed up boot time (as I've seen, this is probably the one biggest slowdown left).
So in '/etc/rc.d/rc.S' you'll see something like: Code:
# Mount non-root file systems in fstab, but not NFS or SMB Now, I commented out this entire section, because every time I boot, nothing is mounted .... there are no non-root file systems in fstab or any at all ... they don't exist. So, I propose that is a safe optimization if every time you boot, no non-root file systems in fstab is mounted and you have no non-root filesystems on your system. Does this seem reasonable ... should I add it to the guide with this notice ? |
There seem to be no problems with doing this, so I'll just add it to the post. Boot time on my desktop is 26 sec (from pressing the power on button, about 20 sec from grub).
|
This might as well go here, for Slackware 12.0, the same steps can be used to optimize boot time (and other things concerning speed). However, now the two major slow processes are started with an '&' after them which prevents them from slowing things down, which is great.
So, the same steps can be used, with one possible addition. In '/etc/rc.d/rc.M', I added an '&' to the hal startup script: Code:
# Start HAL: |
I don't use PCMCIA cards - can I just comment out that section of rc.M without anything bad happening, or is that service used for something else too?
if [ -x /etc/rc.d/rc.pcmcia ]; then . /etc/rc.d/rc.pcmcia start # The cards might need a little extra time here to initialize. sleep 5 fi |
Unless you have a pcmica card (for laptops), then you can certainly comment it out. Or, you could just make it non-executable 'chmod a-x /etc/rc.d/rc.pcmcia'. To explain why here's an explanation of what this script means (you may already know some of this):
Code:
# if /etc/rc.d/rc.pcmcia is executable (the '-x'), then |
Can I comment out the sleep in non root fs part if all my non root fs are actual IDE/SATA HDDs?
I am not mounting anything hot pluggable , so no need to wait for that ? |
You could try, but I don't recommend it, because it was put there for a reason. If you have non-root fs to mount, then don't comment that part out.
|
The sleep is there for USB drivers to register. If you are not mounting any USB stuff during bootup you can safely comment out the sleep command.
|
Ok, here's what I did for Slackware 12.0, it might as well be a new post:
1. Optimize scripts in '/etc/rc.d': a) Make un-executable anything that you don't need. For example: Code:
chmod a-x /etc/rc.d/rc.gpm Code:
136c136 c) Modify rc.S as follows: Code:
39a40,43 Also do: Code:
hdparm -i /dev/hda Code:
/dev/hda: If know that you have no 'non-root file systems in fstab' to mount, and every time you boot it says "Mounting non-root local filesystems:" and then nothing was mounted, then you can probably also comment the following section out of rc.S: Code:
# Mount non-root file systems in fstab, but not NFS or SMB 2. Compile a new kernel. Here is a good guide: http://www.kroah.com/lkn/ a) First, start with the generic kernel, and build from there. Run 'make mrproper', copy in the '.config' from the generic kernel, and then run 'make menuconfig' (or whichever one you prefer). b) Search for the words 'not', 'found', 'no', and 'error' in 'dmesg', and take appropriate action ... removing what fails anyway. c) disable 'pcspkr', unless you like annoying beeps every time you make an error. (disable raid/md if you don't use it) d) make floppy a module rather than built-in (on some machines, this is the only way it will work) e) Under 'Block layer -> IO Schedulers' read the help on all of them and see which one you think is best. IMO, the best are CFQ for desktop, and deadline for database/server. f) Under 'Processor type and features': i. Make sure to select your processor in 'Processor family', ii. Enable/disable SMP (Symmetric multi-processing) if you have or don't have it iii. Disable 'Generic x86 support' unless you're making your own distro iv. Put max # CPUs (for multi-core) v. Enable/disable hyperthreading for P4 vi. Enable/disable multi-core and/or SMT scheduler suppport vii. Disable local apic iix. Read and choose 'Preemption Model' (Voluntary is good for desktop) ix. Enable/disable high memory support: if you have near 1GB RAM, enable it x. Set timer frequency acordingly (1000 Hz for desktop) xi. Maybe try enabling '64-bit memory and IO resources' if you have 64-bit processor xii. Turn off 'Compat VDSO support' (glibc-2.3.3 or later) g) Don't forget to fully enable your filesystem I think those are most important performance-wise, the rest is also important, but harder to get right :) The guide should help with that. 3. Install grub or use lilo 'compact' option. You choose. Grub is slightly faster from what I can tell. |
All times are GMT -5. The time now is 02:40 PM. |