You are not logged in.

#1 2007-09-09 22:35:11

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

100% CPU usage when writing to disk

Hi.
I have an Athlon XP 2000+ with 768 MB RAM, a SATA disk, formated to ntfs (running XP) and a IDE disk running Arch (ext3, KDE).

When I copy a big file, the CPU usage stucks to 100% . Doesn't matter the disk I write to or from. The CPU usage is always 100%.

My maximum writing speeds are:
ntfs-3g-->ext3 max ~30 MB/sec
ext3-->ext3 max ~28 MB/sec
ext3-->ntfs-3g max ~15MB/sec
ntfs-3g-->ntfs-3g max ~15 MB/sec

I understand that writing to ext3 is much faster because it is a native linux fs, but I cant understand why the high CPU usage.

While coping, ksysguard shows that the progress with the higher system% is kio_file when coping ext3-->ext3, or kio_file and ntfs-3g, when coping from or to a ntfs disk.

The problem is not with the CPU, in windows the writing speed is higher and the CPU usage is much lower. So I thing this is an Arch configuration problem but don't know where exactly to look. Searched the forum but didnt find any solution.

Any ideas? Anyone with similar problems?

Last edited by matersci (2007-09-09 22:37:00)

Offline

#2 2007-09-18 12:50:08

kendosperling
Member
From: Dresden
Registered: 2007-08-28
Posts: 49

Re: 100% CPU usage when writing to disk

Hello,

you should verify dma is enabled. I think you can do this by hdparm.

Offline

#3 2007-09-19 20:21:32

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: 100% CPU usage when writing to disk

with hdparm -I /dev/sda I get:


hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
        Model Number:       Maxtor 6L200M0
        Serial Number:      L41ZFT2C
        Firmware Revision:  BACE1G10
Standards:
        Used: ATA/ATAPI-7 T13 1532D revision 0
        Supported: 7 6 5 4
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:  398297088
        device size with M = 1024*1024:      194481 MBytes
        device size with M = 1000*1000:      203928 MBytes (203 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Advanced power management level: unknown setting (0x0000)
        Recommended acoustic management value: 192, 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_VERIFY command
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                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
                Media Card Pass-Through
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    URG for READ_STREAM[_DMA]_EXT
           *    URG for WRITE_STREAM[_DMA]_EXT
           *    SATA-I signaling speed (1.5Gb/s)
           *    Native Command Queueing (NCQ)
                Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Data Tables (AC5)
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
        not     supported: enhanced erase
Checksum: correct






It says ATA device, with non-removable media but this is a SATA disk!

Also,
#  hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads:  166 MB in  3.01 seconds =  55.23 MB/sec (SATA Disk)

and

#  hdparm -t /dev/hdb

/dev/hdb:
Timing buffered disk reads:  176 MB in  3.02 seconds =  58.26 MB/sec (IDE Disk)


hdprm says dma is on for the ide disk, but says nothing about dma for the SATA.

I think the problem is because the kernel recognize the SATA disk as IDE.

Last edited by matersci (2007-09-19 20:24:10)

Offline

#4 2007-09-19 20:56:00

insane
Member
Registered: 2006-06-04
Posts: 106

Re: 100% CPU usage when writing to disk

Have a look at this http://wiki.archlinux.org/index.php/Con … mkinitcpio

My HOOKS line

HOOKS="base udev autodetect pata scsi sata filesystems"

Never says anything about DMA on SATA disks and there is no option to toggle.

Last edited by insane (2007-09-19 20:59:21)

Offline

#5 2007-09-20 16:27:59

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: 100% CPU usage when writing to disk

I am using mkinitcpio and my HOOKS line was similar with yours, except using ide instead of pata.
Changing to pata and creating new image didn't help.

Offline

#6 2007-09-20 16:44:51

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: 100% CPU usage when writing to disk

Your disk setup is okay. It has to be ntfs-3g, being userspace and all that fuzz...


1000

Offline

Board footer

Powered by FluxBB