[ale] parallel processing

hirsch at zapmedia.com hirsch at zapmedia.com
Fri Jan 4 16:49:43 EST 2002


Benjamin Dixon writes:
 > 
 > I don't think this is what he means. He wants to run a single cp and have
 > the files copied in parallel instead of serially (copy file1, copy file2,
 > etc)... but then I wonder, if these are on the same disk, would "copying
 > them in parallel" offer any advantage? What I mean is, if you using one
 > disk, and you're copying x mb of data, aren't you copying said data no
 > matter what order you are copying it in? So I guess my question is, are we
 > using more than one disk here?

You are right that more than one disk is needed for their to be any
real advantage.

I don't think cp will do it, but you can instead use:
    tar -C dir1 cf - file1 file2 file3 | tar -C dir2 xf - 

That will run two processes, one for each tar.  I've used this trick
to copy large directory trees between drives.

--Michael

 > Ben
 > 
 > On Fri, 4 Jan 2002, jeff hubbs wrote:
 > 
 > > Andy -
 > > 
 > > You can execute each cp command with an ampersand ("&") at the end 
 > > (that's sometimes called "amping off") but unless the files/dirs are 
 > > really big, the cps will finish before you can type the next one - is 
 > > that what you're talking about?
 > > 
 > > - Jeff
 > > 
 > > Zyman, Andy wrote:
 > > 
 > > > Hello,
 > > > I just wonder :
 > > > Let's say in Oracle we have parallel SQL processing - I can specify that
 > > > certain SQL should be processed in parallel. 
 > > > What about Unix? Let's say I have  a directory on Sun server with 10 files.
 > > > I want to cp them to the diff. one. I'm doing cp xxx yyy. Now how it will
 > > > processed and who I can see that it will be done in parallel?
 > > > 
 > > > Thank You
 > > >  Andy
 > > > 
 > > > ---
 > > > This message has been sent through the ALE general discussion list.
 > > > See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
 > > > sent to listmaster at ale dot org.
 > > > 
 > > > 
 > > > 
 > > 
 > > 
 > > 
 > > 
 > > ---
 > > This message has been sent through the ALE general discussion list.
 > > See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
 > > sent to listmaster at ale dot org.
 > > 
 > 
 > Today's Random Quote--------------------------------------
 > 
 >  43rd Law of Computing: Anything that can go wr .signature:
 > Segmentation violation -- Core dumped
 > 
 > -----------------------------------------------------------
 > 
 > 
 > ---
 > This message has been sent through the ALE general discussion list.
 > See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
 > sent to listmaster at ale dot org.




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list