Tuesday 16 October 2018

linux - Disk operations freeze Debian


I have just installed Debian testing on my new desktop and I am not very happy with performance - when I perform a disk intensive operation, e.g. upgrade packages in the system, everything seems to freeze, e.g. changing tabs in Iceweasel takes 3 seconds. I run the Debian on my 3 year old Thinkpad X60 ultra-portable, and I don't have these issues. (every single parameter of the laptop is much worse than the desktop).


I am using the default packaged kernel and scripts.


I run


hdparm -t /dev/sda1

And I got around 96GB/s, which is expected. What else can I try to make it work better?


EDIT:


grzes:/home/ga# hdparm -i /dev/sda

/dev/sda:

Model=WDC WD15EARS-00Z5B1, FwRev=80.00A80, SerialNo=WD-WMAVU1362357
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=2930277168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7

* signifies the current active mode

EDIT2: Even my wife said "on this new computer I can't do anything when I copy the photos from the camera and its much worse than on the old one". So it must be serious.


EDIT3: Updated to 2.6.32, but still no improvement


EDIT4: I forgot to mention that the new disk is ext4, the old was ext3.


EDIT5: Still not solved. I have a P43 ASUS P5QL-E board. Lines from dmesg that seem relevant:


[    0.370850] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)                              
[ 0.370852] io scheduler noop registered
[ 0.370853] io scheduler anticipatory registered
[ 0.370854] io scheduler deadline registered
[ 0.370876] io scheduler cfq registered (default)
...
[ 0.908233] ata_piix 0000:00:1f.2: version 2.13
[ 0.908243] ata_piix 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 0.908246] ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
[ 0.908275] ata_piix 0000:00:1f.2: setting latency timer to 64
[ 0.908316] scsi0 : ata_piix
[ 0.908374] scsi1 : ata_piix
[ 0.909180] ata1: SATA max UDMA/133 cmd 0xa000 ctl 0x9c00 bmdma 0x9480 irq 19
[ 0.909183] ata2: SATA max UDMA/133 cmd 0x9880 ctl 0x9800 bmdma 0x9488 irq 19
[ 0.909199] ata_piix 0000:00:1f.5: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 0.909202] ata_piix 0000:00:1f.5: MAP [ P0 -- P1 -- ]
[ 0.909228] ata_piix 0000:00:1f.5: setting latency timer to 64
[ 0.909279] scsi2 : ata_piix
[ 0.909326] scsi3 : ata_piix
[ 0.910021] ata3: SATA max UDMA/133 cmd 0xb000 ctl 0xac00 bmdma 0xa480 irq 19

Answer



This is finally fixed! As @Rachel pointed out, the problem indeed was with alignment to the 4kb sectors, but unfortunately the article linked was incorrect :(


The correct way to align partitions is here: http://www.linuxconfig.org/linux-wd-ears-advanced-format


And this article gives a pretty good benchmark so that you can check if your partition table is correct: http://article.gmane.org/gmane.linux.utilities.util-linux-ng/2955


On a side note, if you have this drive and use Linux, you also SHOULD increase one of the idle timers as described here: http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=5357&p_created=1266947046&p_sid=Os7DQL2k&p_accessibility=0&p_redirect=&p_srch=1&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9NTEsNTEmcF9wcm9kcz0yMjcsMjk0JnBfY2F0cz0xMzAmcF9wdj0yLjI5NCZwX2N2PTEuMTMwJnBfcGFnZT0x&p_li=&p_topview=1


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...