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

lz4 compression while building totals is resource intensive #18

Closed
ChALkeR opened this issue Jul 24, 2018 · 3 comments
Closed

lz4 compression while building totals is resource intensive #18

ChALkeR opened this issue Jul 24, 2018 · 3 comments
Labels

Comments

@ChALkeR
Copy link
Member

ChALkeR commented Jul 24, 2018

This needs investigation, but something looks wrong with lz4-compressed streams while gzemnid extract totals is running — the app consumes all the available memory and crashes.

Disabling the compression in config.local.json and compressing those files manually with command-line stand-alone lz4 works and can be used as a work-around.

@ChALkeR ChALkeR added the bug label Jul 24, 2018
@ChALkeR
Copy link
Member Author

ChALkeR commented Jul 25, 2018

Also, there seems to be problems with Node.js 10.x compat for lz4 module: pierrec/node-lz4#62.
I observed those errors being hit from Gzemnid.

ChALkeR added a commit that referenced this issue Jul 25, 2018
@ChALkeR
Copy link
Member Author

ChALkeR commented Jul 25, 2018

Seems to be a problem on node-lz4 side?

This does not cause high memory load:

const outstream = fs.createWriteStream(`${file}.gz`);
const passThrough = new stream.PassThrough();
const gzip = zlib.createGzip({ level: 1 });
passThrough.pipe(gzip).pipe(outstream);
return passThrough;

This causes high memory load:

const outstream = fs.createWriteStream(`${file}.lz4`);
const encoder = lz4.createEncoderStream({ highCompression: false });
encoder.pipe(outstream);
return encoder;

lz4 is significantly faster than gzip though.

@ChALkeR
Copy link
Member Author

ChALkeR commented Jul 26, 2018

Blocked against nodejs/node#21967.

@ChALkeR ChALkeR closed this as completed in ca9ad2e Aug 1, 2018
ChALkeR added a commit that referenced this issue Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant