[linux-audio-user] hdparm
Mark Knecht
mknecht at controlnet.com
Tue Sep 7 14:03:00 EDT 2004
Matt Barber wrote:
> So,
>
> At home I had been getting some odd latency with my cd/dvd drive (using
> jack and alsaplayer, the sound would cut out for a split second, but
> with no xruns, so I'm thinking it was the drive or the ide channel, and
> not jack-related). I have an nforce2-based motherboard, with a seagate
> SATA drive (nforce2 puts SATA on the primary master ide channel),
> another seagate ide drive, and a pioneer cd/dvd drive. I keep all my
> soundfiles on the SATA drive (since it's supposed to be faster), and the
> linux system on the ide drive. My previous setup gave the SATA drive
> the entire primary channel, put the system drive as secondary master and
> dvd as secondary slave. I decided to try putting the system drive on
> the primary channel as slave, and giving the entire secondary channel to
> the dvd drive as master (this is a setup I have used successfully with
> other motherboards). So - sound drive is hda, system drive is hdb, and
> dvd is hdc. Here's the problem-- where I had been getting about
> 33-35MB/sec on both drives with the previous setup with hdparm -t, when
> I set it up like this, they both go down to about 6.5MB/sec. This is
> because dma has been disabled - when I enable it on hdb (hdparm -d1
> /dev/hdb) the benchmark runs back up to around 35. On hda, I can enable
> dma with no errors:
>
> # hdparm -d1 /dev/hda
>
> /dev/hda:
> setting using_dma to 1 (on)
> using_dma = 1 (on)
>
> but when I run the benchmark it's still around 6.5MB/sec, and then I
> notice that dma has again been disabled on BOTH hda and hdb. Anybody
> know what the hell is going on here? My guess is that the SATA-ide
> driver won't allow dma (or the default udma mode is wrong or something),
> and when the SATA drive gets its own ide channel, there's no problem -
> it's only when it's combined with other drives that there's a problem
> (it does the same when the cdrom is placed on primary/slave).
>
> I'm getting fewer cutouts from the dvd drive (secondary master by
> itself) when I play a cd, but I'm still getting a few now and then - is
> there a way to optimize something here so I don't get them?
>
> Thanks,
>
> Matt
>
>
Matt,
Not sure I can help, but I end up with a few questions from reading
this. Maybe your answers will lead someone else to give you a good
pointer. Mostly I'm confused about your hda/hdb comments with respect to
SATA drives which are normally on a cable by themselves. In my
experience hda/hdb are the EIDE drive designations. With two controllers
you then get hda-hdd for EIDE and hde for SATA.
If you are really using EIDE drives then switching the order of the
drives can be a problem *if* the drives were not configured for
auto-detect *and* you forgot to chenge the jumpers. I don't know if this
would cause the problem that you are seeing though.
I think I'm just misunderstanding your setup. Maybe the NForce-2
allows other options? Not sure.
I built a SATA machine for my dad about a year ago. (nforce?
nforce-2? Don't remember) On his machine the SATA drive is hde. It has
EIDE channels, and I used them for the CDRW drive, but it was a bit
tricky getting it all configured. I shelled in remotely and got this info:
gandalf root # hdparm /dev/hde
/dev/hde:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 155061/16/63, sectors = 156301488, start = 0
gandalf root # hdparm -tT /dev/hde
/dev/hde:
Timing buffer-cache reads: 1520 MB in 2.00 seconds = 760.00 MB/sec
Timing buffered disk reads: 106 MB in 3.00 seconds = 35.33 MB/sec
gandalf root #
He is on a fairly old kernel:
gandalf root # uname -a
Linux gandalf 2.4.22-aa1 #8 Mon Aug 9 16:50:41 PDT 2004 i686 AMD
Athlon(tm) XP 2500+ AuthenticAMD GNU/Linux
gandalf root #
and his grub.conf file:
default 2
timeout 20
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title=2.4.22-aa1
root (hd0,1)
kernel (hd0,1)/boot/bzImage-2.4.22-aa1 ro root=/dev/hde3 hdg=none
title=2.4.22-aa1-20040507
root (hd0,1)
kernel (hd0,1)/boot/bzImage-2.4.22-aa1-20040507 ro root=/dev/hde3 hdg=none
title=2.4.22-aa1-20040809
root (hd0,1)
kernel (hd0,1)/boot/bzImage-2.4.22-aa1-20040809 ro root=/dev/hde3 hdg=none
Don't know if any of this is going to help you so I'll shut up for now.
good luck,
Mark
I can give you more data for that box if it's helpful, but maybe I
need to better understand your setup.
More information about the Linux-audio-user
mailing list