Cassandra配置cassanra.yaml详解

这篇博客,对Cassandra配置-cassandra.yaml的配置项进行重点解释。

OptionDefault Value
authenticatororg.apache.cassandra.auth.AllowAllAuthenticator
authorityorg.apache.cassandra.auth.AllowAllAuthority
broadcast_addresssame as listen_address
cluster_nameTest Cluster(这个名字修改了,cassandra-cli连接的时候,需要指定,默认就是连的这个。)
column_index_size_in_kb64
commitlog_directory/var/lib/cassandra/commitlog
commitlog_syncperiodic
commitlog_sync_period_in_ms10000 (ten seconds)
commitlog_total_space_in_mb4096
compaction_preheat_key_cacheTRUE
compaction_throughput_mb_per_sec16(默认16M,推荐是写入速度的16-32倍,考虑Compaction的速度,这个需要根据实际情况设定)
concurrent_compactorsOne per CPU core
concurrent_reads32
concurrent_writes32
data_file_directories/var/lib/cassandra/data(可以指定多个目录,会提高性能,但是会出现数据分步不均匀的情况)
dynamic_snitchTRUE
dynamic_snitch_badness_threshold0
dynamic_snitch_reset_interval_in_ms600000
dynamic_snitch_update_interval_in_ms100
endpoint_snitchorg.apache.cassandra.locator.SimpleSnitch
flush_largest_memtables_at0.75
hinted_handoff_enabledTRUE
hinted_handoff_throttle_delay_in_ms50
in_memory_compaction_limit_in_mb64
incremental_backupsFALSE
index_interval128(官方推荐128是最小的,可以更大。但实际中,如果内存比较大,可以适当减小,根据自己的需要设定,间隔小,就会快。)
initial_tokenn/a
internode_encryptionnone
keystoreconf/.keystore
keystore_passwordcassandra
listen_addresslocalhost
max_hint_window_in_ms3600000 (one hour)
memtable_flush_queue_size4
memtable_flush_writersOne per data directory
memtable_total_space_in_mb1/3 of the heap
multithreaded_compactionFALSE
partitionerorg.apache.cassandra.dht.RandomPartitioner
phi_convict_threshold8
reduce_cache_capacity_to0.6
reduce_cache_sizes_at0.85
request_schedulerorg.apache.cassandra.scheduler.NoScheduler
request_scheduler_idkeyspace
rpc_addresslocalhost
rpc_keepaliveTRUE
rpc_max_threadsUnlimited
rpc_min_threads16
rpc_port9160
rpc_recv_buff_size_in_bytesn/a
rpc_send_buff_size_in_bytesn/a
rpc_server_typesync
rpc_timeout_in_ms10000
saved_caches_directory/var/lib/cassandra/saved_caches
seeds127.0.0.1
seed_providerorg.apache.cassandra.locator.SimpleSeedProvider
sliced_buffer_size_in_kb64
snapshot_before_compactionFALSE
storage_port700
stream_throughput _outbound_megabits_per_sec400
thrift_framed_transport_size_in_mb15
thrift_max_message_length_in_mb16
truststoreconf/.truststore
truststore_passwordcassandra

上表中的配置项有一些,比较需要注意的,我就加了注释。后面会逐渐补充。  

转载于:https://www.cnblogs.com/sing1ee/archive/2012/05/17/2765041.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值