# AHCI HDD access destroys performance

## mattsavigear

I have a couple of machines, one Intel quad-core desktop and one dual-core laptop. For some time now (I'm not sure if it corresponds to a kernel upgrade, but it's been a problem for months), both machines have suffered from massive performance drop-off when accessing the disk. For example, when unzipping the large distribution file for netbeans, pretty much everything else freezes down to page refreshes in Firefox.

Both machines are running ~AMD64 and have SATA drives set up for AHCI access. The laptop is running 2.6.27-gentoo-r4 and the desktop is on 2.6.30-gentoo-r1. I'm finding that my 'old' 3.2GHz P4 machine is actually more responsive to use than these more recent machines (though I'm just moving to 2.6.30 from 2.6.24-gentoo-r3 which hopefully won't break anything).

I'm not even sure where to start diagnosing this or what information may prove useful - can anyone offer any pointers or suggestions?

EDIT: Might have found it - I had some old PATA drivers also built into the kernel. Laptop seems a bit more responsive now, will check the desktop tomorrow and report back...

----------

## szczerb

I noticed the same thing when netbeans was being extracted on my T2370. I guess that choosing a different IO allocator or what it's called (there is deadline and two other - I'm not gonna run menuconfig right now to look for it, but I'm sure you know what I'm refering to) might change it.

----------

## mattsavigear

Yeah, good plan. I'll fiddle with those if the driver removal I mentioned in my edit above doesn't sort things out.

----------

## snIP3r

hi!

theres a thread in the forums "gentoo on amd64" section about the same problem you describe:

https://forums.gentoo.org/viewtopic-t-482731.html

perhaps this helps!

greets

snIP3r

----------

## mattsavigear

Thanks for the link. I think the stripping out of the extraneous Intel PATA drivers has helped quite a bit, but I'm still not 100% happy with the responsiveness.

----------

## energyman76b

what io scheduler are you using? as? deadline cfq? Which kernel timer freuqency? 100? 300? 1000? Preemption? Voluntary or forced?

In my experience forced preemption is the worst when there are disk accesses and Voluntary the best. For the frequency - 300. And CFQ scheduler.

----------

## mattsavigear

Currently using CFQ, 1000Hz and forced preemption - I sometimes use the machine for low-latency audio work. I think I'll build a couple of kernels and swap when I need to.

Oddly enough, by 32bit dedicated audio machine with these settings doesn't suffer from this problem.

----------

## energyman76b

something you can play around with, without building different kernels is

/proc/sys/vm/dirty_writeback_centisecs

/proc/sys/vm/dirty_ratio

and other stuff in vm/

----------

