title: Cassandra taking too much memory for the data being written
body: <p>We are using Apache Cassandra 3.0.7 version and off late we see that 90% of memory is occupied on almost all nodes, even though disk is hardly used. We have a cluster of 5 nodes with 15 GB memory, 4 cores, 200 GB SSD each. </p>
  
  <p>We tried all kind of configurations through both YAML as well as table level properties but none seem to help. Memory usage constantly increases almost in direct proportion to data.</p>
  
  <p>Considering the fact that our application is a write-intensive one, we are okay with reduced read performance but would like to utilize as less memory as possible. To do this, our idea was to disable all caches possible or avoid keeping anything not-necessary in memory. But nothing so far seem to help.</p>
  
  <p>​Here's our yaml: <a href="http://pastebin.com/yeRGcHRt" rel="nofollow">http://pastebin.com/yeRGcHRt</a></p>
  
  <p>and here's our table configuration:</p>
  
  <blockquote>
    <p>CREATE KEYSPACE if not exists test_ks WITH replication = {'class':
    'SimpleStrategy', 'replication_factor': '1'}; CREATE TABLE if not
    exists test_ks.test_cf (id bigint PRIMARY KEY,key_str text,value1
    int,value2 int,update_ts bigint) WITH bloom_filter_fp_chance = 1 AND
    comment = '' AND compaction = {'class':
    'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
    'max_threshold': '32', 'min_threshold': '4'} AND compression =
    {'chunk_length_in_kb': '64', 'class':
    'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance
    = 1.0 AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 10240 AND
    memtable_flush_period_in_ms = 3600000 AND min_index_interval = 10240
    AND read_repair_chance = 0.0 AND speculative_retry = '99PERCENTILE'
    AND caching = {'keys': 'NONE', 'rows_per_partition': 'NONE'};</p>
  </blockquote>
  
  <p>We have seen that most of the consumption is on off-heap, heap memory is capped at 4.5 G. So out of total 14 G on a node, only 4.5G is consumed by heap. </p>
  
  <p>Has anyone tried such configuration before? Please let us know if disabling cache would help us in this situation. And if yes, how we can we disable cache completely. Looking forward to your help.</p>