I have found that running sudo hdparm -c1 /dev/hda and sudo hdparm -c1 /dev/hdc speeds up my system tremendously. I want to set these permanently at system startup rather than having to set them once the system is started. In ubuntu and kubuntu I can set these settings in /etc/hdparm.conf but this system doesn't appear to have this file. I have googled to try to find where to set this, and haven't come up with anything useful. How do I set this permanently? Thanks in advance for any help. -- ~R~ ---------------------------------------------------------- Stay away from flying saucers today.
* Roger Haxton
I have found that running sudo hdparm -c1 /dev/hda and sudo hdparm -c1 /dev/hdc speeds up my system tremendously. I want to set these permanently at system startup rather than having to set them once the system is started.
You can do that in YasT or a line in /etc/init.d/boot.local -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Monday March 13 2006 21:57, Patrick Shanahan wrote:
You can do that in YasT or a line in /etc/init.d/boot.local I must've missed in YasT where I can set hdparms other than dma. I'd love to know where in YasT this is.
Thanks, -- ~R~ ---------------------------------------------------------- Speer's 1st Law of Proofreading: The visibility of an error is inversely proportional to the number of times you have looked at it.
* Roger Haxton
I must've missed in YasT where I can set hdparms other than dma. I'd love to know where in YasT this is.
YasT2 Control Center -> Hardware -> IDE DMA MODE -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Tuesday March 14 2006 07:10, Patrick Shanahan wrote:
* Roger Haxton
[03-13-06 23:31]: I must've missed in YasT where I can set hdparms other than dma. I'd love to know where in YasT this is.
YasT2 Control Center -> Hardware -> IDE DMA MODE Please read what's being asked. I asked for OTHER THAN DMA mode. DMA mode is already set. I want to set my disks to run in 32-bit mode. -- ~R~
Experience varies directly with equipment ruined.
On Mon, 13 Mar 2006, Roger Haxton
On Monday March 13 2006 21:57, Patrick Shanahan wrote:
You can do that in YasT or a line in /etc/init.d/boot.local I must've missed in YasT where I can set hdparms other than dma. I'd love to know where in YasT this is.
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA enter: /dev/hda:-c1 /dev/hdc:-c1 exit YaST. This will ensure that 32bit mode is set every reboot. To enable it without rebooting, enter: /etc/rc.d/boot.idedma restart Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
On Tue, 14 Mar 2006, in a serious and blatant case of a self-followup did forget to include some stuff when he wrote:-
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA
enter:
/dev/hda:-c1 /dev/hdc:-c1
You can also include other options for hdparm here by using the format: <device>:<option>:<option>:<option> Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
On Tue, 14 Mar 2006 17:32:08 +0000, you wrote:
On Tue, 14 Mar 2006, in a serious and blatant case of a self-followup did forget to include some stuff when he wrote:-
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA
enter:
/dev/hda:-c1 /dev/hdc:-c1
You can also include other options for hdparm here by using the format:
<device>:<option>:<option>:<option>
Why do people insist on using a screwdriver to hammer nails? If you know enough to fool around with hdparm, you should be able to master bash and an editor. Put this in boot.local (adjust for your local hardware): hdparm -A1 -c1 -d1 -m16 -u1 /dev/hda hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdb hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdc hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdd hdparm -A1 -c1 -d1 -m16 -u1 /dev/hde hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdf hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdg hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdh hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdi hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdj Mike- -- If you're not confused, you're not trying hard enough. -- Please note - Due to the intense volume of spam, we have installed site-wide spam filters at catherders.com. If email from you bounces, try non-HTML, non-encoded, non-attachments,
Michael W Cocke wrote:
On Tue, 14 Mar 2006 17:32:08 +0000, you wrote:
On Tue, 14 Mar 2006, in a serious and blatant case of a self-followup did forget to include some stuff when he wrote:-
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA
enter:
/dev/hda:-c1 /dev/hdc:-c1 You can also include other options for hdparm here by using the format:
<device>:<option>:<option>:<option>
Why do people insist on using a screwdriver to hammer nails?
Why do people insist on inventing any single type of wheel again and again? The distribution already has means to configure DMA.
If you know enough to fool around with hdparm, you should be able to master bash and an editor.
Ok, then: why not using a "for"-loop?
Put this in boot.local (adjust for your local hardware):
hdparm -A1 -c1 -d1 -m16 -u1 /dev/hda hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdb hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdc hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdd hdparm -A1 -c1 -d1 -m16 -u1 /dev/hde hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdf hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdg hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdh hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdi hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdj
-- Viele Grüße ------------------------------------------------------------------------ Michael
On Wed, 15 Mar 2006, Michael Behrens
Why do people insist on inventing any single type of wheel again and again?
Because it's a fun thing to do?
The distribution already has means to configure DMA.
And that was the method that I showed. That doesn't mean that showing other ways isn't useful. Adding stuff to boot.local is another way of achieving the same results and it's quite useful to know about especially if you're (possibly going to be) using other distributions.
Put this in boot.local (adjust for your local hardware): hdparm -A1 -c1 -d1 -m16 -u1 /dev/hda hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdb hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdc hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdd hdparm -A1 -c1 -d1 -m16 -u1 /dev/hde hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdf hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdg hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdh hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdi hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdj
printf "%s\n%s\n%s\n%s\n" "hdparm -A1 -c1 -d1 -m16 -u1 "/dev/hd{a,b,c,d} >>/etc/init.d/boot.local Or echo -e "hdparm -A1 -c1 -d1 -m16 -u1 "/dev/hd{a,b,c,d}"\n" >>/etc/init.d/boot.local Both add multiple lines to boot.local, and neither even need an editor. Using "echo" is slightly shorter, since you don't need to remember a "%s\n" for each line, but using "echo" adds a space at the beginning of the line like so: hdparm -A1 -c1 -d1 -m16 -u1 /dev/hda hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdb hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdc hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdd not that having the space there matters. Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
On Wed, 15 Mar 2006, Michael W Cocke
Why do people insist on using a screwdriver to hammer nails?
I thought it was shoes that were used when hammering nails.
If you know enough to fool around with hdparm, you should be able to master bash and an editor.
Yes, they should. That doesn't mean that they have to.
Put this in boot.local (adjust for your local hardware):
hdparm -A1 -c1 -d1 -m16 -u1 /dev/hda hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdb hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdc hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdd hdparm -A1 -c1 -d1 -m16 -u1 /dev/hde hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdf hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdg hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdh hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdi hdparm -A1 -c1 -d1 -m16 -u1 /dev/hdj
And here is another example of choices you can make. You can use the acceptable way of adding the above to boot.local, or you could use the other, and equally acceptable, way of adding the equivalent settings via YaST. Of course, now that others know that they can use the above in boot.local, they now have an extra piece of knowledge that is applicable to other non-SUSE Linux distributions. Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2006-03-14 at 17:32 -0000, David Bolt wrote:
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA
enter:
/dev/hda:-c1 /dev/hdc:-c1
You can also include other options for hdparm here by using the format:
<device>:<option>:<option>:<option>
¿Are you sure? My 9.3 doesn't mention that syntax, it only talks about
DMA:
# Force DMA mode for selected device. Use pairs <device>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Carlos E. R. wrote:
The Tuesday 2006-03-14 at 17:32 -0000, David Bolt wrote:
YaST -> System -> /etc/syconfig Editor -> Hardware -> IDE -> DEVICES_FORCE_IDE_DMA
enter:
/dev/hda:-c1 /dev/hdc:-c1 You can also include other options for hdparm here by using the format:
<device>:<option>:<option>:<option>
¿Are you sure? My 9.3 doesn't mention that syntax, it only talks about DMA:
# Force DMA mode for selected device. Use pairs <device>:
separated # by space - dma_mode can be "on" (enable default DMA mode), "off" (disable DMA # mode) or any mode supported by hdparm (e.g. "mdma2", "udma5", ...) # Example: "/dev/hdc:off /dev/hdd:udma2" # DEVICES_FORCE_IDE_DMA="/dev/hda:on /dev/hdb:on /dev/hdc:on /dev/hdd:on "
He is sure because I put this in mine and it works great /dev/hda:-c3 when it boots up settings are retained. hdparm /dev/hda /dev/hda: multcount = 16 (on) IO_support = 3 (32-bit w/sync) unmaskirq = 1 (on) using_dma = 1 (on) keepsettings = 0 (off) readonly = 0 (off) readahead = 256 (on) geometry = 65535/16/63, sectors = 117266688, start = 0 - -- http://www.digitalrage.org/ The Information Technology News Center -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEGB2Tt06NWq3hlzkRAuHHAKCoo+O4lemNV6w+nbOQnji24ATqhgCglqoc LuhPJpY1vzHHY9dmKC2el+0= =KTU2 -----END PGP SIGNATURE-----
On Wed, 15 Mar 2006, Carlos E. R.
¿Are you sure? My 9.3 doesn't mention that syntax, it only talks about DMA:
Yes, I'm quite sure.
# Force DMA mode for selected device. Use pairs <device>:
separated # by space - dma_mode can be "on" (enable default DMA mode), "off" (disable DMA # mode) or any mode supported by hdparm (e.g. "mdma2", "udma5", ...) # Example: "/dev/hdc:off /dev/hdd:udma2" # DEVICES_FORCE_IDE_DMA="/dev/hda:on /dev/hdb:on /dev/hdc:on /dev/hdd:on "
If you have a look at /etc/init.d/boot.idedma, which is the script that sets the DMA modes, you'll see these lines inside the function idedma_main(): # The setting e.g. "/dev/hda:69:-c1:-m16:-u1:-W1:-A1" should be # expanded as "hdparm -d 1 -X 69 -c1 -m16 -u1 -W1 -A1 /dev/hda" which shows the exact format to use. A few lines further down, there's this part where the DMA modes are actually set: # Set DMA mode by hdparm utility if [ -z "$MODE" ] ; then echo "Missing DMA mode for device $DEVICE" rc_failed elif [ $MODE = "off" ] ; then $HDPARM -d 0 "$DEVICE" || rc_failed elif [ $MODE = "on" ] ; then $HDPARM -d 1 "$DEVICE" || rc_failed else $HDPARM -d 1 -X "$MODE" ${OPTIONS:+$OPTIONS} "$DEVICE" || rc_failed fi So, from this, you get to choose either a case-sensitive "on" "off", which will turn on or off the DMA, or you can pass specific options to hdparm. Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2006-03-15 at 14:31 -0000, David Bolt wrote:
If you have a look at /etc/init.d/boot.idedma, which is the script that sets the DMA modes, you'll see these lines inside the function idedma_main():
# The setting e.g. "/dev/hda:69:-c1:-m16:-u1:-W1:-A1" should be # expanded as "hdparm -d 1 -X 69 -c1 -m16 -u1 -W1 -A1 /dev/hda"
which shows the exact format to use. A few lines further down, there's this part where the DMA modes are actually set:
I see. Nice. Then Mr. Ladislav Slezak (the programmer) forgot to document this. There is no mention at all of this syntax in the /etc/sysconfig/ide file - at least, not in SuSE 9.3 Umm! What if I don't want to set -X (xfermode) to anything at all? The -X parameter is implicit. I tried DEVICES_FORCE_IDE_DMA="/dev/hdd:-c1:-m16:-u1 " and it says: /dev/hdd: setting 32-bit IO_support flag to 1 setting multcount to 16 setting unmaskirq to 1 (on) setting using_dma to 1 (on) setting xfermode to 0 (default PIO mode) <=== multcount = 16 (on) IO_support = 1 (32-bit) unmaskirq = 1 (on) using_dma = 1 (on) The drive reports it is using udma5, as it should, but... I'd prefer it not touching that. UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEGC6ZtTMYHG2NR9URAps0AJ9XuQcHtzxUnayYu6UL0XrwXZcr7wCeNNAz 3Nz76s6ecw7ml7wSZ6i9WXM= =hdqz -----END PGP SIGNATURE-----
On Wed, 15 Mar 2006, Carlos E. R.
Umm! What if I don't want to set -X (xfermode) to anything at all? The -X parameter is implicit. I tried
DEVICES_FORCE_IDE_DMA="/dev/hdd:-c1:-m16:-u1 "
and it says:
/dev/hdd: setting 32-bit IO_support flag to 1 setting multcount to 16 setting unmaskirq to 1 (on) setting using_dma to 1 (on) setting xfermode to 0 (default PIO mode) <=== multcount = 16 (on) IO_support = 1 (32-bit) unmaskirq = 1 (on) using_dma = 1 (on)
Looking at the script, it assumes that the first option will be a numerical mode number, but doesn't actually check this is true. I think that there should be a minor change to the script just to counter this. Something like this should do: # Set DMA mode by hdparm utility if [ -z "$MODE" ] ; then echo "Missing DMA mode for device $DEVICE" rc_failed elif [ $MODE = "off" ] ; then $HDPARM -d 0 "$DEVICE" || rc_failed elif [ $MODE = "on" ] ; then $HDPARM -d 1 "$DEVICE" || rc_failed else # if $MODE is non-numeric, $(($MODE+0)) will be return "0" which means # the test is returns true and the first command is executed, otherwise # the second command is executed. if [ $(($MODE+0)) -eq 0 ] ; then $HDPARM -d 1 "$MODE" ${OPTIONS:+$OPTIONS} "$DEVICE" || rc_failed else $HDPARM -d 1 -X "$MODE" ${OPTIONS:+$OPTIONS} "$DEVICE" || rc_failed fi fi Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
Roger Haxton wrote:
I have found that running sudo hdparm -c1 /dev/hda and sudo hdparm -c1 /dev/hdc speeds up my system tremendously. I want to set these permanently at system startup rather than having to set them once the system is started.
Check your system BIOS - you'll often find a switch for running your disks in 32bit mode. I'm surprised they don't do it by default. /Per Jessen, Zürich
Check your system BIOS - you'll often find a switch for running your disks in 32bit mode. I'm surprised they don't do it by default. I looked. I'm running on a Dell Inspiron 9100 and the BIOS is very limited as to the changes I can make. I can set that on the Sony Vaio that I have that I'm running Kubuntu on. I'll just add the commands to
On Tuesday March 14 2006 01:28, Per Jessen wrote: the /etc/init.d/boot.local file and roll on. -- ~R~ ---------------------------------------------------------- The more things change, the more they stay insane.
participants (8)
-
Carlos E. R.
-
David Bolt
-
Elijah Savage
-
Michael Behrens
-
Michael W Cocke
-
Patrick Shanahan
-
Per Jessen
-
Roger Haxton