Closed gamename closed 4 years ago
Hello Tennis,
Yes, this is expected as rsync will fork itself several processes. When you use "-n 8", you start 8 rsync master processes in parallel ; then rsync does what is has to do and may fork other children processes.
You can examine parent/children processes' relationship with tools such a pstree (on GNU/Linux) or ps' option "-d" on FreeBSD.
On my system (FreeBSD), it gives the following :
martymac 96211 0.0 0.0 11768 3100 5 S+ 12:03 0:00.00 | |-- /bin/sh /tmp/fpsync/work/1596708209-95820/1
martymac 96215 9.7 0.0 15876 4060 5 R+ 12:03 0:00.97 | | `-- /usr/local/bin/rsync -lptgoD -v --numeric-ids -r --files-from=/tmp/fpsync/parts/1596708209-95820/part.1 --from0 /usr/src// /var/tmp/src/
martymac 96220 0.1 0.0 13716 3208 5 S+ 12:03 0:00.00 | | `-- /usr/local/bin/rsync -lptgoD -v --numeric-ids -r --files-from=/tmp/fpsync/parts/1596708209-95820/part.1 --from0 /usr/src// /var/tmp/src/
martymac 96581 0.0 0.0 14236 3224 5 S+ 12:03 0:00.00 | | `-- /usr/local/bin/rsync -lptgoD -v --numeric-ids -r --files-from=/tmp/fpsync/parts/1596708209-95820/part.1 --from0 /usr/src// /var/tmp/src/
martymac 96481 0.0 0.0 11768 3100 5 S+ 12:03 0:00.00 | |-- /bin/sh /tmp/fpsync/work/1596708209-95820/2
martymac 96483 0.0 0.0 13540 3528 5 R+ 12:03 0:00.65 | | `-- /usr/local/bin/rsync -lptgoD -v --numeric-ids -r --files-from=/tmp/fpsync/parts/1596708209-95820/part.2 --from0 /usr/src// /var/tmp/src/
martymac 96484 0.0 0.0 12540 3136 5 S+ 12:03 0:00.00 | | `-- /usr/local/bin/rsync -lptgoD -v --numeric-ids -r --files-from=/tmp/fpsync/parts/1596708209-95820/part.2 --from0 /usr/src// /var/tmp/src/
and we can see that each master rsync has forked 1 or 2 children.
Best regards,
Ganael.
Perfect! Thank you, sir.
Hi Ganael,
I'm starting FPSync like this (notice I'm asking for 8 threads):
/bin/sh /usr/bin/fpsync -O -x .glusterfs -x .root -x .r00t -n 8 -vvv /images_ebs /images
But when I do
ps -ef | grep fpsync
, I see 24 rsync processes.Is this expected behavior? What does the
-n 8
really signify?Thanks, -Tennis