LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   very big problem with command cpio (http://www.linuxquestions.org/questions/linux-newbie-8/very-big-problem-with-command-cpio-4175440457/)

micronemo 12-07-2012 10:37 AM

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

tronayne 12-07-2012 12:29 PM

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.

micronemo 12-08-2012 06:15 AM

i test your command but the bandwidth usage is to same value
do you have any other idea ?
thanks very very much

tronayne 12-08-2012 08:21 AM

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.

micronemo 12-08-2012 09:50 AM

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

tronayne 12-08-2012 02:48 PM

You may want to click on the Report button and request that this topic be moved to Networking; you might get more expertise there.

micronemo 12-09-2012 01:47 PM

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

micronemo 12-13-2012 09:35 AM

anyone can help me??

thanks very very much


All times are GMT -5. The time now is 11:51 AM.