LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2012, 10:37 AM   #1
micronemo
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Rep: Reputation: Disabled
very big problem with command cpio


hello,
i have a big problem with cpio command.
if i copy files with command cpio with this command:

/bin/find /usr/local/share/WINMAC/ -type f -atime 0 | cpio -pamvd /mnt/NAS/15

this command use only 1,4 Mb/s of the bandwidth of my gigaethernet of my server it is very very slow.

anyone can help me?

thanks very very much
 
Old 12-07-2012, 12:29 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
The "very slow" is because the default block size is pretty small (the default is usually 512 bytes). You can increase this in multiples of 512 for better throughput.

You can use, for example, an additional argument to cpio, --block-size=4096, and see what that does, if it helps, great, or double it to --block-size=8192. You can increase the size of block-size using either blocks or bytes; e.g., 10MB, and you'll get increased speed. Just be careful to not go "too big" (there is a point of decreasing returns). 10MB - 20MB is probably useable for acceptable speed. Note that some versions of cpi will accept "-bs=20MB" and some won't.

Hope this helps some.

Last edited by tronayne; 12-07-2012 at 12:35 PM. Reason: Forgot default block size
 
1 members found this post helpful.
Old 12-08-2012, 06:15 AM   #3
micronemo
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
i test your command but the bandwidth usage is to same value
do you have any other idea ?
thanks very very much
 
Old 12-08-2012, 08:21 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
I note that you're using copy-pass mode, where cpio copies files from one directory tree to another without actually using an archive. Too, because you're talking about Ethernet, I suspect you're copying to a network file system (rather than a physical drive on the same platform)?

Many people report slow throughput to NAS (I suspect that /mnt/NAS/15 is a NAS file system). I'm no expert but some reading of descriptions of similar speed problems (there are a lot of discussions about NAS speed problems) get to turning off HTTPS on the LAN, one in particular at http://arstechnica.com/civis/viewtop...ef28#p22044068 might be interesting to you. It's part of a long discussion of similar problems with speed to yours (read above and below the posts).

You may want to search through the Linux Networking forum here at LQ plus take a look at results from Google searching for "copy to nas slow" for more information. I don't the expertise to help, sorry.

Hope this helps some.

Last edited by tronayne; 12-08-2012 at 08:30 AM.
 
Old 12-08-2012, 09:50 AM   #5
micronemo
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
yes i connect a ibm server with centos 6.3 with a netgear readynas 2100 with a cross cable. the link has a bandwidth of 1 gbps but the bandwidth in copy process is only 10 Mbps. on this link there isn't another traffic only traffic from cpio command
 
Old 12-08-2012, 02:48 PM   #6
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
You may want to click on the Report button and request that this topic be moved to Networking; you might get more expertise there.
 
Old 12-09-2012, 01:47 PM   #7
micronemo
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
hello,
i test all options and i search on internet any solution, but don't work nothing.
i am not expert of linux, someone can help me?
thanks very very much
 
Old 12-13-2012, 09:35 AM   #8
micronemo
LQ Newbie
 
Registered: Aug 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
anyone can help me??

thanks very very much
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpio -idcmv command hanged while extracting .cpio command ravindra.atre Linux - General 2 08-22-2011 04:10 AM
[SOLVED] cpio command in ubuntu keimasi Ubuntu 2 02-15-2011 01:14 AM
LXer: CPIO command to backup and restore in Linux LXer Syndicated Linux News 0 08-17-2009 07:20 AM
LXer: Backing Up and Restoring Using the cpio Command in Linux and Unix LXer Syndicated Linux News 0 05-26-2006 01:33 PM
wrong command, big PROBLEM oru Linux - Software 9 09-20-2005 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration