Comment 22 for bug 216878

Revision history for this message
f3a97 (f3a97) wrote : Re: [Bug 216878] Re: [regression]Slow disk transfer rate on Hardy

Hello Zhang,
       this is a common issue, and is not related to Linux.

It is important to understand the testing that we're doing and how a
rotational disk works.

hdparm test the _sequential_ transfer speed, which is the speed at which
data can be transferred from sequential sectors.

Real life data transfer can be much lower indeed - as you've measured -
since disks are mechanical parts, they have a moving arm inside. This
implies that if your workload is random (as opposed to sequential), you end
up with another bottleneck, which is arm movement. This slows down your
throughput to 5 MB/s.

If you generate a pure random workload for your disk, you'll see that you
can barely reach 1-2 MB/s! You can try that issuing a:

$ find / -ls > /dev/null

and watching disk stats with

# iostat -x 10

Bye!

2009/2/15 ZhangInSeattle <email address hidden>

> My situation might be related to this bug:
>
> I bought a Thinkpad T61 in last October. I erased Vista and installed
> Ubuntu 8.7 and later upgraded to 8.10. The disk speed seemed slow. I
> tried the following command to test the real read speed:
>
> $ date; cp a_100_MB_file /dev/null; date;
>
> The copying takes about 20 seconds. So the speed is about 5MB/sec.
>
> But when I try to use hdparm to test the read speed, the result is like
> this:
>
> $ sudo hdparm -t /dev/sda
>
> /dev/sda:
> Timing buffered disk reads: 130 MB in 3.03 seconds = 42.84 MB/sec
>
> Can anybody tell me why the real read speed is far from the 42.84MB/sec?
>
> --
> [regression]Slow disk transfer rate on Hardy
> https://bugs.launchpad.net/bugs/216878
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "linux" source package in Ubuntu: Triaged
>
> Bug description:
> Hi,
> upgrading from Gutsy to Hardy I've seen a considerable HD transfer rate
> slowdown.
>
> I have a machine with two IDE disks, both are udma5 capable. In Gutsy, they
> were recognised as 'hd[ab]' and I with hdparm sequential thoughput was:
>
> /dev/hdb:
> Timing buffered disk reads: 172 MB in 3.01 seconds = 57.19 MB/sec
>
> which is quite correct for that kind of drive.
>
> In Hardy, they are recognized as 'sd[ab]', and the performance regarding
> transfer rate is LESS THAN HALF:
>
> /dev/sdb:
> Timing buffered disk reads: 78 MB in 3.01 seconds = 25.92 MB/sec
>
> That slowdown is visible also during file transfer operations, obviously.
> One thing I've noticed is that in the dmesg, my drive is set at UDMA/33, and
> also hdparm reports that udma2 is currently configured:
>
> sudo hdparm -i /dev/sdb
>
> /dev/sdb:
>
> Model=WDC WD2500JB-00GVC0 , FwRev=08.02D08, SerialNo=
> WD-WCAL78023606
> Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
> RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
> BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
> CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=488397168
> IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
> PIO modes: pio0 pio1 pio2 pio3 pio4
> DMA modes: mdma0 mdma1 mdma2
> UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5
> AdvancedPM=no WriteCache=enabled
> Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6
>
> * signifies the current active mode
>
> I've seen a number of users complaining about that, a number of bugs with
> status Incomplete or Release Fixed. I can say that with the latest Hardy
> patches (as of now), the problem is still there. Will that be fixed before
> the final release? If not, that can be a huge performance penalty!
>
> Here are some infos. I'm willing to help to solve the problem, just ask if
> you need any info.
> ste@ste-ubuntu:~$ lsb_release -rd
> Description: Ubuntu hardy (development branch)
> Release: 8.04
>
> Pertinent dmesg output:
>
> [ 35.085132] libata version 3.00 loaded.
> [ 35.460830] pata_via 0000:00:11.1: version 0.3.3
> [ 35.463781] scsi0 : pata_via
> [ 35.465345] scsi1 : pata_via
> [ 35.465441] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xcc00 irq
> 14
> [ 35.465446] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xcc08 irq
> 15
> [ 35.637026] ata1.00: ATA-6: Maxtor 5T030H3, TAH71DP0, max UDMA/100
> [ 35.637034] ata1.00: 60030432 sectors, multi 16: LBA
> [ 35.638417] ata1.01: ATA-6: WDC WD2500JB-00GVC0, 08.02D08, max UDMA/100
> [ 35.638424] ata1.01: 488397168 sectors, multi 16: LBA48
> [ 35.638446] ata1.00: limited to UDMA/33 due to 40-wire cable
> [ 35.638450] ata1.01: limited to UDMA/33 due to 40-wire cable
> [ 35.652916] ata1.00: configured for UDMA/33
> [ 35.669962] ata1.01: configured for UDMA/33
> [ 36.136471] ata2.00: ATAPI: LG DVD-ROM DRD-8160B, 1.01, max
> UDMA/33
> [ 36.136502] ata2.01: ATAPI: HL-DT-ST GCE-8160B, 1.02, max MWDMA2
> [ 36.300210] ata2.00: configured for UDMA/33
> [ 36.464034] ata2.01: configured for MWDMA2
> [ 36.464239] scsi 0:0:0:0: Direct-Access ATA Maxtor 5T030H3
> TAH7 PQ: 0 ANSI: 5
> [ 36.464959] scsi 0:0:1:0: Direct-Access ATA WDC WD2500JB-00G
> 08.0 PQ: 0 ANSI: 5
>
> Kernel:
>
> Linux ste-ubuntu 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
> GNU/Linux
>
> For other info, just let me know! BTW, congrats for the GREAT WORK!!!
>