LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-24-2006, 03:27 AM   #1
alesz
Member
 
Registered: Mar 2005
Distribution: FC5 on disk, Knoppix as LiveCD
Posts: 48

Rep: Reputation: 15
FC4 - DMA on sda: HDIO_SET_DMA failed: Inappropriate ioctl for device


Every time I use hard disc, especially when copying large files (.iso, zip or directories with many files), the CPU goes 100% under FC4. Is DMA not enabled perhaps?

I've tried:

Code:
# hdparm -d 1 /dev/sda

/dev/sda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
My disk is SATA, MAXTOR 7Y250M0.

As I might thing that DMA is not enabled, when listing with "dmesg", at sda it says "Type: Direct-Access":

Code:
SCSI subsystem initialized
libata version 1.12 loaded.
ata_piix version 1.04
ACPI: PCI Interrupt 0000:00:1f.2[A] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0xC000 ctl 0xC402 bmdma 0xD000 irq 5
ata2: SATA max UDMA/133 cmd 0xC800 ctl 0xCC02 bmdma 0xD008 irq 5
ata1: dev 0 cfg 49:2f00 82:7869 83:7d09 84:4003 85:7869 86:3c01 87:4003 88:203f
ata1: dev 0 ATA, max UDMA/100, 488397168 sectors: lba48
ata1: dev 0 configured for UDMA/100
scsi0 : ata_piix
ATA: abnormal status 0x7F on port 0xC807
scsi1 : ata_piix
  Vendor: ATA       Model: Maxtor 7Y250M0    Rev: YAR5
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 < sda5 sda6 sda7 sda8 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Is it possible that later somehow the DMA is disabled by some init script or that other hard disc drives (I have 2 more) take DMA away during runtime by some script again?

The disk read timings go as following:

Code:
# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   1904 MB in  2.01 seconds = 946.26 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
 Timing buffered disk reads:  156 MB in  3.02 seconds =  51.72 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
Which is not bad, but the CPU was 100% here.

Any clue on how to better performance?
 
Old 01-25-2006, 03:03 AM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
I asked a similar question some days ago here and the answer I got made me understand dma setting works differently on stata drives and - seeing your drive's performance - is turned on. The 100% cpu use must come from a different source.

BTW what are your system specs? Maybe you have a slow processor or little memory..

Last edited by linmix; 01-25-2006 at 03:05 AM.
 
Old 01-25-2006, 03:18 AM   #3
alesz
Member
 
Registered: Mar 2005
Distribution: FC5 on disk, Knoppix as LiveCD
Posts: 48

Original Poster
Rep: Reputation: 15
So I must have DMA enabled and something else is a bottleneck.
During measurements above, the system was not running any heavy processes, it was 0% CPU before and after measurement.

I have a Intel(R) Celeron(R) CPU 2.80GHz, with 512MB main memmory, running KDE and still there is about 200MB free memmory, that is mainly used for disk cache.

When the disk is operating, the user interface under KDE sometimes gets much less responsive or almost unresponsive.

Could it be some drivers or wrong disk partitioning?

My fdisk /dev/sda output:
Code:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 tracks
Units = cylinders from 16065 x 512 = 8225280 bytes

  Naprava Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7833    62918541   83  Linux
/dev/sda2            7834       30401   181277460    5  Extended
/dev/sda5            7834       10444    20972826   83  Linux
/dev/sda6           10445       10705     2096451   82  Linux swap / Solaris
/dev/sda7           10706       15927    41945683+  83  Linux
/dev/sda8           15928       27676    94373811   83  Linux
 
Old 01-25-2006, 03:22 AM   #4
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
disk partitiobning looks ok. How about swap. Run 'free' from the terminal.
 
Old 01-25-2006, 03:27 AM   #5
alesz
Member
 
Registered: Mar 2005
Distribution: FC5 on disk, Knoppix as LiveCD
Posts: 48

Original Poster
Rep: Reputation: 15
Curent system status:
Code:
$free
             total       used       free     shared    buffers     cached
Mem:        515732     505264      10468          0      14904     132928
-/+ buffers/cache:     357432     158300
Swap:      2096440      75748    2020692
 
Old 01-25-2006, 10:38 AM   #6
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Swap is ok. Try running it again next time your processor runs to 100%
Can't come up with anything else right now.
 
Old 01-25-2006, 10:55 AM   #7
alesz
Member
 
Registered: Mar 2005
Distribution: FC5 on disk, Knoppix as LiveCD
Posts: 48

Original Poster
Rep: Reputation: 15
It happened again. About an hour ago, while developing an app in kdevelop, because of my programm error, my program went to write into some file indefinitely. I couldn't stop the running program without hard reset the system. X was not responsive, I couldn't log in to tty1, nothing. Sometimes the same bottleneck happens when filling the swap file with some process, but after swap is filled up totally, kernel starts killing orphan processes (hopefully the problematic one too) and usially I don't have to hard-reset.
----

As you suggest, I copied a large .iso file (>3GB) in konqueror (same happens with cp),
and measured with free every 2 seconds:

Code:
$ free
             total       used       free     shared    buffers     cached
Mem:        515732     509268       6464          0        976     192256
-/+ buffers/cache:     316036     199696
Swap:      2096440     122428    1974012

$ free
             total       used       free     shared    buffers     cached
Mem:        515732     509600       6132          0       1076     192356
-/+ buffers/cache:     316168     199564
Swap:      2096440     122428    1974012

$ free
             total       used       free     shared    buffers     cached
Mem:        515732     509488       6244          0       1112     192412
-/+ buffers/cache:     315964     199768
Swap:      2096440     122428    1974012

$ free
             total       used       free     shared    buffers     cached
Mem:        515732     505772       9960          0       1084     189412
-/+ buffers/cache:     315276     200456
Swap:      2096440     122428    1974012

$ free
             total       used       free     shared    buffers     cached
Mem:        515732     509364       6368          0       1012     192360
-/+ buffers/cache:     315992     199740
Swap:      2096440     122428    1974012

$ free
             total       used       free     shared    buffers     cached
Mem:        515732     509508       6224          0       1000     193292
-/+ buffers/cache:     315216     200516
Swap:      2096440     122424    1974016
CPU utilization went to 100%, exchanging system time 100% and user time 100%, about every 200 msec or so, sometimes frequently and sometimes system time got only to 30%-50%.

Could it be some strange disk access algorithm's fault in some driver in FC4?
 
Old 01-26-2006, 07:45 AM   #8
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
As you can see you've not run out of Ranm and you're using little SWAP.

I've been trying to get my box to do the same thing, but although copying large files from cd to HDD produces some peaks in cpu usage, they're just that, peaks, and I can load other apps at the same time - slowly, but it works

I imagine you used ctrl+alt+F1 to try to log into tty1
If the processor is hogged this can take some time!

I'm not sure where to go from here.
Anybody else??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Perl error with "Inappropriate ioctl for device" bnutting Programming 9 03-12-2012 07:25 AM
kismet "channel get ioctl failed...no such device" fatblueduck Linux - Software 0 01-03-2006 01:51 AM
Inappropriate ioctl for device(25) why1957 Linux - Networking 0 08-03-2003 04:45 AM
stty: standard input: Inappropriate ioctl for device fwalthard Linux - General 0 07-14-2003 02:55 AM
HDIO_SET_DMA failed: Operation not permitted acjt Linux - Hardware 4 05-02-2003 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration