You are not logged in.

#1 2011-01-13 21:44:59

gemon
Member
Registered: 2010-11-23
Posts: 20

old computer - slow transfers for sata

hi all,
I've set up a linux box with very old stuff. I'm talking about a Pentium II 350 MHz on a Asus P5B, 192 MB RAM. Though I have some new disks, with which I am experienceing slow transfers and I would like to know some advices on what could I do. Or maybe to know that the answer is: the cpu power is too low to have decent speeds.

Now, briefly what I've is:
- on a PCI, an old Promise FastTrak TX4 sata 150
- on it, 3 WD20EARS 2TB disks
- consider 2 of them. They have been partitioned with parted
- the partition method has been (for both): gpt label, mkpart with starting sector 2048s and end -1. This should have been guaranteed alignment for the 4K sectors of the drive
- filesystem is lvm for both. each is a single big pv on single vg on a single lv (consider one is the drive where I store all my photos - 2TB big, the other is the drive where I store backups of them - 2TB)

when I transfer files between them (tens of folders of hundreds of files size 600kb-4mb) for backup with rsnapshot I see the following, using iostat 5 -m:

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          37.33    0.80   60.88    1.00    0.00    0.00

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sda               0.00         0.00         0.00          0          0
sdb              83.03         5.69         0.01         28          0
sdc              19.96         0.00         5.63          0         28
scd0              0.00         0.00         0.00          0          0
sdd              14.57         0.19         0.02          0          0
dm-0           1440.52         0.00         5.63          0         28
dm-1              0.00         0.00         0.00          0          0
dm-2           1449.10         5.66         0.00         28          0
dm-3           1449.10         5.66         0.00         28          0
dm-4              2.00         0.00         0.01          0          0

now the question: is there a way to get better speeds and to lower cpu load?

please note that, according to hdparm, everything should be correct (just an output from hdparm -I is shown here, they are exactly the same):

ATA device, with non-removable media
        Model Number:       WDC WD20EARS-00MVWB0
        Serial Number:      WD-WCAZA2284951
        Firmware Revision:  51.0AB51
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors: 3907029168
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:     1907729 MBytes
        device size with M = 1000*1000:     2000398 MBytes (2000 GB)
        cache/buffer size  = unknown
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Recommended acoustic management value: 128, 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:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
                DMA Setup Auto-Activate optimization
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT LBA Segment Access (AC2)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        402min for SECURITY ERASE UNIT. 402min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee205346fd3
        NAA             : 5
        IEEE OUI        : 0014ee
        Unique ID       : 205346fd3

uname -a is:

Linux myhost 2.6.36-ARCH #1 SMP PREEMPT Sat Jan 8 13:16:43 UTC 2011 i686 Pentium II (Deschutes) GenuineIntel GNU/Linux

any help?
thanks a lot
Gemon

Offline

#2 2011-01-15 11:38:03

gemon
Member
Registered: 2010-11-23
Posts: 20

Re: old computer - slow transfers for sata

can anyone at least help me out if I could have an alignment problem due to 4K sectors, or is a cpu bound issue?

thanks in advance
Gemon

Offline

#3 2011-01-15 11:49:23

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: old computer - slow transfers for sata

hmm...
Small files require large amount of time no matter what your system is, AFAIK. Check a lot of benchmarks on the internet they show how different file systems manage with small files, and in general it's much much much slower than with big files.
Also I don't know how much CPU power does the filesystem require. For example reiserfs is more cpu intensive than the rest, however it shouldn't be big deal on modern machines.
I think the main issue is in the large number of small files, which struggle to be copied on any operating systems.

Last edited by Dheart (2011-01-15 11:51:01)


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#4 2011-01-15 12:22:04

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: old computer - slow transfers for sata

LVM etc. all need CPU time. It is a weak CPU all in all, and I don't know how good that Promise S-ATA controller is (if it's good at all, it might offload all the work to the CPU, which makes it even worse). Either way, accessing both drives will be a bottleneck on a PCI slot - although it should never be as bad as this, but it's far from an ideal situation.

How well does your setup perform when e.g. you copy from one S-ATA HD to an internal P-ATA HD?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2011-01-15 14:10:40

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: old computer - slow transfers for sata

Would adding more ram help?


Mr Green

Offline

#6 2011-01-16 00:30:47

gemon
Member
Registered: 2010-11-23
Posts: 20

Re: old computer - slow transfers for sata

I will try adding some ram, I should have 128mb on my wife's brother pc.
Just some quick tests with dd to see if it is a problem of the pci channel - apparently it looks like. Tomorrow I will try to move one of the two disks on the other sata controller I have on the other pci slot.

First test is writing a sequential file to a WD20EARS (/dev/sdbx or /photo/photo as lvm)
Second test is reading from that same disk. 75 mb/s looks like a nice speed, considering the hosting pc anc pci slot bound at 133 mb/s bw
Third test is copying from one WD20EARS to the other
Fourth test is copying from one WD20EARS to the PATA drive where I have linux installed - consider this is on the motherboard controller and can do udma/33 only.

[root@myhost gemon]# dd if=/dev/zero of=/photo/photo/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 146.265 s, 14.7 MB/s
[root@myhost gemon]# dd if=/photo/photo/output.img of=/dev/null bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 28.3661 s, 75.7 MB/s
[root@myhost gemon]# dd if=/photo/photo/output.img of=/backup-photo/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 93.4719 s, 23.0 MB/s
[root@myhost gemon]# dd if=/photo/photo/output.img of=/home/gemon/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 116.291 s, 18.5 MB/s

tomorrow I'll redo some tests with the secondo wd20ears on the other pci slot.
thanks everybody for the first answers
Gemon

PS: filesystem is ext4 on all those lvm logical volumes

Offline

#7 2011-01-16 17:16:40

gemon
Member
Registered: 2010-11-23
Posts: 20

Re: old computer - slow transfers for sata

apparently there is no difference... /dev/sdb is on the promise, /dev/sdc on the via card:

[root@myhost by-path]# dd if=/photo/photo/output.img of=/backup-photo/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 95.9444 s, 22.4 MB/s

and iostat:

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
scd0              0.00         0.00         0.00          0          0
sda               0.00         0.00         0.00          0          0
sdb              71.40         5.66         0.00         28          0
sdc              28.00         0.00         5.60          0         28
sdd               0.20         0.00         0.00          0          0
dm-0           1434.80         0.00         5.60          0         28
dm-1              0.00         0.00         0.00          0          0
dm-2           1449.80         5.66         0.00         28          0
dm-3           1449.80         5.66         0.00         28          0
dm-4              0.00         0.00         0.00          0          0

nothing changes... :-/
ideas, apart from adding some ram which is something i still have to do?
Gemon

Offline

Board footer

Powered by FluxBB