[SOLVED] Optimize slack boot process / init scripts ?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After reading the entire post, I find that the problem initially was the use of the huge26.s. You should read the release notes. This would help the 'OP' a lot.
Trimming the kernel would give you an increase of boot performance on the loading of the kernel to ram, especially using the huge26.s kernel on older hardware.
Your hardware is not that old. What is the hard disk specifications other than '40GB'. This could be a lot of the load bottle neck.
Also the amount of ram could be increased to better the load.
Hi,
Your hardware is not that old. What is the hard disk specifications other than '40GB'. This could be a lot of the load bottle neck.
Also the amount of ram could be increased to better the load.
Not much more than that right now (don't have access to it). It's a maxtor I believe. As for RAM ... I'm not running Window$ here am I ? 128 MB is way more than enough. In fact I rarely ever use more than 45-50 MB or RAM ... ever.
P.S. As I said above I trimmed the kernel to 1/3 the size of huge26.s ... more can be done ... but not enough time right now.
Not much more than that right now (don't have access to it). It's a maxtor I believe. As for RAM ... I'm not running Window$ here am I ? 128 MB is way more than enough. In fact I rarely ever use more than 45-50 MB or RAM ... ever.
P.S. As I said above I trimmed the kernel to 1/3 the size of huge26.s ... more can be done ... but not enough time right now.
Hi,
Who's talking about Windows? No need to insult!
From a console do;
Code:
#hdparm -I /dev/hda #replace /dev/hda with your device
You can then identify the specifications for your disk.
As for your ram statement, then why ask for help. Yes, increasing the ram would be better. The amount really depends on how you use your system. If you want to increase performance then look at using ramdisks via media such as ide, sata or scsi. Of course you would then have to increase the ram for a ramdisk, be it virtual or static.
#hdparm -I /dev/hda #replace /dev/hda with your device
You can then identify the specifications for your disk.
I didn't mean to insult ... but I'm thinking anything over 64 MB RAM is great for running anything but Window$. (and, of course ... 32 MB and even 4 MB works alright too) On my older laptop, XP devoured no less than 100 MB RAM on startup ... needless to say ... the laptop was not fun to use at all.
Well, I can't post info from my older laptop (it is ~300 miles away from me ... maybe in 2-4 weeks), but maybe you can help speed up my newer one ... it's pretty fast, but still takes ~47 sec to boot (I say 30 sec is attainable with enough tweaking ... and lots of time to spend). I'll look into tweaking the kernel later today ...
Code:
/dev/hda:
ATA device, with non-removable media
Model Number: HITACHI_DK23EA-60
Serial Number: FG8339
Firmware Revision: 00K2A0A3
Standards:
Used: ATA/ATAPI-5 T13 1321D revision 3
Supported: 5 4 3 & some of 6
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 117210240
device size with M = 1024*1024: 57231 MBytes
device size with M = 1000*1000: 60011 MBytes (60 GB)
Capabilities:
LBA, IORDY(cannot be disabled)
bytes avail on r/w long: 4
Standby timer values: spec'd by Vendor, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = ?
Advanced power management level: 128 (0x80)
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* Advanced Power Management feature set
Address Offset Reserved Area Boot
SET_MAX security extension
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* SMART error logging
* SMART self-test
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
54min for SECURITY ERASE UNIT. 54min for ENHANCED SECURITY ERASE UNIT.
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct
Last edited by H_TeXMeX_H; 02-07-2007 at 04:07 PM.
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054
Rep:
Why are we stuck over here??
WE already discussed this! Recompile your kernel. By removing unnecassary rc.<somethings> you at most bring it down to 30 secs. I recompiled my kernel and on 2.6.20 I am on 20secs boot-up time,WITH MOST of my requirements built in (not modules). It hardly takes anytime to recompile. Read the LKN book I told ya earlier abt.
The 60GB drive is functioning at 'udma5'. The drive is a 4200 rpm drive with only 2mb buffer. The drive multisector is not set, try the 'hdparm -m 16 /dev/hda', you might have to start at a lower setting (2,4,8,16) for the drive.
Code:
Capabilities:
LBA, IORDY(cannot be disabled)
bytes avail on r/w long: 4
Standby timer values: spec'd by Vendor, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = ?<--here gws
Advanced power management level: 128 (0x80)
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow control=120ns
Read 'man hdparm' to get a definition.
You could speed up the process for this laptop with new HD hardware.
As for the 40GB on the other laptop, just issue the 'hdparm -I /dev/hda' to find if you can tweak it.
The 60GB drive is functioning at 'udma5'. The drive is a 4200 rpm drive with only 2mb buffer. The drive multisector is not set, try the 'hdparm -m 16 /dev/hda', you might have to start at a lower setting (2,4,8,16) for the drive.
Read 'man hdparm' to get a definition.
Thanks for the tip ... did that and put it in the startup scripts (beginning of rc.M). Boot time down to 40 sec (after new even more optimized kernel and this is from power button to login prompt).
I'll post again when I got a hold of my older laptop.
Well, I was thinking to put it either at the beginning of rc.M or end of rc.S ... which is better ? (or is it safe to put it at the beginning of rc.S ?)
(or is it safe to put it at the beginning of rc.S ?)
Does anyone have an answer (onebuck?)
Personally I have separate partitions for a number of directories, eg. /home. This takes time during the boot process as it checks each partition, replays journals as necessary, etc. All this activity precedes rc.M, so I was thinking it would be best, if possible, to issue this command before all that checking and mounting activity.
Personally I have separate partitions for a number of directories, eg. /home. This takes time during the boot process as it checks each partition, replays journals as necessary, etc. All this activity precedes rc.M, so I was thinking it would be best, if possible, to issue this command before all that checking and mounting activity.
Brian
Actually, I was thinking much the same thing when deciding where to put it ... "Laugh in the face of danger" ... nah, not quite the right motto ... I'd rather play it safe unless someone can verify that it is indeed safe. I'm thinking that rc.S is system critical stuff ... so yeah, I'd have to know that it is safe to put it there
Ok, I now have access to the machine and have done the following:
1) memtest86+, newest version, it ran several times and reported no errors.
2) more info on the HDD
Code:
hdparm -i /dev/hda
/dev/hda:
Model=TOSHIBA MK4018GAP, FwRev=M0.03 A, SerialNo=X1142257G
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=46
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5
* signifies the current active mode
hdparm -I /dev/hda
/dev/hda:
ATA device, with non-removable media
Model Number: TOSHIBA MK4018GAP
Serial Number: X1142257G
Firmware Revision: M0.03 A
Standards:
Supported: 5 4 3
Likely used: 6
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 78140160
device size with M = 1024*1024: 38154 MBytes
device size with M = 1000*1000: 40007 MBytes (40 GB)
Capabilities:
LBA, IORDY(can be disabled)
bytes avail on r/w long: 46
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: unknown setting (0x0080)
DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_VERIFY command
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* Advanced Power Management feature set
SET_MAX security extension
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* SMART error logging
* SMART self-test
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
not supported: enhanced erase
44min for SECURITY ERASE UNIT.
HW reset results:
CBLID- above Vih
Device num = 0 determined by the jumper
Checksum: correct
hdparm -tT /dev/hda (ran 5 times)
/dev/hda:
Timing cached reads: 836 MB in 2.01 seconds = 416.32 MB/sec
Timing buffered disk reads: 68 MB in 3.07 seconds = 22.14 MB/sec
/dev/hda:
Timing cached reads: 840 MB in 2.01 seconds = 418.78 MB/sec
Timing buffered disk reads: 68 MB in 3.08 seconds = 22.10 MB/sec
/dev/hda:
Timing cached reads: 848 MB in 2.01 seconds = 422.60 MB/sec
Timing buffered disk reads: 68 MB in 3.08 seconds = 22.11 MB/sec
/dev/hda:
Timing cached reads: 836 MB in 2.00 seconds = 417.32 MB/sec
Timing buffered disk reads: 68 MB in 3.08 seconds = 22.11 MB/sec
/dev/hda:
Timing cached reads: 832 MB in 2.00 seconds = 416.00 MB/sec
Timing buffered disk reads: 68 MB in 3.08 seconds = 22.09 MB/sec
I've got the boot time down to 1 minute total. I compiled a new, smaller kernel and that helped some. I was also thinking of taking the time to compile a custom kernel (this takes a long time, it took about 6 hours on my desktop and it may result in a kernel that is slightly bigger than the 2.6.x generic. Not sure if that's what I want on this machine.)
Is that just the best this machine can do ? It might be I guess. But, if anyone has any ideas, please tell me.
Another thing to check for folks looking to speed up boot and other IDE related stuff, is to look into your BIOS. I have an AMIBIOS, which offers selections for 16 bit and 32 bit datalength on the IDE IO bus. 16 is the default setting, but, you guessed it, setting the speed to 32 really made a difference!
H_TeXMeX_H, I have this same problem with my laptop. From what i have been able to find out the reason it is so slow is because when lilo loads the computer is still in a "failsafe" mode and not running the cpu at full speed. The only workaround i have found was to run grub instead of lilo.
H_TeXMeX_H, I have this same problem with my laptop. From what i have been able to find out the reason it is so slow is because when lilo loads the computer is still in a "failsafe" mode and not running the cpu at full speed. The only workaround i have found was to run grub instead of lilo.
Great, thanks man, I tried that and it definitely boots faster ... 15 to 20 sec faster
So, let's see, switching to grub actually shaved off more like 18 sec., and then I decided to compile and optimize the kernel even more, which shaved off another 3 sec.
So, now boot time is 45-48 sec (it was 1 min to 1 min 10 sec before using grub) ... kinda varies, but it's a lot better than when I started. I didn't time it well (I should have), but it was about 1 min 30 sec before any optimizations.
@ GrapefruiTgirl
I looked through the BIOS options, but unfortunately there is nothing performance related in there, not on this computer. On my desktop there is, but not on this old laptop. Oh, well. Thanks anyway.
@ onebuck
I was wrong, the computer actually has 256 MB RAM So, it should be good for anything but Window$. In fact, XP used up an amazing 200 MB RAM, or there was 40-56 MB free Really, I checked ... should have taken a screenshot of it.
Thanks again all
Last edited by H_TeXMeX_H; 03-13-2007 at 09:59 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.