Find the answer to your Linux question:
Results 1 to 5 of 5
I tried to turn DMA on, and it didn't work. --------------------- jef@exodus:~$ sudo hdparm -d1 /dev/hdc /dev/hdc: setting using_dma to 1 (on) HDIO_SET_DMA failed: Operation not permitted using_dma = 0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    10

    DMA


    I tried to turn DMA on, and it didn't work.

    ---------------------
    jef@exodus:~$ sudo hdparm -d1 /dev/hdc

    /dev/hdc:
    setting using_dma to 1 (on)
    HDIO_SET_DMA failed: Operation not permitted
    using_dma = 0 (off)
    ---------------------

    I really have no idea where to go from here. Everywhere I look it says that that should work. I'm assuming the right stuff is on in the kernel, as no Ubuntu users mentioned having to do that.

    ---------------------
    jef@exodus:~$ lspci | grep -i ide
    0000:00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2)
    ---------------------

    The drive is a regular Maxtor PATA 160GB drive.

    I get the exact same results for my two optical drives (CD/DVD).

    I also have two SATA drives, I don't have a clue what to do with those. Hdparm doesn't even mention DMA for them.

    Any help?

    Thanks in advance!

  2. #2
    Just Joined!
    Join Date
    Feb 2005
    Location
    Noplace Interesting
    Posts
    76
    That doesn't work on mine, either. Maybe it's the IDE driver, maybe it's the hardware itself. I would suggest other ways to speed up your hard drive.
    Here's what I did to mine->
    hdparm -A1 /dev/hda
    hdparm -a8 /dev/hda
    hdparm -B255 /dev/hda
    hdparm -X8 /dev/hda
    hdparm -c1 /dev/hda
    hdparm -r0 /dev/hda
    hdparm -S0 /dev/hda
    hdparm -u1 /dev/hda
    hdparm -m16 /dev/hda
    hdparm -W1 /dev/hda
    hdparm -K1 /dev/hda
    hdparm -k1 /dev/hda

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    10
    Well, I did get it working. I found the answer here, Chromatic, if you're interested. The 5th post did it for me.

    Now I have to figure it out for SATA.

    Those hdparm commands that you listed, what do they do, effectively?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Feb 2005
    Location
    Noplace Interesting
    Posts
    76
    YES! Thank you!!! . You have saved many of my CPU cycles by allowing me to have DMA! I kinda wondered what was going on because my old Knoppix distro enabled DMA sucessfully, and Suse wouldn't go faster than a mainframe fifteen years ago. The only reason I stuck with Suse is because that's the only 64-bit distro I have, and it would be tragic not to use those other 32 bits.

    Anyway, a bunch of other commands hdparm was supposed to support didn't work for my hard drive either, but now with that link, I/O should fly without the CPU blocking the hard drive from memory. The commands below are some of the ones that worked with my hard drive. What do they do, you say *cough* man page *cough*
    hdparm -A1 /dev/hda # enable hardware lookahead feature for IDE hard drive
    hdparm -a8 /dev/hda # enable software (kernel) lookahead feature. (kernel reads 8 sectors at a time.)
    hdparm -B255 /dev/hda # disable all hardware APM power management for /dev/hda
    hdparm -X8 /dev/hda # NOTE: This mode is especially for my HD. Yours could be different.
    # The -X argument changes the PIO (programmed IO) mode. To find out what mode yours is -> hdparm -I /dev/hda
    hdparm -c1 /dev/hda # enable asynchronous 32-bit transfer mode
    hdparm -r0 /dev/hda # set read-only mode off. (I think this is for the kernel)
    hdparm -S0 /dev/hda # set the spindown time (when your HD slows down when not in use) off
    hdparm -u1 /dev/hda # allows the hd to unmask IRQs!!! This could be dangerous!
    hdparm -m16 /dev/hda # allow 16 multiple sector count on this drive. 16 is the limit on my drive
    [b]hdparm -W1 /dev/hda # enable the drive's write-cashing feature. Try it.
    [b]hdparm -K1 /dev/hda # saves some of the drive's settings on a soft reboot
    hdparm -k1 /dev/hda # keep some drive settings on reboot
    # note that hdparm -tT /dev/hda works excellent for testing
    # whether a certain hardware tweak was worth it. It clocks your HDs
    # cashe and buffered disk. !!Also note that this works better in different
    # runlevels. In runlevel 1 it works like a rocket. However, in runlevel 5, I
    # only see about 25% of what I have seen in runlevel 1. I've seen it run
    # fastest at boot up time.

    might wanna read your man docs before you try some of the commands here. Some of them are harmless as a legless man in a straightjacket, but some could cause a revolt of the bits on your HD. And some, as you found out, just don't work at all. And be sure to see if it worked with hdparm -tT /dev/hda

  6. #5
    Just Joined!
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    10
    You're very welcome. I was quite pleased to find it too. I'm still a little lost with the SATA drives, though.

    I'll check out a few of those commands, I wouldn't mind a bit better performance yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •