Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4315

Use EntryWeigher instead of Weigher to Measuring the cache.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 1.2.0 beta 1
    • Component/s: None
    • Labels:
      None

      Description

      This ticket is a followup for CASSANDRA-4150.

      CLHM 1.3 added EntryWeigher which will help us accurately measure the size of the

      It might be useful to add Key capacity (In-Heap Overhead) vs off-heap capacity for serializing cache (To avoid OOM's for a long Row Keys).

        Activity

        Hide
        vijay2win@yahoo.com Vijay added a comment - - edited

        We also might want to use MemoryMeter for KeyCache.put() too, with Promoted index in 1.2... KeyCache no longer honers AVERAGE_KEY_CACHE_ROW_SIZE of 48 bytes.

        Show
        vijay2win@yahoo.com Vijay added a comment - - edited We also might want to use MemoryMeter for KeyCache.put() too, with Promoted index in 1.2... KeyCache no longer honers AVERAGE_KEY_CACHE_ROW_SIZE of 48 bytes.
        Hide
        jbellis Jonathan Ellis added a comment -

        LGTM, +1.

        Nit: looks like ConcurrentLinkedHashCache constructor was made public unnecessarily
        Nit 2: would like to log a warning if MM is unavailable

        Show
        jbellis Jonathan Ellis added a comment - LGTM, +1. Nit: looks like ConcurrentLinkedHashCache constructor was made public unnecessarily Nit 2: would like to log a warning if MM is unavailable
        Hide
        vijay2win@yahoo.com Vijay added a comment -

        Committed with the nit. Thanks!

        Show
        vijay2win@yahoo.com Vijay added a comment - Committed with the nit. Thanks!

          People

          • Assignee:
            vijay2win@yahoo.com Vijay
            Reporter:
            vijay2win@yahoo.com Vijay
            Reviewer:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development