DMA disabled on all Hard Drives,

Recently I noted that when transferring files between my HDs the CPU usage increases up to 80~ 100%. After the transfer ends, the cpu goes back to normal.
The system monitor reports no process consuming those cycles, yet there is something eating up The CPU.

Doing some research I concluded it was probably something related to DMA and UDMA.
which is weird because all my drives report they have UDMA6 enabled in the BIOS, and in windows I don’t have that problem.

Running hdparm -d gives me the following error:

/dev/sda3:
HDIO_GET_DMA failed: Inappropriate ioctl for device

for every partition on every device, though this does not actually tell if DMA is on or off I suspect it is off.

I checked if this was a suse exclusive problem, and to my surprise, debian and aptosid, behave exactly the same. The only reason I didnt note before is cause I had never transfered so many files before, (about 250GB) and the small transfers I did were over quite quick.

I’d like to make emphasis on:

1.The problem is the same regardless if I transfer 5GB or 150.
2. In windows my cpu does not go above 10% at any time during the transfer.

I have 3 sata HDs. All my OS’s are in sda (120GB) I use sdb (250GB) and sdc (500GB) as data and media storage. ALl drives are Western Digital with less than 2 years of usage, and pass all smart tests with flying colors.

CPu AMD x2 5400 @ 2.8GHz
4GB DDR2 800MHZ
Mother board A780G M2+ SE

If someone has any Idea what this may be, please, shed some light.

Thank you.

Running hdparm -d gives me the following error:

/dev/sda3:
HDIO_GET_DMA failed: Inappropriate ioctl for device

I am thinking this command may have worked right in the PATA IDE interface days, but perhaps is wrong now using SATA. I see that all of my drives fail this command, (1) 2TB SATA 7200 RPM, (1) 600GB ESATA 10K RPM & (1) 1.5 TB USB 3 5400 RPM. So, I suggest you try the following command for all of your drives and see what you get.

su -
hdparm -I /dev/sd?

You might post one of them here in a code block as well as the output from this command:

su -
fdisk -l

and you might give us this information to finish out your disk setups:

cat /etc/fstab

I would use the advance message editor, highlight each text group separately and press the code (#) option and let us see what you have. Consider that you may have nothing wrong and what is going on is normal for your setup.

Thank You,

hdparm -I /dev/sdb returns:

linux-ebqf:/etc # hdparm -I /dev/sdb

/dev/sdb:

ATA device, with non-removable media
        Model Number:       WDC WD5000AAKS-00WWPA0                  
        Serial Number:      WD-WCAYU5900550
        Firmware Revision:  01.03B01
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5 
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  976773168
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:      476940 MBytes
        device size with M = 1000*1000:      500107 MBytes (500 GB)
        cache/buffer size  = 16384 KBytes
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Recommended acoustic management value: 128, current value: 254
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
             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_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
           *    DMA Setup Auto-Activate optimization
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Long Sector Access (AC1)
           *    SCT LBA Segment Access (AC2)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        82min for SECURITY ERASE UNIT. 82min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee1030883e1
        NAA             : 5
        IEEE OUI        : 0014ee
        Unique ID       : 1030883e1
Checksum: correct

fdisk -l returns:

linux-ebqf:/etc # fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdb423a9a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        3264    26217056    7  HPFS/NTFS
/dev/sda2   *        3265        3916     5237190   83  Linux
/dev/sda3           12618       14593    15872220   83  Linux
/dev/sda4            3917       12617    69890782+   f  W95 Ext'd (LBA)
/dev/sda5            3917        5221    10482381   83  Linux
/dev/sda6            5222        7049    14683378+  83  Linux
/dev/sda7            7050        7180     1052226   82  Linux swap / Solaris
/dev/sda8            7181        9791    20972826   83  Linux
/dev/sda9            9792        9821      240943+  83  Linux
/dev/sda10           9822       11280    11719386   83  Linux
/dev/sda11          11281       12009     5855661   83  Linux
/dev/sda12          12010       12617     4883728+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082c84

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       32636   262148638+   7  HPFS/NTFS
/dev/sdb2           32637       60801   226235362+  83  Linux

Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00091649

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       24321   195358401    7  HPFS/NTFS

Finally, cat /etc/fstab outputs:

linux-ebqf:/etc # cat /etc/fstab
/dev/disk/by-id/ata-ST3120213AS_4LS2ZD1Y-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3120213AS_4LS2ZD1Y-part2 /                    ext4       acl,user_xattr,relatime 1 1
/dev/disk/by-id/ata-ST3120213AS_4LS2ZD1Y-part6 /home                ext4       noatime,acl           1 2
noatime,user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
noatime,user,users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-ST3120213AS_4LS2ZD1Y-part5 /usr                 xfs        noatime               1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
noatime,uid=suser,gid=users,umask=0027,locale=en_US.UTF-8 0 0
noatime,uid=suser,gid=users,umask=0027
/dev/disk/by-id/ata-ST3120213AS_4LS2ZD1Y-part8 /local/VMdrive       ext3       noatime,user,acl      1 2
/dev/sdb2 /local/storage xfs noatime,exec,rw,barrier,owner     1 2

I don’t think this is normal. In windows CPU consumption is minimal when transferring files. Maybe DMA is disabled in the kernel for the HDs. Or maybe is turned off by default on the “Desktop kernel” due to stability issues,for lack of proper drivers. :frowning:

DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6

Surely this line is saying that the listed DMA modes available, and the asterisk tells us that the drive is currently set to UDMA6
That is my interpretation, my drive reports the same…

On 2010-10-25 03:36, Hanzdersion wrote:

> Running hdparm -d gives me the following error:
>
> /dev/sda3:
> HDIO_GET_DMA failed: Inappropriate ioctl for device

Don’t specify the partition, it is a global disk command. Use “/dev/sda” only.

The output of “-i” and/or “-I” should tell you the current status (look for the asterisk). However,
the option “-d” fails for sata devices.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Hanzdersion, I think that you are working properly and perhaps the disk copy process is a heavy load on your PC. It is not normal to be copying large amounts of data while trying to surf the Internet all of the time. Why not make a test copy of say 20 GB of data from one hard drive to another with Firefox open and while looking at the System Monitor. Check out your memory usage and pay attention to the swap file usage, or lack of usage. As long as the swap is unused, your memory usage is fine. But, run low on memory, the disk copy process can go down. So, check the time to copy, CPU usage and memory usage and get back with the results. I will perform the same test tonight and we can compare the results if you like.

Thank You,