【问题标题】:How to Reduce load on cassandra server so to avoid NoHostAvailable Exceptions如何减少 cassandra 服务器上的负载以避免 NoHostAvailable 异常
【发布时间】:2019-12-15 23:45:43
【问题描述】:

我正在运行 5 节点 apache cassandra 集群 (3.11.4),每个节点有 48 GB RAM、12 GB 堆内存和 6 个 vcpus。即使 cassandra 服务器中没有数据处理,我也可以在 cassandra 服务器节点上看到大量负载(18 GB)。我可以有很多 GC 暂停,因此当我尝试推送时我可以看到“NoHostAvailable”异常数据到 cassandra。

请建议我如何减少这种负载以及如何避免连接失败“NoHostAvailable”。

ID                     : a65c8072-636a-480d-8774-2c5704361bec
Gossip active          : true
Thrift active          : true
Native Transport active: true
Load                   : 18.07 GiB
Generation No          : 1576158587
Uptime (seconds)       : 205965
Heap Memory (MB)       : 3729.16 / 11980.81
Off Heap Memory (MB)   : 12.81
Data Center            : dc1
Rack                   : rack1
Exceptions             : 21
Key Cache              : entries 2704, size 5.59 MiB, capacity 100 MiB, 1966 hits, 4715 requests, 0.417 recent hit rate, 14400 save period in seconds
Row Cache              : entries 0, size 0 bytes, capacity 0 bytes, 0 hits, 0 requests, NaN recent hit 
rate, 0 save period in seconds
Counter Cache          : entries 0, size 0 bytes, capacity 50 MiB, 0 hits, 0 requests, NaN recent hit rate, 7200 save period in seconds
Chunk Cache            : entries 25, size 1.56 MiB, capacity 480 MiB, 4207149 misses, 4342386 requests, 0.031 recent hit rate, NaN microseconds miss latency
Percent Repaired       : 34.58708788430304%
Token                  : (invoke with -T/--tokens to see all 256 tokens)

【问题讨论】:

    标签: cassandra


    【解决方案1】:

    如果您有 48Gb RAM,我建议您至少使用 16Gb 或 20 的便宜。确保您使用的是 G1 GC(Java 8 中的默认值)。

    但 NoHostAvailable 可能取决于您使用的一致性级别以及其他因素..

    另一方面,您可能会考虑限制您的应用程序 - 有时推得较慢可能会带来更好的吞吐量。

    【讨论】:

    • 嗨,Alex,感谢您的回复,您能否建议如何减少节点上的负载(18 gb)。
    • 每个节点 18Gb 的负载通常没什么好关心的。通常它应该只是你适合记忆。但通常问题在于查询、大分区等。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-28
    • 2011-08-05
    • 2011-06-05
    相关资源
    最近更新 更多