2014-06-09 36 views
0

我是Cassandra的新手,希望能从之前遇到过的人那里获得帮助。Cassandra集群吞吐量扼杀

目前,我有应用服务器和Cassandra集群驻留在东部和西部的亚马逊ec2地区。我在下面得到了这样一个奇怪的性能测试结果,这意味着当应用服务器和C *集群处于相同区域(我相信它们使用内部IP)时,吞吐量会受到限制;而当应用服务器和C *集群跨区域时,吞吐量是可扩展的。

West C *和East C *具有完全相同的硬件和架构。 2个应用服务器也是一样的。

west app sever -> west C* cluster  throttled 
west app sever -> east C* cluster  scalable 
east app sever -> east C* cluster  throttled 
east app sever -> west C* cluster  scalable 

cassandra.yaml。

cluster_name: 'STEAST' 
initial_token: -9223372036854775808 
hinted_handoff_enabled: true 
max_hint_window_in_ms: 10800000 # 3 hours 
hinted_handoff_throttle_in_kb: 1024 
max_hints_delivery_threads: 2 
batchlog_replay_throttle_in_kb: 1024 
authenticator: AllowAllAuthenticator 
authorizer: AllowAllAuthorizer 
permissions_validity_in_ms: 2000 
partitioner: org.apache.cassandra.dht.Murmur3Partitioner 
data_file_directories: 
    - /raid0/cassandra/data 

commitlog_directory: /raid0/cassandra/commitlog 
disk_failure_policy: stop 
commit_failure_policy: stop 
key_cache_size_in_mb: 
key_cache_save_period: 14400 
row_cache_size_in_mb: 0 
row_cache_save_period: 0 
saved_caches_directory: /raid0/cassandra/saved_caches 
commitlog_sync: periodic 
commitlog_sync_period_in_ms: 10000 
commitlog_segment_size_in_mb: 32 

seed_provider: 
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider 
     parameters: 
      - seeds: "10.239.xxx.xxx" 

concurrent_reads: 32 
concurrent_writes: 32 
memtable_flush_queue_size: 4 
trickle_fsync: false 
trickle_fsync_interval_in_kb: 10240 
storage_port: 7000 
ssl_storage_port: 7001 
listen_address: 10.239.xxx.xxx 
start_native_transport: true 
native_transport_port: 9042 
start_rpc: true 
rpc_address: 0.0.0.0 
rpc_port: 9160 
rpc_keepalive: true 
rpc_server_type: sync 
thrift_framed_transport_size_in_mb: 15 
incremental_backups: false 
snapshot_before_compaction: false 
auto_snapshot: true 
tombstone_warn_threshold: 1000 
tombstone_failure_threshold: 100000 
column_index_size_in_kb: 64 
in_memory_compaction_limit_in_mb: 64 
multithreaded_compaction: false 
compaction_throughput_mb_per_sec: 16 
compaction_preheat_key_cache: true 
read_request_timeout_in_ms: 10000 
range_request_timeout_in_ms: 10000 
write_request_timeout_in_ms: 10000 
cas_contention_timeout_in_ms: 1000 
truncate_request_timeout_in_ms: 60000 
request_timeout_in_ms: 10000 
cross_node_timeout: false 
phi_convict_threshold: 12 
endpoint_snitch: com.datastax.bdp.snitch.DseDelegateSnitch 
dynamic_snitch_update_interval_in_ms: 100 
dynamic_snitch_reset_interval_in_ms: 600000 
dynamic_snitch_badness_threshold: 0.1 
request_scheduler: org.apache.cassandra.scheduler.NoScheduler 
server_encryption_options: 
    internode_encryption: none 
    keystore: resources/dse/conf/.keystore 
    keystore_password: cassandra 
    truststore: resources/dse/conf/.truststore 
    truststore_password: cassandra 

client_encryption_options: 
    enabled: false 
    keystore: resources/dse/conf/.keystore 
    keystore_password: cassandra 
internode_compression: all 
inter_dc_tcp_nodelay: false 
preheat_kernel_page_cache: false 
auto_bootstrap: false 

回答

0

最后,我发现在编译预处理语句时有锁。每次有新的请求进入时,我都会编译一个新的准备好的语句,在我改变重用它之后,我得到了我的应用程序服务器规模。但是,我仍然不知道为什么跨区域案例可以扩展。