LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Optimize slack boot process / init scripts ? (https://www.linuxquestions.org/questions/slackware-14/optimize-slack-boot-process-init-scripts-525364/)

H_TeXMeX_H 02-03-2007 08:28 PM

Optimize slack boot process / init scripts ?
 
I've heard it can be very beneficial to change and optimize the init / boot scripts to make Slackware boot faster.

1) Where can I look to get some specific guidance on how to do this ? Or is this a bad idea ?

It's just that Slackware seems to take kinda long to boot up.

While I'm here, I'd like to also ask this (still about Slackware boot process):

2) I installed Slackware on an old VAIO computer, specs are approximately:

Pentium III M - 1.3 Ghz
128 MB RAM
16 MB ATI Radeon - M :(
40 GB HDD

The problem is it takes forever to boot. It gets really slow in the early booting process, when it is "Checking BIOS integrity" and then the dots '.............................................' appear really really really slow.

Why ? What is it doing that is taking this long ? I've always though it's loading the kernel into RAM ... is this so ? How can I make it boot faster, if at all possible ? Of course, changing the init scripts will also be helpful, cuz that takes a while too.

Thanks.

Th3_J3st3R 02-03-2007 10:18 PM

Have you recompiled your kernel selecting specific options to reflect your hardware?
I had the same thing when I would recompile and select options that my system didnt support, as for specifics I couldnt tell you. What kernel are you using? Or which one did you select when you installed?

H_TeXMeX_H 02-03-2007 10:49 PM

Kernel on both my current machine and the older one is huge26.s.

I was thinking of recompiling, but I usually don't like to unless I really have to.

They are both laptops.

I was thinking of trying a 2.4.x kernel to see if it would speed things up, but it has a usb mouse, and I've had problems with the 2.4.x kernel and usb mice. Maybe I'll try. I don't have access to the older computer right now, so I can't do much there. But I can optimize things here on my newer laptop.

(I'm not going to recompile a 2.4.x kernel, I would like to use a 2.6.x kernel for many many reasons ... maybe I'll recompile that, but not right now)

H_TeXMeX_H 02-04-2007 12:30 PM

To clarify, the slowest part is when it says:

Code:

Loading Linux......................................................
(right before the BIOS integrity verified or whatever)

Each dot takes 5 seconds to appear ... which is insane if you ask me.

So any ideas on why it would boot so slow ? Is this when it is loading the kernel into RAM ? If so, maybe the HDD is really slow at being read, or the RAM isn't working properly ? (I'll check that RAM with memtest when I next have access to that computer, and I'll check the HDD to make sure DMA is enabled if that matters)

jschiwal 02-04-2007 12:36 PM

Do you maybe have the "nodma" or "noacpi" boot options?

zetabill 02-04-2007 12:43 PM

Let us know how the memory and the HD are but I tend to think that if you don't have any problems except loading the kernel then it might be something with the kernel. This is where the kernel is loaded into RAM, yes. You might have to check around your kernel config to see if there's anything funky in there.

In my honest opinion you might have to recompile the kernel if for any reason to have a slimmer kernel so that it's not loading as much information into RAM. It's not completely impossible that there's some driver in there that might be "confusing" things when drivers get loaded for the disk or the processor.

You may also want to
Code:

lilo -t -v
This will do a dry run of lilo and let you know if there are any errors in the bootloading process.

EDIT: jschiwal brings up a good point. What's being passed to the kernel at boot?

H_TeXMeX_H 02-04-2007 12:58 PM

Quote:

Originally Posted by zetabill
Let us know how the memory and the HD are but I tend to think that if you don't have any problems except loading the kernel then it might be something with the kernel. This is where the kernel is loaded into RAM, yes. You might have to check around your kernel config to see if there's anything funky in there.

In my honest opinion you might have to recompile the kernel if for any reason to have a slimmer kernel so that it's not loading as much information into RAM. It's not completely impossible that there's some driver in there that might be "confusing" things when drivers get loaded for the disk or the processor.

You may also want to
Code:

lilo -t -v
This will do a dry run of lilo and let you know if there are any errors in the bootloading process.

EDIT: jschiwal brings up a good point. What's being passed to the kernel at boot?

I have no boot options being passed to kernel.

I'll do the following when I get there and post back results (note that it will take ~ 1 mo. to get back to the other computer ... it's at my other house)

