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

mb makehashes crash (because of zsync feature?) #22

Closed
lrupp opened this issue Apr 29, 2020 · 5 comments · Fixed by #46
Closed

mb makehashes crash (because of zsync feature?) #22

lrupp opened this issue Apr 29, 2020 · 5 comments · Fixed by #46
Labels
copy An issue copied from another Repository (poeml/mirrorbrain) Prio2 We want this, but it's not totally clear or extremely important.

Comments

@lrupp
Copy link
Member

lrupp commented Apr 29, 2020

From poeml#176

Activating zsync in the Mirrorbrain configuration and run the following to get the zsync "file" done:
mb makehashes /var/www/download.kiwix.org/ -v --force -t /usr/share/mirrorbrain
crashes.

Moving the chunk size to 4MB works partly, but mb makehashes still crashes with a file of 200GB.

@lrupp lrupp added Prio2 We want this, but it's not totally clear or extremely important. copy An issue copied from another Repository (poeml/mirrorbrain) labels Apr 29, 2020
@andrii-suse
Copy link
Collaborator

The error looks like pure memory allocation problem: I experimented with 100G file : the zsums column needs to store 236M - it is passed to postgres as hex, so around 500M.
With 200G file it will try to pass ~1G hex string, so can definitely meet the error from the ticket.

Proper solution may be trying to update zsums in batches instead of one go and probably pass binary data directly to postgres instead of hex. Using much bigger block size is an option as well - current 4K is way too small for 200G files.

@darix
Copy link
Member

darix commented Jun 3, 2020

maybe we should just introduce a size limit for such things.

@mlschroe
Copy link
Member

mlschroe commented Jun 8, 2020

I hope that you're aware that libzypp does not use the zsync column? Why would you want to enable it for opensuse?

@andrii-suse
Copy link
Collaborator

Why would you want to enable it for opensuse?

I don't. opensuse branch is where all changes go in at the moment

@darix
Copy link
Member

darix commented Jun 8, 2020

master branch stays in the state of peter's original code.

@darix darix closed this as completed in #46 Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copy An issue copied from another Repository (poeml/mirrorbrain) Prio2 We want this, but it's not totally clear or extremely important.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants