Cassandra Configrure
refer the comment in the configure
Minimal properties
cluster_name
should be setlisten_address
should be local ip, but notlocalhost
commitlog_directory
(default: /var/lib/cassandra/commitlog) commit logdata_file_directories
(default: /var/lib/cassandra/data) SSTablesaved_caches_directory
(default: /var/lib/cassandra/saved_caches) where table key and row caches are stored
Commonly used properties
endpoint_snitch
: shall be GossipingPropertyFileSnitchseed_provider
-seeds
不同的rack需要有一个seed. check hereconcurrent_reads
: 16 * number_of_drivesconcurrent_writes
: 8 * number_of_cpu_cores
Performance tuning properties
commitlog_sync
: periodic(default) or batchconcurrent_compactors
: per CPU corecommitlog_total_space_in_mb
: tune carefully and in small incrementsin_memory_compaction_limit_in_mb
: 5% to 10% of the available Java heap size.trickle_fsync
: true(if SSD)
Monitoring a Cassandra cluster
#####Tips for efficient cache use
- Store lower-demand data or data with extremely long rows in a table with minimal or no caching.
- Deploy a large number of Cassandra nodes under a relatively light load per node.
- Logically separate heavily-read data into discrete tables.