1) Check RAM with memtest
2) Check HDD for DMA enabled
3) Dry run lilo and see if it reports errors
4) Recompile kernel :( (I'll probably try 2.4.x and see if usb mouse works, if so then I'll use that)

duryodhan 02-04-2007 01:18 PM

The fact that it is hangin on boot.......... shows there is something wrong on your kernel compilation. Seriously, stay away from huge26.s!!! I use it only when I want to find out what modules I need for specific hardware. Just recompile kernel (it hardly takes 15-20 mins) and it will save you many many hours if you configure it correctly.
If you don't want to recompile the kernel, use 2.6.18 kernel packages from the DVD/testing.

Changing the boot scripts won't make any difference in above.

But anyways , see my thread http://www.linuxquestions.org/questi...d.php?t=499631 . There is a pretty long discussion there , I got my boot-up time right now to 25 secs which is pretty okay (and I have included all of what I need).


Prefer 2.6 for kernel recompilation, no need to make dependencies etc. (much much easier).

to check for dma : hdparm /dev/hda | gerp dma

And btw, you used the word "optimize", that can only be done with kernel recompile. Other methods may just reduce no. of services etc.(like sendmail/httpd/mysqld)

H_TeXMeX_H 02-04-2007 02:38 PM

Quote:

Originally Posted by duryodhan
But anyways , see my thread http://www.linuxquestions.org/questi...d.php?t=499631 . There is a pretty long discussion there , I got my boot-up time right now to 25 secs which is pretty okay (and I have included all of what I need).

Thanks for the link, I'll go through it later today and see what I can do.

Ok, I'll recompile the kernel. Only one question ... this is a laptop, and I don't know much about the hardware inside, I only have what standard hardware probing commands can provide. How would I go about compiling a kernel with only exactly what I need compiled in ? Is there any way to get specific info, or as much info as I need on the hardware of this computer and which parts of the kernel go with which hardware ? (I had problems doing this the last time I wanted to compile a minimal kernel like this ... I must have left some things out or put other things in)

H_TeXMeX_H 02-04-2007 04:01 PM

Update: thanks again for that link and info ... that literally cut my boot time in half ... about 20 sec now :D (ok, more like 38 sec (because it must load hplip and nvidia kernel module otherwise it would be less than 30 sec), but it's a lot faster than before ... it took about 1 min + before)

What I did was move '/sbin/ldconfig' and '/usr/X11R6/bin/fc-cache' calls from 'rc.M' to 'rc.local_shutdown' ... does the same thing really, only at shutdown not startup. Also commented out 'atd' and 'gpm' as they take long to startup and I rarely use them, if I need them I start them manually. Made hotplug un-executable as it is not really needed by anything. And I put an '&' after dhcpcd call, which was also a slow starter ... seems to work just fine (and I see no reason why it shouldn't ... I don't care when it sorts out my dynamic IP, it's probably gonna be before I use the internet anyway). Now for the kernel ...

pdw_hu 02-04-2007 06:31 PM

Quote:

Originally Posted by H_TeXMeX_H
I only have what standard hardware probing commands can provide. How would I go about compiling a kernel with only exactly what I need compiled in?

First part: lspci, lsusb, dmesg. These command will tell you more than you want to know about hardware. You can just google for the hardware name for the correct drivername.

Second: For options not related to drivers it's basicly googleing, and trial and error. Read the help available during menuconfig. Those "if unsure say Y/N" messages are really helpful for newbs.

H_TeXMeX_H 02-04-2007 06:44 PM

ok, thanks ... seems like it's gonna take a while to get down exactly what I need ... well, I'll work on it when I have time and tweak it until I get it ... seems that's the only way.

Thank you all for your responses :D

GrapefruiTgirl 02-04-2007 06:56 PM

Also, look up the exact motherboard model number by Google, check out the hardware it comes with.
Use the 'compact' option in LILO if your system will allow it.
and third, append 'idebus=66' into your LILO as well, if you see in dmesg "assuming idebus is 33Mhz" and you know that your IDE bus can go faster than that.
When I changed my IDE bus to boot at 66Mhz, it lopped better than 60% off by boot time.

H_TeXMeX_H 02-04-2007 07:07 PM

Quote:

Originally Posted by GrapefruiTgirl
Also, look up the exact motherboard model number by Google, check out the hardware it comes with.

It's a laptop ... so how do I get the MB number ? I can't open it ... it'll fall apart :(

Quote:

Use the 'compact' option in LILO if your system will allow it.
and third, append 'idebus=66' into your LILO as well, if you see in dmesg "assuming idebus is 33Mhz" and you know that your IDE bus can go faster than that.
When I changed my IDE bus to boot at 66Mhz, it lopped better than 60% off by boot time.
Not sure about compact, but I feel the 'idebus=xxx" might be a tad unsafe. Especially without detailed info on my system.

But good news, I recomplied my kernel and now it's 1/3 the size it was before ... 1MB as opposed to 3MB. This greatly increases boot up time. Now the entire boot process takes 45 sec from the time I hit the on button. I feel that maybe I can get it even lower, but that maybe the time invested it such an action may be too much right now. Maybe during spring break or the summer I'll mess around with it.

duryodhan 02-04-2007 09:01 PM

for compiling your kernel and about how to check your hardware etc. etc. see :
http://www.kroah.com/lkn/

And also look at Shilo's guide - Making it scream.

H_TeXMeX_H 02-04-2007 09:19 PM

Thanks, I've been to that site before, but forgot about it. It must have been on my other computer.

GrapefruiTgirl 02-05-2007 09:38 AM

[quote]Not sure about compact, but I feel the 'idebus=xxx" might be a tad unsafe. Especially without detailed info on my system.{/quote]

Compact can conflict with 'LBA=32' depending on your drive. Not sure if I'd call it unsafe or not. It's a commonly used option.
But as far as the IDE setting, (I've tried this) setting it to a value that is too high just returns a message in dmesg saying "Bad IDE value - too high" and it resorts to 33Mhz, the default. I have mine at 66, but when I tried upping it to 100 (and I have a UDMA 133Mhz capable bus) it just told me it was a bad setting and booted at 33 Mhz.
I think it's safe to assume (yeah I know the adage) that virtually any modern computer is capable of 66Mhz on the IDE.
Again, if it doesn't work or is invalid, it will just tell you so and default to normal.
:)
I'm not too familiar with laptops in general, but surely by starting with the manufacturer you could narrow down the model number and motherboard possibilities/options.

H_TeXMeX_H 02-05-2007 06:26 PM

Well, I found this:
http://www.ale.org/archive/ale/ale-2.../msg00188.html

Which says:
Quote:

> > I have an AMD 1.1ghz Athalon running a 133 bus. I just booted my box and
> > it said the bus was at 33, use idebus= to override. Before I go and
> > risk nuking my box by screwing up a setting, is it just a lilo append
> > line that says something like append="idebus=133"?

Your FSB, not your PCI, is running at 133 MHz

> This should do. I don't know about your board but I have my P5AB
> set up like:
>
> image = /vmlinuz
> label = new
> root = /dev/hda1
> vga = normal
> read-only
> append = "debug=2 noapic nosmp hdc=ide-scsi hdb=ide-scsi hdd=ide-scsi idebus=66"

You almost certainly *don't* want to do that. idebus is the speed of your
PCI bus, which is probably 33 MHz.
That's kinda a confusingly named option
-- lots of people seem to think it has something to do with ATA/33 vs ATA/66
vs ATA/100, but it doesn't. See drivers/ide/ide.c....
and ...

http://www.ale.org/archive/ale/ale-2.../msg00198.html
Quote:

From /usr/src/linux-2.4.0/drivers/ide/ide.c:


/*
* ide_system_bus_speed() returns what we think is the system VESA/PCI
* bus speed (in MHz). This is used for calculating interface PIO timings.
* The default is 40 for known PCI systems, 50 otherwise.
* The "idebus=xx" parameter can be used to override this value.
* The actual value to be used is computed/displayed the first time through.
*/

* "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
* where "xx" is between 20 and 66 inclusive,

* used when tuning chipset PIO modes.
* For PCI bus, 25 is correct for a P75 system,
* 30 is correct for P90,P120,P180 systems,
* and 33 is used for P100,P133,P166 systems.
* If in doubt, use idebus=33 for PCI.
* As for VLB, it is safest to not specify it.
66 MHz is max, but 33MHz is the usual. Until I know what frequency my pci bus is capable of, I'm not changing it.

EDIT:

Quote:

> Isn't my PCI bus speed faster than 33MHz?

Nope. Very loosely speaking, PCI bus speed is 33 MHz for 32-bit PCI and 66
MHz for 64-bit PCI; you can no doubt find all four combinations in use if
you look (this new sun blade I'm on right now has both 66 and 33 MHz PCI
busses, for example), but on almost all PC-class hardware the PCI bus runs
around 33 MHz.


The option is there because that speed will change if you're overclocking or
otherwise running at a "weird" bus speed, and so that way you can adjust
between ~ 25 and 40 MHz for you PCI bus if you need to....
http://www.ale.org/archive/ale/ale-2.../msg00325.html

GrapefruiTgirl 02-06-2007 08:51 AM

Indeed interesting and confusing.
I arrived at the idebus=66 setting because dmesg informed me that the kernel was 'assuming' a 33Mhz bus speed, and to use the setting 66 to change it. Which I did.
On a related note, while my IDE bus is capable of UDMA (Ultra DMA 133Mhz) I cannot infact apply this setting during boot, it just wont work. I get the impression that the machine must be fully booted before UDMA can be activated.
It also told me that valid settings (LILO said this) were between 20 and 66 Mhz for the idebus= function..
For the record, it seems they are referring to older and slower computers too, with the references to P100 and P133 etc.. My PCI/AGP bus is set at AUTO (usually a 66/33 ratio) and an FSB speed of 122 MHz (I am overclocking but not drastically so--- My puter is a 1.8Ghz Intel P4 currently running at 2.2Ghz.
In the end, I'm just offering suggestions :) but not suggesting you risk your hardware; do what is safest for your machine until you learn what it can handle! But I do love the wicked boot speed allowed by the increased bus speed ;)
Sasha

petcherd 02-06-2007 09:10 AM

Quote:

Originally Posted by H_TeXMeX_H
Kernel on both my current machine and the older one is huge26.s.

I was thinking of recompiling, but I usually don't like to unless I really have to.

Recompiling always sounded intimidating to me until I did it a few dozen times. That huge26.s kernel is well-named. It has all sorts of crap in it that you might not need: support for SCSI cards nobody you know has heard of, support for nearly every filesystem around, hotplug support, PCMCIA support, sound-card support, support for obsolete stuff, support for the very latest stuff... you get the idea.

Take careful notes of what you're removing.
Keep backups of previous successfully-bootable kernels.
Shave off just a few bits of cruft at a time.

On a P-III, it could cost you a few hours of compile time, but it will save you memory and it will save you precious minutes of boot time! :D

BCarey 02-06-2007 11:39 AM

Compiling your own kernel is a Fine Thing To Do.

I just want to point out that huge26 is not the only 2.6 possibility in Slackware for those who are wary of compiling your own kernel. The extra/ directory has a reasonably sized 2.6.17 kernel with modules and testing/ provides a 2.6.18 kernel.

Brian

H_TeXMeX_H 02-06-2007 01:37 PM

Quote:

Originally Posted by BCarey
I just want to point out that huge26 is not the only 2.6 possibility in Slackware for those who are wary of compiling your own kernel. The extra/ directory has a reasonably sized 2.6.17 kernel with modules and testing/ provides a 2.6.18 kernel.

Yeah, basically what I did (as a quick fix ... it reduced kernel size by 1/3 over huge26.s !) was take the 2.6.17 kernel source from the extra directory, change the .config to support JFS built-in (which I have), recompile it (took 10 min), and install it. (of course, I have an option to boot huge26.s again in lilo, just in case something goes wrong and the kernel panics)

Next I plan on doing "make allmodconfig" and then adding JFS built-in (static) support. Then see which modules I really need, make (recompile) those static, get rid of the rest, and it hopefully will result in a very small kernel capable of everything I need it for. (really I could just leave the modules there in case I install or change out hardware)

BCarey 02-06-2007 06:18 PM

Quote:

Originally Posted by H_TeXMeX_H
Next I plan on doing "make allmodconfig" and then adding JFS built-in (static) support. Then see which modules I really need, make (recompile) those static, get rid of the rest, and it hopefully will result in a very small kernel capable of everything I need it for. (really I could just leave the modules there in case I install or change out hardware)

I also compile the fs support statically, but more generally why do you not want to use modules?

Brian

H_TeXMeX_H 02-06-2007 06:30 PM

Quote:

Originally Posted by BCarey
I also compile the fs support statically, but more generally why do you not want to use modules?

I don't really mind using modules, but there is a greater chance of kernel panic (without initrd) if you use them extensively and exclusively.

BCarey 02-06-2007 07:56 PM

Hmmm. Frankly, I can't remember the last time my kernel panicked and I compile everything as a module that I can, except the fs support.

Brian

H_TeXMeX_H 02-06-2007 07:58 PM

Quote:

Originally Posted by BCarey
Hmmm. Frankly, I can't remember the last time my kernel panicked and I compile everything as a module that I can, except the fs support.

Brian

Ok, I try it :D

bird603568 02-06-2007 08:01 PM

Quote:

Originally Posted by BCarey
Hmmm. Frankly, I can't remember the last time my kernel panicked and I compile everything as a module that I can, except the fs support.

Brian

looking at some of his posts i dont think he knows what hes talking about

BCarey 02-06-2007 08:05 PM

There are also some really nice aspects of modules vs. static. For example, my wifi card doesn't always like to change from one encrypted network to another. So I simply rmmod the module and then modprobe it again and I'm set to go. If it was compiled statically I couldn't do that. Also, modules can help you troubleshoot hardware issues because you can use lsmod to see what modules loaded when you plug something in. Also, when seeking help on, eg. this board, someone might ask "Do you have module Z loaded?", and if you have everything statically compiled you will not be able to respond. Also...

Brian

H_TeXMeX_H 02-06-2007 09:07 PM

Quote:

Originally Posted by bird603568
looking at some of his posts i dont think he knows what hes talking about

Huh ? Who you talking to ?

@ BCarey

Sounds great ... I'll try it now.

EDIT: Update: Compiling using mostly modules only saves ~100 KB from kernel size. I'll have to look up my exact hardware ... that will take too long and will have to wait until I have time and am bored enough to do it.

rkrishna 02-07-2007 01:32 AM

huge26.s is huge everything compiled in, did you made initrd for non ext2/3 filesystems?
i hope for your configuration bare.i will work,
just copy the kernel bzimage, edit lilo run lilo, very easy and feel the difference

onebuck 02-07-2007 08:07 AM

Hi,

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.

H_TeXMeX_H 02-07-2007 02:24 PM

Quote:

Originally Posted by onebuck
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.

onebuck 02-07-2007 03:39 PM

Quote:

Originally Posted by H_TeXMeX_H
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.

Glad to help but won't do the work for you!

H_TeXMeX_H 02-07-2007 04:02 PM

Quote:

Originally Posted by onebuck
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.

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


duryodhan 02-07-2007 09:46 PM

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.

onebuck 02-08-2007 07:07 AM

Hi,

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.

H_TeXMeX_H 02-08-2007 10:52 PM

Quote:

Originally Posted by onebuck
Hi,

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.

Thanks all :)

BCarey 02-09-2007 10:56 AM

onebuck,

Very interesting, thank you.

H_TeXMeX_H,

Why did you put it in rc.M instead of rc.S?

Brian

H_TeXMeX_H 02-09-2007 02:11 PM

Quote:

Originally Posted by BCarey
onebuck,

Very interesting, thank you.

H_TeXMeX_H,

Why did you put it in rc.M instead of rc.S?

Brian

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 ?)

BCarey 02-09-2007 02:41 PM

Quote:

Originally Posted by H_TeXMeX_H
(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.

Brian

H_TeXMeX_H 02-09-2007 10:41 PM

Quote:

Originally Posted by BCarey
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.

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 :D

H_TeXMeX_H 03-12-2007 09:46 PM

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.

GrapefruiTgirl 03-13-2007 05:05 PM

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!

XGizzmo 03-13-2007 05:40 PM

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 03-13-2007 09:55 PM

Quote:

Originally Posted by XGizzmo
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 :D

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 :eek: Really, I checked ... should have taken a screenshot of it.

Thanks again all :)

XGizzmo 03-13-2007 11:21 PM

Fantastic, I am glad we got this solved all thought I wish I could get it to work with lilo but thats just me I hate loose ends.

H_TeXMeX_H 03-14-2007 02:31 PM

Maybe you can try the 'compact' option in lilo.conf ? Technically it doesn't always work. Either way, I installed grub on my desktop too and it boots in 29 sec (saved 2 sec off lilo boot time of 31 sec). (now, my desktop is much more powerful than the old laptop)

General Failure 03-14-2007 03:55 PM

I don't wanna go off topic, but...

I have to :D
Quote:

Originally Posted by H_TeXMeX_H
In fact I rarely ever use more than 45-50 MB or RAM ... ever.

Is this a console only machine or how do you get that done?

I btw second duryodhans suggestions concerncing rc-scripts. These fellers can save you some more boot time if you tweak them a little. You for example don't need fontconfig on boot time unless you just installed fonts, you could disable cron and atd and so forth...

H_TeXMeX_H 03-14-2007 06:16 PM

Well my RAM usage varies with what I'm doing. With fluxbox running, it's usually between 22-50 MB (usually just watching movies, viewing images) unless I run firefox ... like now ... and then it's 90 MB (at this very moment) or up to 100 MB or so if I visit many pages and use it for hours. If I open lots of stuff, it might go above 100 MB, but usually no. Now I restarted FF and it's down to 59 MB used. Games also use more memory. Scanned images can take all my RAM (1 GB).

Either way, 90 % of the time, when I check RAM usage it is under 100, or slightly above.

General Failure 03-16-2007 02:12 PM

Looks like you've been quite successful in tweaking your machine... Would you mind posting your ps aux and/or sum up a little bit what you did? This might be a nice howto I suppose some people would be interested in (including me as you already noticed :D)


All times are GMT -5. The time now is 07:54 PM.