Friday, November 21, 2008

Disk cables and disk speed.

Recently, i got acquainted to a baffling fact. Here is the story -
I attached a new SATA hard disk drive to my office machine. But, it failed to perform. The disk bandwidth was capped to a meagre 3.54MB/s irrespective of the block size, reading patterns, amount of data read and the OS. Normally, one gets read speeds upto 70MB/s from such a drive.
    I thought the HDD might be defective and so, we called our vendor. He said, change the disk data cable. That was a silly suggestion i thought. Had the cable been defective, the disk would not have worked at all. The performance metrics suggested that some mechanism(or absence of some) was capping the speed at precisely 3.54MB/s. After trying out a few disk  utilities, BIOS options, DMA settings and a couple of different kernels from various linux live cds, I finally gave up and decided to live with the slow speed.
    A couple of weeks after that, Ashutosh enquired whether the disk problem had been fixed. When i said no, he insisted on changing the cable as the vendor had suggested. I was sure that changing the cable won't help  but, since everything else was had been tried, i agreed. As we booted up the machine after plugging in a new cable, i was dumbstruck! The disk returned to its normal speed!! I could hardly believe. My understanding that, disk cables are binary i.e either they work perfectly or they do not work at all, proved to be a total myth. Later, i switched the cable to the old one and as I'd expected, that worked too. The problem i guess, was a loose contact!
   This was really strange and i've still not understood the exact  reason behind this. From what little i know about hardware - i guess, the loose contact might have been on one of the trasmit/receive pins in the cable(rather than ground pins).  The error correction mechanism might be doing a lot of work to get/send the data correctly(lots of retransmissions ?) which caused the throughput to reduce to a low.  Of course, this is a wild guess, i would be happy to know the correct answer.
Thanks to Ashutosh for the inistence :)

Lesson learnt:  Do not cling to your views and knowledge too much. Be open to evalute other's views however unconvincing they might seem at first.

Related Content

No comments: