LinuxQuestions.org
Help answer threads with 0 replies.
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-13-2005, 09:50 PM   #1
m_rizvan_m
LQ Newbie
 
Registered: May 2005
Posts: 18

Rep: Reputation: 0
Slackware 10.1 Boot Speed Performance?


I use Slackware as my Desktop OS, I have BootSplash and Supermount compiled into the Slackware 10.1's kernel 2.4.29 using the lck1 patch. I'm happy with the kernel's performance.

Slackware 10.1 boot faster but I have been bothered by the delay caused by ldconfig which runs at the system startup.

The ldconfig takes around 5-10 secs to update the library links, after RTFM (reading the fine manual) of ldconfig,

I changed in /etc/rc.d/rc.M file's ldconfig section:

from:
Code:
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
  echo "Updating shared library links:  /sbin/ldconfig"
  /sbin/ldconfig 
fi
To:
Code:
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
  echo "Updating shared library links:  /sbin/ldconfig"
  /sbin/ldconfig -n
fi
I measured the boot time, it was earlier 41 seconds to get to login prompt from lilo screen, and now it is just 35 sec on my Celeron 500 system. I have saved 6 seconds in the Slackware startup. The boot time must be less on faster systems!

my worry is: Is it ok to use ldconfig -n for day to day slackware use?

Could you also tell your startup time upto console login prompt. Thanks.
 
Old 05-14-2005, 03:38 AM   #2
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Rep: Reputation: 31
Here's a solution that Tinkster suggested and that I'm using. It runs ldconfig five minutes after boot, when, presumably, you won't mind it doing its thing in the background:

Quote:
You edit /etc/rc.d/rc.local, append line
/usr/bin/echo "ldconfig" | /usr/bin/at now +5minutes



That will run ldconfig 5 minutes after the boot-scripts
have finished, X and your "most important apps"
should be up & running, and the process in the
background shouldn't bother you too much
This was originally posted in this thread: http://www.linuxquestions.org/questi...5&pagenumber=2

Last edited by dhave; 05-14-2005 at 03:44 AM.
 
Old 05-14-2005, 04:00 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
hey thanks for pointing-out that awesome trick, clawhead...

and thanks to Tinkster for the original post...

i'm gonna try this out on my slackware desktop...
 
Old 05-14-2005, 09:03 AM   #4
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
I know this is off topic and I apologise if this upsets anyone, but it is not ldconfig that annoys me at start-up.

It is the disk checking, I have 10 partitions over 2 disks, mainly formatted with reiserfs. At boot each partition is checked. Many moons ago, when I used debian, each partition was checked after a different number of boots. Therefore no more than two but usually only one partition was checked at each boot-up.

If I could do this with slackware it would save perhaps 30-60 seconds of boot time.

Any ideas?

samac
 
Old 05-14-2005, 09:09 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
that's weird... i use reiserfs and even after an unclean reboot the check takes less than two seconds (after a clean reboot it takes less than ONE second)... it's one of the many reasons i moved from ext3 to reiserfs...
 
Old 05-14-2005, 09:24 AM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Probably different transfer rates, which would be dictated by the speed of the ide-bus, but the majority of my boot time is taken by 10 partition checks.

Any idea what file controls this part of the boot procedure.

samac
 
Old 05-14-2005, 09:59 AM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by samac
I know this is off topic and I apologise if this upsets anyone, but it is not ldconfig that annoys me at start-up.

It is the disk checking, I have 10 partitions over 2 disks, mainly formatted with reiserfs. At boot each partition is checked. Many moons ago, when I used debian, each partition was checked after a different number of boots. Therefore no more than two but usually only one partition was checked at each boot-up.

If I could do this with slackware it would save perhaps 30-60 seconds of boot time.

Any ideas?

samac
You don't want to do anything like that with a journaled FS. ReiserFS needs a quick check on every boot to see if it was in the middle of something...if it was, you *DO NOT* want it to continue...if it wasn't, it's fine, and very quick.
 
Old 05-14-2005, 10:09 AM   #8
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
OK many thanks, I will leave things as they are.

samac
 
Old 05-14-2005, 10:51 AM   #9
DaWallace
Member
 
Registered: Feb 2004
Location: Southern Maine, United States
Distribution: Slackware Ubuntu Debian FreeBSD
Posts: 418

Rep: Reputation: 31
don't forget that you can disable hotplug and save lots of time.

just make sure you have all of the modules you need loaded by some other means, usually /etc/rc.d/rc.modules.
 
Old 05-18-2005, 05:38 PM   #10
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Quote:
Originally posted by dhave
Here's a solution that Tinkster suggested and that I'm using. It runs ldconfig five minutes after boot, when, presumably, you won't mind it doing its thing in the background:


