You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sergey Lapukhov (JIRA)" <ji...@apache.org> on 2017/11/23 16:53:00 UTC

[jira] [Created] (CASSANDRA-14069) Node stopped serving write requests when a table has a lot of sstables

Sergey Lapukhov created CASSANDRA-14069:
-------------------------------------------

             Summary: Node stopped serving write requests when a table has a lot of sstables
                 Key: CASSANDRA-14069
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14069
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Sergey Lapukhov
         Attachments: create.cql, stack.txt

Cluster was flooded with SSTables. A table had ~20000 sstables. Write requests started failing. 

Steps to reproduce:
* Create cluster with 3 nodes
* Specify 
  {{memtable_heap_space_in_mb: 10}}
 in cassandra.yaml
* Create table standard1 in keyspace1 (for the cassandra-stress tool) with the script [^create.cql]. Please note
{{ compaction = {'class': 'SizeTieredCompactionStrategy', 'enabled': 'false'} }}
- i.e. node will not perform compaction.
*  Populate node with data:
  {{cassandra-stress write n=1000000000 -node 127.0.0.1}}
* After node was populated, put both read and write pressure on it:
  {{cassandra-stress read n=1000000000 -node 127.0.0.1
   cassandra-stress write n=1000000000 -node 127.0.0.1}}
* While still under pressure, enable LeveledCompactionStrategy
  {{echo "ALTER TABLE keyspace1.standard1 WITH compaction = { 'class' : 'LeveledCompactionStrategy', 'sstable_size_in_mb' : 1 }; DESC keyspace1.standard1; exit" | bin/cqlsh;}}

*Results:*
Write requests failing, read requests still processed.
'bin/nodetool cfstats' and 'bin/nodetool compactionstats' commands hanging, if issued from the node running cassandra-stress tool.

If issued from another node:
{{$ bin/nodetool cfstats

...
Table: standard1
                SSTable count: 22637
                SSTables in each level: [22651/4, 0, 0, 0, 0, 0, 0, 0, 0] 
...}}

{{$ bin/nodetool compactionstats

pending tasks: 12656
                                     id   compaction type    keyspace       table   completed       total    unit   progress
   935bbc00-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    59556014    59557860   bytes    100.00%
   a29ee660-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    80432114   742151655   bytes     10.84%
   9766e400-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    58891604    58893215   bytes    100.00%
   9cdc9880-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    20289449    20290800   bytes     99.99%
   90f98910-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    59689824    59695545   bytes     99.99%
   986ede20-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    40598594    40598820   bytes    100.00%
   9cd322a0-d03b-11e7-a47d-2b44293495b8        Compaction   keyspace1   standard1    60756739    60766660   bytes     99.98% 
}}

Special note about 'bin/nodetool compactionstats' - picture above is quite typical for this issue. I.e. compaction tasks manage to make it through, but hinder near the full completion (around 99.9 %).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org