# Hard drive transfer speeds in the pits

## Jerri

I have a slight problem involving rather nasty hard disk transfer speeds (15 minutes to move a 500 meg file from one partition to another-windows takes around 4).  There is also a dramatic slow down in system performance, while the transfer is in progress (not unlike the effects when dma is *not* enabled).  My system doesn't crash, but it makes working conditions difficult when moving large files.

Initially, this disk was operating reasonably.. transfer rates where nothing to write home about, but acceptable.  I admit, I was tinkering to try and squeeze a little more performance (tried -X 70 but didn't notice any gain in perf.)  I was unsuccessfull and just left it at that.. its only a recent development.

The unusal thing is, hdparm benchmark results are half decent:

```

/dev/hda:

 Timing buffer-cache reads:   128 MB in  0.35 seconds =365.71 MB/sec

 Timing buffered disk reads:  64 MB in  1.35 seconds = 47.41 MB/sec

```

One more note before drive settings, I have only the one hard disk on my primary channel.. incase that makes any difference.

the results of hdparm /dev/hda:

```

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    =  8 (on)

 geometry     = 14946/255/63, sectors = 240121728, start = 0

```

hdparm -I /dev/hda:

```

/dev/hda:

ATA device, with non-removable media

Model Number:       Maxtor 6Y120L0                         

Serial Number:      Y41F60SE           

Firmware Revision:  YAR41VW0

Standards:

Supported: 7 6 5 4

Likely used: 7

Configuration:

Logicalmaxcurrent

cylinders1638316383

heads1616

sectors/track6363

--

CHS current addressable sectors:   16514064

LBA    user addressable sectors:  240121728

device size with M = 1024*1024:      117246 MBytes

device size with M = 1000*1000:      122942 MBytes (122 GB)

Capabilities:

LBA, IORDY(can be disabled)

Queue depth: 1

Standby timer values: spec'd by Standard, no device specific minimum

R/W multiple sector transfer: Max = 16Current = 16

Advanced power management level: unknown setting (0x0000)

Recommended acoustic management value: 192, current value: 254

DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 udma6

     Cycle time: min=120ns recommended=120ns

PIO: pio0 pio1 pio2 pio3 pio4

     Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:

EnabledSupported:

   *NOP cmd

   *READ BUFFER cmd

   *WRITE BUFFER cmd

   *Host Protected Area feature set

   *Look-ahead

   *Write cache

   *Power Management feature set

Security Mode feature set

   *SMART feature set

   *FLUSH CACHE EXT command

   *Mandatory FLUSH CACHE command

   *Device Configuration Overlay feature set

   *Automatic Acoustic Management feature set

SET MAX security extension

Advanced Power Management feature set

   *DOWNLOAD MICROCODE cmd

   *SMART self-test

   *SMART error logging

Security:

Master password revision code = 65534

supported

notenabled

notlocked

notfrozen

notexpired: security count

notsupported: enhanced erase

HW reset results:

CBLID- above Vih

Device num = 0 determined by CSEL

Checksum: correct

```

----------

## Jimboberella

What kernel are you using? I've seen this happen with some highly tuned kernels like CK-sources because they are desktop response tuned at the expense of disk throughput.

----------

## Jerri

vanilla sources 2.4.22

----------

## Jerri

Just to add to this, I can copy files from a cd at significantly faster rates, then from 1 partition to another.  Am I correct in assuming there is some kind of bottleneck when moving files within my harddisk?  Are there any work arounds to improve performance?

----------

## squanto

You will see a slight drop in speed when doing a transfer within one disk vs from one disk to another, but it shouldn't act like DMA is off...

In your kernel config (if you changed kernels lately) did you include your chipset and generic DMA in the IDE section?

----------

## Jerri

Im not convinced it's my kernel, as I have'nt changed it recently.  Atleast, it was in good shape well before i noticed this problem. I also have support for my particular chipset (nforce2) enabled.   Perhaps I should invest in a couple of disk and creat a raid 0 setup.. that might solve my woes.  

Oh well, thanks for the input  :Smile: 

----------

## squanto

The only thing I could think of is that your 500 meg file may be fragmented very very badly... and thus given ide drives having a seek time of around 10ms, this would really really ad up with a badly fragmented large file.  Or you are doing the move to/from a non-linux filesystem and theres cpu overhead having to deal with converting to the non-linux filesystem.  NTFS maybe? or FAT?

How much free space is on the partition you are copying from and to?  If there is very little left, then this may be the case.  Also you may have mentioned it, but I missed, what filesystem is on each partition?

----------

## Chris E

Hello, From your hdparm -i it says you have S.M.A.R.T enabled iirc this can hamper perfomance.

----------

## Jerri

Thanks for the suggestion.  I'll give that one a shot  :Smile: 

----------

## Jerri

 *Quote:*   

> 
> 
> Hello, From your hdparm -i it says you have S.M.A.R.T enabled iirc this can hamper perfomance.
> 
> 

 

Chris, would you be kind enough to tell me how to do this?  The man page doesn't reveal any option to disable the S.M.A.R.T. feature.  Googling hasn't offered much either.

----------

## Odin

Should be a bios option.

----------

