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

zsyncmake2 is really slow (compared to zsyncmake) on a large file #69

Open
vebjornjr opened this issue Mar 8, 2023 · 2 comments
Open

Comments

@vebjornjr
Copy link

Hello.

Thank you for this rewrite of zsync.

I have a large file of size 1.2GB which zsyncmake2 performs much worse than original zsyncmake on. Is this expected?

$ time zsyncmake2 FILE.tar
zsync2 version 2.0.0-alpha-1 (commit ), build <local dev build> built on 2023-03-08 11:03:16 UTC
No URL given, so I am including a relative URL in the .zsync file - you must keep the file being served and the .zsync in the same public directory. Use -u eikefet.tar to get this same result without this warning.
Warning: the given URL is relative. Please make sure the files are placed correctly on the server, otherwise zsync2 won't be able to resolve the path to the target file, requiring the user to specify this URL on the command line (using the -u flag).

real    2m56.362s
user    2m53.642s
sys     0m0.933s
$ time zsyncmake FILE.tar
No URL given, so I am including a relative URL in the .zsync file - you must keep the file being served and the .zsync in the same public directory. Use -u eikefet.tar to get this same result without this warning.

real    0m7,553s
user    0m6,375s
sys     0m1,151s

However, zsync2 is faster when redownloading the file.

$ time zsync2 URL/FILE.tar.zsync
zsync2 version 2.0.0-alpha-1 (commit ), build <local dev build> built on 2023-03-08 11:03:16 UTC
Checking for changes...
Using CA bundle found on system: /etc/ssl/certs/ca-certificates.crt
No changes detected, file is up to date.

real    0m4.886s
user    0m3.283s
sys     0m1.408s
$ time zsync URL/FILE.tar.zsync
Target FILE.tar
reading seed file FILE.tar: *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************Read FILE.tar. Target 100.0% complete.      *************************************************************************************************************
verifying download...checksum matches OK
used 1261629440 local, fetched 0

real    0m24.847s
user    0m7.243s
sys     0m6.691s
@TheAssassin
Copy link
Member

zsyncmake2 wasn't really developed with performance in mind. It does consume an entire CPU despite being relatively slow. I'm sure it could be improved further.

@TheAssassin
Copy link
Member

I just saw a slowdown by a factor of 100. That's clearly not normal and not intentional.

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