question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Performance] will a decompressed bytebuffer cache help?

See original GitHub issue

The flame-graph sampled from our production cluster shows that a large portion of CPU time has spent on LZ4Decompression (probably 60%+ of all querying related methods), as shown in the following picture.

image

I wonder would a (probably on disk) LRUCache on de-compressed data help?

It seems it would not be hard to implement. A, say, BufferedGenericIndexd can be created with a generated UUID, and then we can use <uuid>-bufferNumber as the cache key.

But I’m not sure about the effectiveness. It does introduce extra cost of cache miss penalty, random disk IO, etc.

That’s why I would like to raise a discussion here and find out is it a feasible solution.

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
drcrallencommented, Jun 18, 2019

An alternative to this would be to just leave the data uncompressed (which is supported at indexing time currently), then let the kernel manage the page cache on its own. That way we wouldn’t need to do special buffer handling.

0reactions
litao91commented, Jun 25, 2019

Thanks guys. It seems I need more investigation and evidence before dive into implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Performance] will a decompressed bytebuffer cache help?
It seems it would not be hard to implement. A, say, BufferedGenericIndexd can be created with a generated UUID, and then we can...
Read more >
Case Study: Double performance in under 30 minutes
XPressStream – Reads a compressed byte stream and decompresses it on the fly using the XPress decompression algorithm. The general algorithm is ...
Read more >
Java ByteBuffer performance issue - Stack Overflow
While processing multiple gigabyte files I noticed something odd: it seems that reading from a file using a filechannel into a re-used  ......
Read more >
DynamoDB Best Practices - Packt Hub
We are going to talk about DynamoDB implementation best practices, which will help you improve the performance while reducing the operation ...
Read more >
Understanding Apache Cassandra Memory Usage - Instaclustr
When this is full, Cassandra will allocate a ByteBuffer outside the cache, which can be a degradation of performance (since it has to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found