Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Faster Copy ?< Next Oldest | Next Newest >
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 06 2006,03:32 QUOTE

Still can't figure out why linux is so slow copying large files between FAT32 disks (?)

But using the dd command does help (approx 1.7x);

~/tools/fastcopy.sh

Code Sample

#!/bin/bash
# A faster copy using dd
#
# Add this button command in EmelFM
#  aterm -e /$HOME/tools/fastcopy.sh %f %D

echo copying..
echo "            " $1
echo "          to" $2

dd if="$1" of="$2/$1" bs=5M

echo hit return..
read

# * only use for 1 file at a time *
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: May 08 2006,04:15 QUOTE

Do you have DMA turned on for the drives?

Either boot with

dsl dma

or type:

sudo su
hdparm -d1 /dev/hda
hdparm -d1 /dev/hdb

etc after bootup
Back to top
Profile PM 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 10 2006,19:41 QUOTE

yep, dma was confirmed in the boot msgs :D
but there seems to be a lot of thrashing going on.
these are two seperate disk drives.
Back to top
Profile PM 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: May 16 2006,12:25 QUOTE

Is a second write of the same file (made straight after the first) to the same disk much faster?

As you probably know, Linux tries to maximise its use of memory, partly by caching disk writes to memory, so subsequent disk writes of the same file should be fast.
Back to top
Profile PM 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 20 2006,18:39 QUOTE

2nd write is defintely faster. (but why would i do that?)
it's the 1st write i'm interested in, cos i have large files to get from
one disk to another. typically 300 to 700mb (and i only want to copy them once).

so anyway, i just loaded up a virgin copy of dsl2.4, nothing else added,
and here are the timings for 1st copies straight after each re-boot.

file 1 = 319100928 bytes
'cp'=30 secs    'dd'=15 secs    XP=8 secs

file 2 = 565446002 bytes
'cp'=85 secs    'dd'=35 secs    XP=15 secs

'dd' was using a 5Mb bucket size.
emelFM standard copy has the same time as a bash 'cp' command.
XP using the windows explorer.

i didn't really want to compare this with windoze, but i'm curious to what the trick is. windoze is nearer to the 40 mbyte/sec performance i expect between two seperate HDs, they both run at dma100 and was checked with hdparm (udma5).

obviously the cp performance on linux got worse for the larger file.
there was a lot of disk thrashing, maybe the caching? maybe too small a bucket? maybe some other background task?, though i made sure nothing else was going on.
Back to top
Profile PM 
7 replies since May 06 2006,03:32 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Faster Copy ?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code