Home

Linux & Admin Support Services

"Services provided by people who are proud of their achievements"

Introductionabout usservicesSysAdmins Blogcontact us

Western Digital, can I have my 2 days back?

Submitted by Steve Holdoway on Tue, 02/03/2010 - 10:06

I was asked to build a small office server for a local web dev company a few weeks ago. Nothing extreme was needed, so I built up a debian lenny based server, with a couple of GB memory, and a pair of 1TB Western Digital WD10EARS disks in a softraid mirror. Simple, no brainer so I thought.

Not So! Disk performance was absolutely appalling... sustained under 1GB/sec even with a following wind, and the CPU constantly between 50 and 100% in wait io. After spending days looking at everything else...

  • Installing backported kernels right up to 2.6.30
  • Kernel tuning: memory, semaphores, dirty write thresholds. It even looked like a db server at one point!
  • the ATI Technologies Inc SB700/SB800 SATA Controller has had some pretty poor press in the past, so even I ended up using a different controller, which was EVEN WORSE! )

... I decided to see if I'd chosen unwisely on the disk front. It seems that I sort of did. These WD Green disks are formatted with 4096 byte blocks, not the usual 512. While this shouldn't be a problem, it doesn't report this fact properly. Also, if partitions aren't actually created on a 4k boundary, then performance slows to a crawl.

cranking up parted, rather than fdisk, and I find that the first partition starts at 31.5kB - 512 bytes out. A post on the WDC community forum by nuess0r ( http://community.wdc.com/t5/Desktop/Problem-with-WD-Advanced-Format-driv... ) provides a method to use parted to ensure the partitions start on 8k boundaries. Following on from his comments about starting on 40kb boundary being the fastest, I've re-ordered so that the boot partition is second, with the user data partition first, as follows:


Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit kib
(parted) print
Model: ATA WDC WD10EARS-00Y (scsi)
Disk /dev/sda: 976762584kiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 40.0kiB 924026710kiB 924026671kiB primary reiserfs raid
2 924026712kiB 972856248kiB 48829537kiB primary ext3 boot, raid
3 972856252kiB 976762584kiB 3906332kiB primary linux-swap raid

Now it's flying along ( well relatively, I'm still breathing a sigh of relief and trying to get my sanity back! ), just like it should have in the first place.

Why did you do this to me Western Digital?

»
Steve Holdoway's blog
Copyright © 2006-2023 GreenGecko.co.nz All rights reserved.

Services Offered

Linux consultancy / Systems Administration / Database Management / Systems Monitoring / Performance Tuning / Security Auditing / Magento Support / Magento Hosting / DIY Magento /