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

Switch digests to use snappy compression #10215

Merged
merged 1 commit into from
Aug 23, 2018
Merged

Switch digests to use snappy compression #10215

merged 1 commit into from
Aug 23, 2018

Conversation

dgnorton
Copy link
Contributor

@dgnorton dgnorton commented Aug 21, 2018

Some enterprise users with larger shards were seeing significant increases in CPU usage caused by reading shard digests. Profiling showed most of the time was spent decompressing the digest data. This PR improves performance of the shard digest writer and reader by switching from gzip to snappy compression, which is faster.

Local test with 13.2 GB shard (3.9 M series & 5.2 M time ranges):

gzip:   read in 4.5 seconds (80.7 MB digest)
snappy: read in 2.4 seconds (101.9 MB digest)

@ghost ghost assigned dgnorton Aug 21, 2018
@ghost ghost added the review label Aug 21, 2018
Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a comment and a suggestion:

  1. How will this handle existing digests in the wild that are gzipped? What's the upgrade path from an existing gzipped digest to a snappy one?

  2. Can you provide a PR description containing the problem, why the PR helps solve it, and any performance data you have, even if it "this is x times faster locally".

@dgnorton
Copy link
Contributor Author

@e-dard

  1. When it attempts to check the digest to see if it’s fresh, it first tries to read the manifest. That read will fail. Any failure while checking if its fresh is treated as stale and the digest is regenerated.

  2. Will do

Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dgnorton dgnorton merged commit 05d979d into master Aug 23, 2018
@ghost ghost removed the review label Aug 23, 2018
@dgnorton dgnorton deleted the dn-snappy-digests branch August 23, 2018 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants