Rsync quite slow (using very little cpu): how to improve its speed?


 
Thread Tools Search this Thread
Operating Systems Solaris Rsync quite slow (using very little cpu): how to improve its speed?
# 1  
Old 06-02-2018
Rsync quite slow (using very little cpu): how to improve its speed?

I have "inherited" a OmniOS (illumos based) server.

I noticed rsync is significantly slower in respect to my reference, FreeBSD 12-CURRENT, running on exactly same hardware.

Using same hardware, same command with same source and target disks, OmniOS r151026 gives:

Code:
test@omniosce:~# time rsync -aPt /zarc/images /home/test/
real    17m25.428s
user    28m33.792s
sys     2m46.217s


In FreeBSD 12-CURRENT:
Code:
 test@freebsd:~ % time rsync -aPt /zarc/images /home/test/

374.651u 464.028s 11:30.63 121.4%    567+210k 791583+780083io 2pf+0w

- I noticed that, under FreeBSD, rsync was running as 3 processes, all with nice=0, two of them consistently using 50% to 70% CPU time.

- On OmniOS rsync was also running as 3 processes, also with nice=0, but each one never more than 3%.


Probably different CPU usage is the reason execution time on same hardware is so different on FreeBSD and illumos?


I tried to renice the rsync process, to -20, with similar results.


I am also aware of priocntl and scheduling classes, but I was unable to change the speed.

How can I improve `rsync` execution time?

Thank you in advance.

Last edited by priyadarshan; 06-02-2018 at 11:22 AM..
# 2  
Old 06-03-2018
Is this a local or remote rsync? Does this involve a network protocol? Or are you rsync'ing between local disks?

If it is remote, then poor performance can be caused by the operating system delaying ACK's (in trying to aggregate them into one packet). AIX and Solaris in particular try to do this.
This User Gave Thanks to hicksd8 For This Post:
# 3  
Old 06-03-2018
Thank you very much for your thoughts on this issue. The rsync is between two local disks, source is a 8-disk vdev, target an ssd. No network involved.


I am travelling and will be able to connect to server on Tuesday, but I will test using only 1 file, source and target on same local disk, to eliminate as many factors as possible.
# 4  
Old 06-04-2018
That rsync is slow while using very little CPU points to an I/O bottleneck. They're spending most of their time waiting for disk. Maybe your system ended up using a fallback driver of some sort.
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 06-04-2018
I think rsync uses 3 processes, and the hand-shakes between them might not be optimal in a Solaris-based OS.
The Internet suggests to use -W option to reduce hand-shakes. Also an upgrade to rsync > 3.0 might help.
This User Gave Thanks to MadeInGermany For This Post:
# 6  
Old 06-05-2018
Thanks to the advice received here, I was able to refine testing, and believe now it could be an issue with OmniOS rsync in core. I have opened a ticket on github.com (omniosorg/omnios-build/issues/820). I will report back here.
# 7  
Old 06-05-2018
Are you running with a ZFS filesystem which is over 80% full? That can cause a real "go slow".
This User Gave Thanks to hicksd8 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Improve script - slow process with big files

Gents, Please can u help me to improve this script to be more faster, it works perfectly but for big files take a lot time to end the job.. I see the problem is in the step (while) and in this part the script takes a lot time.. Please if you can find a best way to do will be great. ... (13 Replies)
Discussion started by: jiam912
13 Replies

2. Shell Programming and Scripting

Slow Perl script: how to speed up?

I had written a perl script to compare two files: new and master and get the output of the first file i.e. the first file: words that are not in the master file STRUCTURE OF THE TWO FILES The first file is a series of names ramesh sushil jonga sudesh lugdi whereas the second file (could be... (4 Replies)
Discussion started by: gimley
4 Replies

3. Red Hat

RHEL 5.6 Slow rsync to NFS array

Hi All, I have RHEL 5.6 with a 70GB local directory of Web content. Images, PHP scripts etc. I need to copy all this content to an NFS array thats mounted on the RHEL server. I did a baseline cp to copy the content one week ago. Since my baseline copy the local directory has grown by 8GB.... (2 Replies)
Discussion started by: general_lee
2 Replies

4. Shell Programming and Scripting

Help to improve speed of text processing script

Hey together, You should know, that I'am relatively new to shell scripting, so my solution is probably a little awkward. Here is the script: #!/bin/bash live_dir=/var/lib/pokerhands/live for limit in `find $live_dir/ -type d | sed -e s#$live_dir/##`; do cat $live_dir/$limit/*... (19 Replies)
Discussion started by: lorus
19 Replies

5. UNIX for Advanced & Expert Users

speed test +20,000 file existance checks too slow

Need to make a very fast file existence checker. Passing in 20-50K num of files In the code below ${file} is a file with a listing of +20,000 files. test_speed is the script. I am commenting out the results of <time test_speed try>. The normal "test -f" is much much too slow when a system... (2 Replies)
Discussion started by: nullwhat
2 Replies

6. Shell Programming and Scripting

egrep is very slow : How to improve performance

We have an egrep search in a while loop. egrep -w "$key" ${PICKUP_DIR}/new_update >> ${PICKUP_DIR}/update_record_new ${PICKUP_DIR}/new_update is 210 MB file In each iteration, the egrep on an average takes around 50-60 seconds to search. Ther'es nothing significant in the loop other... (7 Replies)
Discussion started by: hidnana
7 Replies

7. HP-UX

How to find CPU Speed of HP UX

Need to find the CPU speed of HP UX for a non root login. echo "itick_per_usec/D" | adb /stand/vmunix /dev/mem | tail -1 will give the following for non root users ERROR: cannot open `/dev/mem', errno = 13, Permission denied (2 Replies)
Discussion started by: surajb
2 Replies

8. AIX

cpu speed

how do i determine the speed of a cpu on AIX 4.3.3 or 5.1? (5 Replies)
Discussion started by: csaunders
5 Replies

9. UNIX for Advanced & Expert Users

network speed is slow

Hello, everyone: i encounter a problem these days , pls help me ,thanks in advance. my env: machine: ES40 A ES40 B os: true64 Unix 4.0f note: src.tar 8M network card speed 100M my problem: ... (3 Replies)
Discussion started by: q30
3 Replies
Login or Register to Ask a Question