本文介绍了卡桑德拉写基准,低(20%)的CPU使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建卡桑德拉3倍m1.large集群在Amazon EC2上。我用DataStax自动聚类AMI 2.5.1-PV,与卡桑德拉DataStax社区2.2.0-1版本。

I'm building Cassandra 3x m1.large cluster on Amazon EC2. I've used DataStax Auto-Clustering AMI 2.5.1-pv, with Cassandra DataStax Community version 2.2.0-1.

当操作写入的基准,对生产数据,似乎群集可以处理左右3K至5K每秒写请求,而不读取负载。几乎所有的时间节点做的:

When doing write benchmarks, on 'production' data, it seems that cluster can handle around 3k to 5k write requests per second, without read load.Nearly all the time nodes do:

  • system.hints压实
  • mykeyspace.mybigtable压实
  • mybigtable指数压实

不过,我担心的是低CPU使用率。所有的3个节点拥有的CPU使用率从17%至24%百分比。是不是CPU使用率太低?那不是我的极限写入速度?这可能是100%的我。

However, what worries me is the low CPU usage. All of the 3 nodes have CPU usage ranging from 17% to 24% percents. Isn't the CPU usage too low? Isn't that limiting my write speed? It could be 100% for me.

BTW。如何检查什么限制(CPU,内存,网络,光盘)我写性能?

BTW. How can I check what's limiting (CPU, memory, network, discs) my write performance?

下面是一些数据:

编辑:

  • 在我插入的数据很好地分布在集群
  • 在我使用的是一个一致性水平

推荐答案

首先,CPU是不是20%。而CPU系统是在20%时,用户CPU是在70%左​​右。下面是用户CPU与系统CPU的解释:用户CPU时间与系统CPU时间?

First of all, CPU isn't 20%. While the CPU system is at 20%, the user CPU is at around 70%. Here is the explanation between user CPU and system CPU: User CPU time vs System CPU time?

其次,iostat的无参数调用不是看着盘使用的最佳方法。来源:基本我在Linux上 / O监控

Secondly, iostat invoked without arguments isn't the best way of looking at disc usage. From: Basic I/O Monitoring on Linux

没有指定的时间间隔,iostat的,因为显示的统计数据  系统建立然后退出,这是不是在我们的案例是有用的。

有关更多COM prehensive看看系统中,使用

For more comprehensive look at the system, use

  dstat -rcdgilmnps 60

现在我们清楚地看到,从最后一分钟的平均值。 CPU空闲为1-4%,我们有〜340 IOS与15M的写入速度。

Now we see clearly the averages from the last minute. CPU idle is at 1-4%, we have ~340 ios with 15M write speed.

接下来有用的工具是nodetool cfstats:

Next usefull tool is nodetool cfstats:

在这里我们可以看到一些统计数据的特定的表。写入延迟的统计数据是特别有趣和等于1.5毫秒。

Where we can see some stats for particular table. Write latency statistics are particularly interesting and equals to 1.5ms.

最后,执行跟踪写:

id: 12345 -> host NodeAsked:9042, achieved consistency: LocalOne
Sending MUTATION message to /NodeA on NodeAsked[MessagingService-Outgoing-/NodeA] at 0
Sending MUTATION message to /NodeB on NodeAsked[MessagingService-Outgoing-/NodeB] at 0
REQUEST_RESPONSE message received from /NodeA on NodeAsked[MessagingService-Incoming-/NodeA] at 0
Processing response from /NodeA on NodeAsked[SharedPool-Worker-32] at 0
MUTATION message received from /NodeAsked on NodeA[MessagingService-Incoming-/NodeAsked] at 12
Determining replicas for mutation on NodeAsked[SharedPool-Worker-45] at 114
Appending to commitlog on NodeAsked[SharedPool-Worker-45] at 183
Adding to mytable memtable on NodeAsked[SharedPool-Worker-45] at 241
Appending to commitlog on NodeA[SharedPool-Worker-5] at 5360
Adding to mytable memtable on NodeA[SharedPool-Worker-5] at 5437
Enqueuing response to /NodeAsked on NodeA[SharedPool-Worker-5] at 5527
Sending REQUEST_RESPONSE message to /NodeAsked on NodeA[MessagingService-Outgoing-/NodeAsked] at 5739

可见,什么是限制我们的是存储速度。这是最好的执行正常的写入负载启用的跟踪几个自发写入看到一些模式。

Shows that what's limiting us is the storage speed. It's the best to execute several spontaneous writes with enabled tracing on normal write load to see some patterns.

投票,如果你同意的。

这篇关于卡桑德拉写基准,低(20%)的CPU使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 00:38