LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-14-2007, 11:45 AM   #61
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301

Read the post by gnashley referenced above. Or here:
http://www.linuxquestions.org/questi...60#post2673760
 
Old 05-14-2007, 12:51 PM   #62
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
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.

Last edited by Alien_Hominid; 05-14-2007 at 03:28 PM.
 
Old 05-14-2007, 02:02 PM   #63
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
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.
 
Old 05-15-2007, 11:02 AM   #64
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-15-2007, 02:49 PM   #65
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I believe it was made for those programs or users who don't run ldconfig before being compiled (compiling).
 
Old 06-14-2007, 07:43 PM   #66
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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 
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted.  Also check that
# devpts is not already mounted before attempting to mount
# it.  With 2.4.x kernels devpts is mounted from an fstab
# entry while with a 2.6.x or newer kernel udev mounts it.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
sleep 3
if /bin/grep -wq devpts /proc/mounts ; then
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
else
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
fi
Note that this is run every time you boot, and it is the only such thing that has the 'sleep' command in it ... a delay command. In this case it waits 3 seconds.

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 ?

Last edited by H_TeXMeX_H; 06-14-2007 at 07:45 PM.
 
Old 06-15-2007, 03:23 PM   #67
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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).
 
Old 09-25-2007, 10:31 AM   #68
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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:
if [ -x /etc/rc.d/rc.hald ]; then
  sh /etc/rc.d/rc.hald start &
fi
Now, you cannot do this with d-bus, because d-bus must be started before hal, or hal won't work. But, d-bus loads quickly, so it's not a problem. Hal normally takes a long time to load, so it does slow things down. Also, I don't think this will affect anything, because nothing started after hal really needs hal, except maybe once you start xserver and kde, but I've found it always loads by then. It works fine for me, especially since I don't use kde and don't care too much for the automount features provided by hal. But, I like 'lshal' because it gives a nice list of all the components on the system, and was very useful on a number of occasions where I was trying to make some scripts for a ppp connection.
 
Old 10-07-2007, 07:36 AM   #69
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
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
 
Old 10-07-2007, 08:27 AM   #70
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
if [ -x /etc/rc.d/rc.pcmcia ]; then
# start /etc/rc.d/rc.pcmcia
. /etc/rc.d/rc.pcmcia start
# The cards might need a little extra time here to initialize.
sleep 5
fi
 
Old 10-07-2007, 10:36 AM   #71
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
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 ?
 
Old 10-07-2007, 10:44 AM   #72
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 10-07-2007, 01:05 PM   #73
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 10-12-2007, 04:47 AM   #74
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
b) Modify 'rc.M' as follows:
Code:
136c136
<   sh /etc/rc.d/rc.hald start
---
>   sh /etc/rc.d/rc.hald start &
218,220c218,220
< if [ -x /usr/sbin/atd ]; then
<   /usr/sbin/atd -b 15 -l 1
< fi
---
> #if [ -x /usr/sbin/atd ]; then
> #  /usr/sbin/atd -b 15 -l 1
> #fi
This being the output of diff. So, just add an '&' after the rc.hald start command, and comment out the part about atd if you never use atd.

c) Modify rc.S as follows:
Code:
39a40,43
> # Boost HDD speed with hdparm
> echo "hdparm -c3 -m16 /dev/hda"
> /usr/sbin/hdparm -c3 -m16 /dev/hda
> 
296,302c300,306
< echo "Mounting non-root local filesystems:"
< sleep 3
< if /bin/grep -wq devpts /proc/mounts ; then
<   /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
< else
<   /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
< fi
---
> #echo "Mounting non-root local filesystems:"
> #sleep 3
> #if /bin/grep -wq devpts /proc/mounts ; then
> #  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
> #else
> #  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
> #fi
But, first, you need to know what is best for your HDD. I think -c3 should be ok for most HDDs. Read 'man hdparm'.

Also do:
Code:
hdparm -i /dev/hda
you'll get something like:
Code:
/dev/hda:

 Model=ST380023A, FwRev=3.33, SerialNo=3KB1BZNK
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:  ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6

 * signifies the current active mode
Check the 'MaxMultSect=16, MultSect=16', MaxMultSect is the maximum setting for '-m' option. Thus I run 'hdparm -c3 -m16 /dev/hda'. Again, read 'man hdparm'.

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 
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted.  Also check that
# devpts is not already mounted before attempting to mount
# it.  With 2.4.x kernels devpts is mounted from an fstab
# entry while with a 2.6.x or newer kernel udev mounts it.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
sleep 3
if /bin/grep -wq devpts /proc/mounts ; then
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
else
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
fi
NOTE: the above may not be safe for all setups ... try at your own risk. It works fine for me.

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.

Last edited by H_TeXMeX_H; 10-12-2007 at 08:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the scripts in /etc/init.d for? blackzone Linux - General 7 09-06-2006 11:10 PM
starting named on boot without init scripts evilchild SUSE / openSUSE 1 03-05-2005 07:46 AM
Optimize boot process? on RedHat9.0 Forced2Morph Linux - General 1 10-12-2004 06:48 AM
X not starting on boot (init scripts) cootetom Mandriva 11 05-05-2004 08:37 AM
slack init scripts gui10 Slackware 11 05-15-2002 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration