Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

VERY slow read HD performance (Timing buffered disk reads)

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Lucero del Alba
n00b
n00b
User avatar
Posts: 12
Joined: Sat Sep 27, 2003 5:22 am
Location: Buenos Aires, Argentina
Contact:
Contact Lucero del Alba
Website

VERY slow read HD performance (Timing buffered disk reads)

  • Quote

Post by Lucero del Alba » Sat Sep 27, 2003 6:18 am

Hello people, I'm a new Gentoo user and this is my first post. I would like to solve a little problem with the performance of my hard disk, perhaps you could help me.

I realized that my system gets VERY slow when performs an aggressive reading or writing to my hard disk. I couldn't find the reason for I while, but take these examples: if I watch a video from my HD the system gets slower, if a watch it from the CD-ROM the systems works normally; when burning a CD (from an ISO or whatever, from my HD) everything gets **so** irritating slow unit burning finished; when copy a big file from a partition to another... and so on. By the way, I don't have this particular problem under MS Windows.

Before Gentoo I was using SuSE 8.0 and then switched. I build it from stage1, and the system itself is now much faster than before (applications, etc), I mean, everything else works correctly but this issue. I was seeking the forum for a possible solution but didn't find it although I found 2 related posts (Slow CP speeds across HD and slow second ide device).

Alright, this is my box:
  • HD: 40 GB Maxtor.
    CPU: 1 GHz AMD Duron.
    RAM: 256 MB DDR.
More info?

Code: Select all

bash-2.05b$ dmesg | grep hda
Kernel command line: root=/dev/hda7 hdc=ide-scsi hdd=ide-scsi
    ide0: BM-DMA at 0xd400-0xd407, BIOS settings: hda:DMA, hdb:pio
hda: Maxtor 5T040H4, ATA DISK drive
hda: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=4982/255/6
And the most important:

Code: Select all

bash-2.05b# hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.66 seconds =195.42 MB/sec
 Timing buffered disk reads:  64 MB in 33.44 seconds =  1.91 MB/sec
As you can see, the "buffered disk reads" is extremely slow! And an except from my /etc/fstab:

Code: Select all

/dev/hda1           /mnt/c          vfat    defaults,uid=1000,gid=100  0 0
/dev/hda2           /mnt/e          ntfs    defaults,uid=1000,gid=100  0 0
/dev/hda7           /               reiser  noatime,notail             0 1
/dev/hda6           none            swap    sw                         0 0
/dev/cdroms/cdrom0  /mnt/cdrecorder iso9660 user,noauto,ro             0 0
/dev/cdroms/cdrom1  /mnt/cdrom      iso9660 user,noauto,ro             0 0
... by the way, my boot is also on /dev/hda7 (that's way "notail" option is enabled). My only HD is alone as primary master, and my CD-RW / CD-ROM are on secondary IDE

So, that's it. Any suggestion, clue, comment... anything?

Thanks in advance, people!
Emiliano Bazaes
IRIS on MIRROR Development Director
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56104
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Sep 27, 2003 11:00 am

Lucero del Alba,

It looks like a serious case of not using DMA on the hard drive.

What does using_dma say at the bottom of less /proc/ide/hda/settings?
If its not a 1, read man hdparm and learn how to set it.

If dma is always safe on your chip set, turn it on in the kernel, which I think you can do with a parameter on the kerenl command line.

Regards,

NeddySeagoon
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Caffeine
Guru
Guru
User avatar
Posts: 401
Joined: Wed Jul 17, 2002 7:21 pm
Location: Melbourne, Australia

  • Quote

Post by Caffeine » Sat Sep 27, 2003 4:15 pm

Yeah, sounds like you haven't enabled DMA.

You can check it either as per NeddySeagoon's suggestion, or use hdparm so:

Code: Select all

espresso root # hdparm -d /dev/hda

/dev/hda:
 using_dma    =  1 (on)
To enable DMA:

Code: Select all

espresso root # hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 using_dma    =  1 (on)
There are other paramaters you can tune with hdparm also but I cann't find the thread as the search page seems to have died.
Top
Lucero del Alba
n00b
n00b
User avatar
Posts: 12
Joined: Sat Sep 27, 2003 5:22 am
Location: Buenos Aires, Argentina
Contact:
Contact Lucero del Alba
Website

solved! thank you

  • Quote

Post by Lucero del Alba » Sun Sep 28, 2003 12:13 am

Hello again. You both were right, DMA was disabled for my first IDE.

As NeddySeagoon indicated, using_dma in /proc/ide/hda/settings was in '0', and I could enable it with hdparm, as Caffeine pointed (with "hdparm -d1 /dev/hda") and things were better immediately:

Code: Select all

bash-2.05b# hdparm -tT /dev/hda 
 
/dev/hda: 
 Timing buffer-cache reads:   128 MB in  0.70 seconds =181.56 MB/sec 
 Timing buffered disk reads:  64 MB in  1.84 seconds = 34.78 MB/sec
I had some troubles trying to parsing the necessary options to the kernel, at boot-time 'til I finally catched it:

Code: Select all

ide0=ata66 ide0=dma
Firstly, this was confusing to me because my HD is an ATA100, but 'ata66' option seems to be valid to ATA 66 and ATA100 drives (ATA133??).

Thanks very much for your comments, people!!

By the way. If someone else out there had this same problem, the options "ide0=ata66 ide0=dma" (which worked to me) can be parsed to the kernel easily. If you had Grub as boot manager (my case), edit /boot/grub/grub.conf (or /boot/grub/menu.lst) and find something like "kernel (hd0,6)/boot/bzImage" and add " ide0=ata66 ide0=dma" in that same line. Then, should get something like:

Code: Select all

title=Gentoo Linux
root (hd0,6)
kernel (hd0,6)/boot/bzImage root=/dev/hda7 ide0=ata66 ide0=dma
If you had LILO as boot-manager you should add append="ide0=ata66 ide0=dma", like this:

Code: Select all

image=/boot/bzImage 
         label=Gentoo 
         (...) 
         append="ide0=ata66 ide0=dma"
You need also to have enabled some flags on your kernel under "ATA/IDE/MFM/RLL support" and "IDE, ATA and ATAPI Block devices":

Code: Select all

[*]     Generic PCI bus-master DMA support 
[*]       Use PCI DMA by default when available
More info at the The Linux Ultra-DMA Mini-Howto (see Activating and Deactivating UDMA section).

See ya!
Emiliano Bazaes
IRIS on MIRROR Development Director
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic