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

Using Batch commitlog_sync is slow and doesn't actually batch writes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 beta2
    • None
    • None

    Description

      The assumption behind batch commit mode is that the client does it's own batching and wants to wait until the write is durable before returning. The problem is that the queue that cassandra uses under the covers only allows for a single ROW (RowMutation) per thread (concurrent_writes). This means that commitlog_sync_batch_window_in_ms should really be called sleep_between each_concurrent_writes_rows_in_ms.

      I assume the reason this slipped by for so long is that no one uses batch mode, probably because people say "it's slow". We need durability so this isn't an option.

      However it doesn't need to be this slow.

      Also, if you write a row that is larger than the commit log size it silently (warn) fails to put it in the commit log. This is not ideal for batch mode.

      Attachments

        1. 6764.fix2.txt
          3 kB
          Benedict Elliott Smith
        2. 6764.fix.txt
          2 kB
          Benedict Elliott Smith
        3. cassandra_6764_v3.patch
          1 kB
          John Carrino
        4. cassandra_6764_v2.patch
          32 kB
          John Carrino

        Activity

          People

            johnyoh John Carrino
            johnyoh John Carrino
            John Carrino
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: