Cassandra
  1. Cassandra
  2. CASSANDRA-3376

Track buffer cache hit rate with mincore

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      We could use mincore on, say, 1% of reads to be able to report actual buffer cache hit rate. This would be useful when troubleshooting slow reads, e.g., are reads to CF X slow because it's hitting disk, or because there are a lot of tombstones in the row?

        Activity

        Hide
        Jonathan Ellis added a comment -

        Bah, further investigation shows that fincore http://lwn.net/Articles/371538/ was never merged to Linux mainline, and it's not worth supporting this for only mmapped i/o.

        Show
        Jonathan Ellis added a comment - Bah, further investigation shows that fincore http://lwn.net/Articles/371538/ was never merged to Linux mainline, and it's not worth supporting this for only mmapped i/o.
        Hide
        Jonathan Ellis added a comment -

        we don't know how much of an sstable we'll need to read for a given slice ahead of time

        Thinking about it more, just checking the position where we start the slice would probably be Good Enough (certainly better than nothing).

        Show
        Jonathan Ellis added a comment - we don't know how much of an sstable we'll need to read for a given slice ahead of time Thinking about it more, just checking the position where we start the slice would probably be Good Enough (certainly better than nothing).
        Hide
        Jonathan Ellis added a comment -

        Two thoughts:

        1. The right way to do this now is probably to integrate with tracing – if tracing is enabled, do the mincore check and trace the results; if not, don't bother
        2. Actually implementing this would be a PITA because of our "everything is an iterator" read path – we don't know how much of an sstable we'll need to read for a given slice ahead of time
        Show
        Jonathan Ellis added a comment - Two thoughts: The right way to do this now is probably to integrate with tracing – if tracing is enabled, do the mincore check and trace the results; if not, don't bother Actually implementing this would be a PITA because of our "everything is an iterator" read path – we don't know how much of an sstable we'll need to read for a given slice ahead of time
        Hide
        Jonathan Ellis added a comment -

        Note that we already did a JNA mincore wrapper for CASSANDRA-1902 (which did not end up getting committed, but the patches are still there).

        Show
        Jonathan Ellis added a comment - Note that we already did a JNA mincore wrapper for CASSANDRA-1902 (which did not end up getting committed, but the patches are still there).

          People

          • Assignee:
            Unassigned
            Reporter:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development