我正在Cassandra運行一個非常小的數據集,以便數據只能存在於memtable中。下面是我的配置:Cassandra - 如何禁用memtable刷新
在jvm.options:
-Xms4G
-Xmx4G
在cassandra.yaml,
memtable_cleanup_threshold: 0.50
memtable_allocation_type: heap_buffers
按在cassandra.yaml的文檔中,memtable_heap_space_in_mb和memtable_heap_space_in_mb將會設置堆大小的1/4,即1000MB
根據此處的文檔(http://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/configCassandra_yaml.html#configCassandra_yaml__memtable_cleanup_threshold),如果memtabl的總大小超出(1000 + 1000)* 0.50 = 1000MB,memtable刷新將觸發。
現在,如果我執行幾個寫入請求導致大約300MB的數據,memtable仍會刷新,因爲我看到sstables是在文件系統(Data.db等)上創建的,我不明白爲什麼。
任何人都可以解釋這種行爲,並指出如果我在這裏失去了一些東西?
你爲什麼不使用Redis? Redis是一個開源(BSD許可),內存數據結構存儲,用作數據庫,緩存和消息代理。 https://redis.io/ –