Slow sata disk with ahci driver after resume on Ubuntu Natty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: kernel-
On a sony laptop with a 250 Go HD WD2500BEVS (5400 rpm) running Ubuntu 9.04 - Kernel 2.6.28-
Before suspend, "hdparm -tT /dev/sda" gives :
Timing cached reads: 1900 MB in 2.00 seconds = 950.18 MB/sec
Timing buffered disk reads: 162 MB in 3.01 seconds = 53.83 MB/sec
after suspend, the same command gives :
Timing cached reads: 1156 MB in 2.00 seconds = 578.00 MB/sec
Timing buffered disk reads: 8 MB in 3.20 seconds = 2.50 MB/sec
This issue seems to be related to the use of the ahci driver for managing the disk, and also probably to a IRQ conflict (the SATA and the ethernet controllers share in fact the same IRQ). A workaround is to use the ata_piix driver instead of ahci, but because the ahci driver is built-in and therefore cant be blacklisted, this workaround requires to recompile the kernel with the ahci driver as module. With a kernel 2.6.28-11.42 recompiled in this way, the disk doesn't slow down any more after resuming :
With the ata_piix driver in use (in a recompiled kernel), "hdparm -tT /dev/sda" gives before suspend :
Timing cached reads: 1732 MB in 2.00 seconds = 866.17 MB/sec
Timing buffered disk reads: 164 MB in 3.01 seconds = 54.52 MB/sec
After suspend, the same command gives :
Timing cached reads: 1838 MB in 2.00 seconds = 919.26 MB/sec
Timing buffered disk reads: 164 MB in 3.00 seconds = 54.61 MB/sec
Another problem related to the first one is that the system doesn't restart properly, it hangs at "The system will now restart". With the ata_piix driver, the restart is fine.
ProblemType: Bug
Architecture: i386
CurrentDmesg:
[ 30.322677] r8169: eth0: link up
[ 30.323819] ADDRCONF(
[ 41.220016] eth0: no IPv6 routers present
DistroRelease: Ubuntu 9.04
HibernationDevice: RESUME=
MachineType: Sony Corporation VGN-A417M
Package: linux-image-
ProcCmdLine: root=UUID=
ProcEnviron:
PATH=(custom, user)
LANG=fr_FR.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: linux
I can verify that I get the same behavior on a Vaio VGN-S5XP with a an Intel Corporation 82801FBM SATA controller and a FUJITSU MHV2100BH 100GB disk. On the latest Jaunty kernel (2.6.28- 11-generic) , after a resume disk performance completely deteriorates.
The sar utility reports excessive iowait use between 70% and 90%.
I have reverted to kernel 2.6.27-14-generic, where resume works as expected.