This was originally posted in this thread: http://www.linuxquestions.org/questi...5&pagenumber=2
Quick questions why wouldn't ldconfig run when I do echo "ldconfig"? I know it's not running because it only echoes 'ldconfig' to standard output and nothing happens, but when I run 'ldconfig' in the shell it works. I know it works when I just run 'ldconfig' without the echo because there is HD activity. When I do it with the 'echo "ldconfig"' nothing happens except the 'echo' function.

Is there a relation with "/usr/bin/at now +5minutes" that helps execute the actual 'ldconfig' binary?

and yes it does...heh


thanks for the tips

Last edited by houler; 05-18-2005 at 05:58 PM.
 
Old 05-18-2005, 08:17 PM   #11
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
the echo command will simply print the given string (may be formated or not).
When you execute: /usr/bin/echo "ldconfig" | /usr/bin/at now +5minutes
"echo" is actually telling to "at" that ldconfig is like a string entered from keyboard, which is what at needs.
The "at" command accepts a time as parameter (in this case +5minutes) and then it asks you for a command, by passing "ldconfig" string in the pipe, you're actually making "at" to think that "ldconfig" string was entered by the user.
That's the funciton of the | character, to tell a program to read the output of a program executed before as input for it.

If you use "ldconfig | /usr/bin/at now +5minutes" it won't work, because you're executing "ldconfig" program and passing it's output (it doesn't have) to "at".
But when you use "echo "ldconfig" | /usr/bin/at now +5minutes" you're executing the "echo" command which will output just "ldconfig" (a string) and pass that to "at".

Last edited by gbonvehi; 05-18-2005 at 08:26 PM.
 
Old 05-18-2005, 10:31 PM   #12
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Quote:
Originally posted by gbonvehi
the echo command will simply print the given string (may be formated or not).
When you execute: /usr/bin/echo "ldconfig" | /usr/bin/at now +5minutes
"echo" is actually telling to "at" that ldconfig is like a string entered from keyboard, which is what at needs.
The "at" command accepts a time as parameter (in this case +5minutes) and then it asks you for a command, by passing "ldconfig" string in the pipe, you're actually making "at" to think that "ldconfig" string was entered by the user.
That's the funciton of the | character, to tell a program to read the output of a program executed before as input for it.

If you use "ldconfig | /usr/bin/at now +5minutes" it won't work, because you're executing "ldconfig" program and passing it's output (it doesn't have) to "at".
But when you use "echo "ldconfig" | /usr/bin/at now +5minutes" you're executing the "echo" command which will output just "ldconfig" (a string) and pass that to "at".

Wow wasn't expecting an elaborate explanation. Thanks
 
Old 05-19-2005, 08:25 AM   #13
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
I improved my boot-up time (considerably) by

- turning off hotplug
- commenting out /sbin/ldconfig in /etc/rc.d/rc.M
- commenting out /usr/X11R6/bin/fc-cache in /etc/rc.d/rc.M

With the exception of hotplug (which some may find useful), I really don't understand why PV thinks these things are necessary during boot up. (They should be done during normal operation as required.) I would also comment out "/sbin/depmod -a" in rc.modules for being of dubious necessity, but it doesn't take long enough for me to care about it.
 
Old 05-19-2005, 02:52 PM   #14
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Rep: Reputation: 15
Quote:
Originally posted by Nobber
I improved my boot-up time (considerably) by

- turning off hotplug
- commenting out /sbin/ldconfig in /etc/rc.d/rc.M
- commenting out /usr/X11R6/bin/fc-cache in /etc/rc.d/rc.M

With the exception of hotplug (which some may find useful), I really don't understand why PV thinks these things are necessary during boot up. (They should be done during normal operation as required.) I would also comment out "/sbin/depmod -a" in rc.modules for being of dubious necessity, but it doesn't take long enough for me to care about it.
I have done exactly as Nobber has. ldconfig, fc-cache, etc. these things are not necessary to run every boot. You only need to run ldconfig when you compile and install programs yourself afaik, or in the case of a major upgrade, fc-cache only when you add / remove fonts manually.
 
Old 05-19-2005, 08:33 PM   #15
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
I have a better trick: i put ldconfig stuff in /etc/rc.d/rc.0 (the shutdown script).
 
  


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
RFG: Speed performance issues merana Linux - Hardware 0 10-28-2005 06:37 AM
boot speed and performance questions wrat Debian 4 11-20-2004 12:02 PM
System performance, tweaking, and SPEED ethikiah Linux - General 3 09-29-2004 07:48 PM
First boot of slackware, poor performance Patgod Slackware 10 03-27-2004 11:50 PM
Performance...I'm talkin Speed Baby! Goatdemon Linux - General 13 05-24-2002 04:05 AM

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

All times are GMT -5. The time now is 09:41 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