LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Rsync utilizing CPU to 100% ! (https://www.linuxquestions.org/questions/linux-server-73/rsync-utilizing-cpu-to-100-a-638377/)

dhanju 04-28-2008 07:40 AM

Rsync utilizing CPU to 100% !
 
Hi,

I am using Rsync cmd for copying files between sorce and target box daily. It have to check incremental chunks out of 20 GB and copy the changed chunks from source and paste it to target. It takes approx. 10 - 20 Mins. During this period CPU in source and target is reaching up to 100% utilization.
Kindly, suggest me how to control CPU utilization or what else can be done.

jbilla 04-28-2008 07:48 AM

Thats because while copying from rsync command it tries to retrieve the list of files that you are copying and because you have too many files so in memory its utilize too much ram as well as resources to copy them to new place.. You will have to distribute the task among small task..

You will have to divide your operation for rsync in bash script like this way..
Like for example this is your script
rsync /source root@1.1.1.1:/source_backup/

THEN
Create a bash script and apply it in this way

#!/bin/bash
rsync /source/[0-9]* root@1.1.1.1:/source_backup/
rsync /source/[a-h]* root@1.1.1.1:/source_backup/
rsync /source/[i-p]* root@1.1.1.1:/source_backup/
rsync /source/[q-z]* root@1.1.1.1:/source_backup/

tredegar 04-28-2008 11:00 AM

Or, man nice ;)

tajamari 04-30-2008 05:48 AM

Quote:

Originally Posted by dhanju (Post 3135462)
Hi,

I am using Rsync cmd for copying files between sorce and target box daily. It have to check incremental chunks out of 20 GB and copy the changed chunks from source and paste it to target. It takes approx. 10 - 20 Mins. During this period CPU in source and target is reaching up to 100% utilization.
Kindly, suggest me how to control CPU utilization or what else can be done.

that's the behavior of rsync. you can do chunk rsync to avoid such usage.

jbilla 04-30-2008 09:41 AM

Quote:

Originally Posted by tajamari (Post 3137592)
that's the behavior of rsync. you can do chunk rsync to avoid such usage.

What you mean by "chunk rsync" here? Could you please elaborate?


All times are GMT -5. The time now is 07:38 AM.