View previous topic :: View next topic |
Author |
Message |
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Thu Jul 25, 2002 5:36 am Post subject: hdparm |
|
|
Here something strange. Ie always used the following settings to optimize my disks:
hdparm -d 1 -u 1 -c 1 -k 1 -X66 /dev/hda
hdparm -d 1 -u 1 -c 1 -k 1 -X66 /dev/hdb
hdparm -d 1 -u 1 -c 1 -k 1 /dev/hdc
This has worked on every distribution before, and does indeed work in gentoo when I run it from the command line. However, if I add them to /etc/conf.d/local.start, my computer locks up immediately after printing the Starting local... message at boot. Any idea what causing the problem, or any workarounds? Thanks. |
|
Back to top |
|
|
MacMasta Guru
Joined: 18 Apr 2002 Posts: 545 Location: Anchorage, AK
|
Posted: Thu Jul 25, 2002 6:43 am Post subject: |
|
|
Two things - post /etc/conf.d/local.start, and make sure you haven't changed any devfs settings at the same time - I've had the system freeze (like my desktop is right now) because I mis-configured devfs. (It's an easy fix, thank goodness)
~Mac~ |
|
Back to top |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Thu Jul 25, 2002 9:28 am Post subject: Re: hdparm |
|
|
nitro322 wrote: | Here something strange. Ie always used the following settings to optimize my disks:
hdparm -d 1 -u 1 -c 1 -k 1 -X66 /dev/hda
hdparm -d 1 -u 1 -c 1 -k 1 -X66 /dev/hdb
hdparm -d 1 -u 1 -c 1 -k 1 /dev/hdc
This has worked on every distribution before, and does indeed work in gentoo when I run it from the command line. However, if I add them to /etc/conf.d/local.start, my computer locks up immediately after printing the Starting local... message at boot. Any idea what causing the problem, or any workarounds? Thanks. |
remove the spaces between "-flag" and "1" :
hdparm -d1 -u1 -c1 -k1 -X66 /dev/hda
hdparm -d1 -u1 -c1 -k1 -X66 /dev/hdb
hdparm -d1 -u1 -c1 -k1 /dev/hdc _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Thu Jul 25, 2002 12:22 pm Post subject: |
|
|
Well, I tried DArtagnan suggestion, but no luck. Here my local.start:
# This is a good place to load any misc.
# programs on startup ( 1>&2 )
#/sbin/hdparm -d1 -u1 -c1 -k1 -X66 /dev/hda >/dev/null
#/sbin/hdparm -d1 -u1 -c1 -k1 -X66 /dev/hdb >/dev/null
#/sbin/hdparm -d1 -u1 -c1 -k1 /dev/hdc >/dev/null
/usr/bin/kbdrate -r30 -d250 >/dev/null
/usr/sbin/emu-config -d -i -t=ACTIVE >/dev/null
I like to, of course, uncomment those hdparm lines without my computer locking up. You also mentioned something about making sure devfs didn get messed up. Sorry but this is the first time Ie messed with devfs, and I really not sure how I can tell. Thanks for the help! |
|
Back to top |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Thu Jul 25, 2002 12:26 pm Post subject: |
|
|
nitro322 wrote: | Well, I tried DArtagnan suggestion, but no luck. Here my local.start:
# This is a good place to load any misc.
# programs on startup ( 1>&2 )
#/sbin/hdparm -d1 -u1 -c1 -k1 -X66 /dev/hda >/dev/null
#/sbin/hdparm -d1 -u1 -c1 -k1 -X66 /dev/hdb >/dev/null
#/sbin/hdparm -d1 -u1 -c1 -k1 /dev/hdc >/dev/null
/usr/bin/kbdrate -r30 -d250 >/dev/null
/usr/sbin/emu-config -d -i -t=ACTIVE >/dev/null
I like to, of course, uncomment those hdparm lines without my computer locking up. You also mentioned something about making sure devfs didn get messed up. Sorry but this is the first time Ie messed with devfs, and I really not sure how I can tell. Thanks for the help! |
I would use is in other way:
hdparm has a way to hide the output so you don't have to use ">/dev/null"...maybe is happening because of this...not sure
try it:
hdparm -qd1 -qu1 -qc1 -qk1 -qX66 /dev/hda
( man hdparm )
( check the "q" flag ) _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Thu Jul 25, 2002 12:29 pm Post subject: |
|
|
nitro322 wrote: | ..... You also mentioned something about making sure devfs didn get messed up..... |
I did not told you any thing about.
MacMasta did _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
dioxmat Bodhisattva
Joined: 04 May 2002 Posts: 709 Location: /home/mat
|
Posted: Thu Jul 25, 2002 12:38 pm Post subject: |
|
|
wondering, does it work after the boot sequence, when everything is loaded and running ? _________________ mat |
|
Back to top |
|
|
mksoft l33t
Joined: 28 May 2002 Posts: 844
|
Posted: Thu Jul 25, 2002 1:05 pm Post subject: |
|
|
dioxmat wrote: | wondering, does it work after the boot sequence, when everything is loaded and running ? |
If you're talking about local.start - yes it is.
If you'll look at /etc/init.d/local you'll see the depend function:
Code: | depend() {
after *
} |
meaning local denepds on everything - hence, exceuted last. _________________ There's someone in my head but it's not me - Pink Floyd |
|
Back to top |
|
|
dioxmat Bodhisattva
Joined: 04 May 2002 Posts: 709 Location: /home/mat
|
Posted: Thu Jul 25, 2002 1:36 pm Post subject: |
|
|
that's not *exactly* what I meant...
I know that this script is executed after everything else, but that might be a problem with a process trying to acces his disk while hes doing the optimisations... _________________ mat |
|
Back to top |
|
|
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Thu Jul 25, 2002 3:14 pm Post subject: |
|
|
I'm at work right now so I can't try the -q suggestion, but I have tried it already without the >/dev/null and it still failed. I'll try again, though. As far as for dioxmat's question... I'm interpreting what you asked as "Does running the hdparms command after everything's finished (ie., after logging in) work?" If that's the case, yes it does. It only fails if I includ it in local.start. |
|
Back to top |
|
|
dioxmat Bodhisattva
Joined: 04 May 2002 Posts: 709 Location: /home/mat
|
Posted: Thu Jul 25, 2002 3:19 pm Post subject: |
|
|
then its probably that another process is trying to acces the disks while the script is executing the hdparm commands... maybe you should try putting a small delay before the hdparm commands ? _________________ mat |
|
Back to top |
|
|
dmarien n00b
Joined: 15 Jul 2002 Posts: 22 Location: Kitchener Ontario
|
Posted: Thu Jul 25, 2002 3:35 pm Post subject: yabut.. |
|
|
hdparm doesn't work on scsi drives. _________________ dmarien |
|
Back to top |
|
|
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Thu Jul 25, 2002 3:46 pm Post subject: |
|
|
dioxmat wrote: | then its probably that another process is trying to acces the disks while the script is executing the hdparm commands... maybe you should try putting a small delay before the hdparm commands ? |
good idea. Any suggestions for how? If local.start is already the thing to run, I don't know how I can start it any later, short of putting a for loop at the beginning that would count from 1 to 100000. |
|
Back to top |
|
|
dioxmat Bodhisattva
Joined: 04 May 2002 Posts: 709 Location: /home/mat
|
Posted: Thu Jul 25, 2002 4:08 pm Post subject: |
|
|
sleep n, where n is a second should do it _________________ mat |
|
Back to top |
|
|
Mr. Ust n00b
Joined: 16 Jun 2002 Posts: 45
|
Posted: Fri Jul 26, 2002 2:51 pm Post subject: |
|
|
I was fooling around with this recently because I noticed none of my drives were using DMA mode. Instead of using the hdparm command, you can compile the kernel with your IDE chipset as an option. That way, DMA mode is turned on by default. I have a VIA chipset, and after doing this, the only commands I needed in local.start were:
Code: |
hdparm -q -c 1 /dev/hdg
hdparm -q -c 1 /dev/hdh
|
This was to turn on 32-bit mode on my 2nd and 3rd hard drives. |
|
Back to top |
|
|
nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Fri Jul 26, 2002 7:13 pm Post subject: |
|
|
Well, good news. Putting 'sleep 3' at the top of my start.local file fixed the problem. Thanks, dioxmat! As far as Mr. Ust's suggestion, I do have Enable DMA by default enabled in the kernel. However, if I do a hdparm immediately after booting (without first enabling DMA through hdparm) to check the stats of the drives, it still shows them as not using DMA. So, for whatever reason, I need this script. Thanks, though. |
|
Back to top |
|
|
|