Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected Behavior? #25

Closed
gamename opened this issue Aug 5, 2020 · 2 comments
Closed

Expected Behavior? #25

gamename opened this issue Aug 5, 2020 · 2 comments

Comments

@gamename
Copy link

gamename commented Aug 5, 2020

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

@martymac
Copy link
Owner

martymac commented Aug 6, 2020

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.

@gamename
Copy link
Author

gamename commented Aug 6, 2020

Perfect! Thank you, sir.

@gamename gamename closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants