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

Fix RAM usage estimation of LiveVersionMap. #20123

Merged

Commits on Aug 24, 2016

  1. Fix RAM usage estimation of LiveVersionMap. elastic#20123

    I was writing tests for RAM usage estimation of LiveVersionMap and found a
    couple issues:
     - The BytesRef objects used as uids were oversized since they were created
       via `new BytesRef(CharSequence)` which creates a `byte[]` whose size is 3x
       the length of the provided char sequence. Given that our uids are most of
       times ASCII sequences, this is a waste of memory.
     - `VersionValue` was using `translogLocation.size` instead of
       `translogLocation.ramBytesUsed()` for RAM estimation, which is completely
       unrelated to the memory footprint of the `Translog.Location` object.
    
    In particular, the latter issue could cause RAM usage estimation to be
    significantly overestimated, especially on large documents.
    
    I also added tests for ram accounting.
    jpountz committed Aug 24, 2016
    Configuration menu
    Copy the full SHA
    5d6c9b0 View commit details
    Browse the repository at this point in the history