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

db.Table flusherLock write lock fairness policy is sub-optimal

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.7.1
    • None
    • None

    Description

      scenario:

      1) high write throughput cluster
      2) external services adding material cpu contention

      symptoms:

      The row mutation stage falls very behind.

      cause:

      ReentrantReadWriteLock's fair policy causes write lock acquisition / release to require a material amount of CPU time.

      summary:

      When there are other services contending for the CPU, the RRW lock's fair policy causes write lock acquisition / release to take enough time to eventually put threads waiting for read lock acquisition very behind. We repro'd this scenario by reducing the scope of the write lock to: 1 boolean check, 1 boolean assignment, and 1 db.Memtable instantiation (itself, just: 2 variable assignments) w/ the same performance. Modifying the fairness policy to be the default policy allowed the row mutation stage to keep up.

      Attachments

        1. CASSANDRA-1930.0001.patch
          0.8 kB
          Kelvin Kakugawa

        Issue Links

          Activity

            People

              kelvin Kelvin Kakugawa
              kelvin Kelvin Kakugawa
              Kelvin Kakugawa
              Jonathan Ellis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: