Couchbase:在群集模式下运行时,cbs-pillowfight延迟测试相差10倍的可能原因 [英] Couchbase: possible reasons for 10x difference in cbs-pillowfight latency test, when running in a cluster mode
问题描述
所以我开始了一个简单的测试,
So I've started a simple test,
cbs-pillowfight -h localhost -b default -i 1 -I 10000 -T
知道:
[10717.252368] Run
+---------+---------+---------+---------+
[ 20 - 29]us |## - 257
[ 30 - 39]us |# - 106
[ 40 - 49]us |###################### - 2173
[ 50 - 59]us |################ - 1539
[ 60 - 69]us |######################################## - 3809
[ 70 - 79]us |################ - 1601
[ 80 - 89]us |## - 254
[ 90 - 99]us |# - 101
[100 - 109]us | - 43
[110 - 119]us | - 17
[120 - 129]us | - 48
[130 - 139]us | - 23
[140 - 149]us | - 14
[150 - 159]us | - 5
[160 - 169]us | - 5
[170 - 179]us | - 1
[180 - 189]us | - 3
[210 - 219]us | - 1
[270 - 279]us | - 1
+----------------------------------------
然后,通过将该节点添加到另一个i7节点来创建集群.默认"存储桶绝对小于1Gb,它具有1个副本和2个写入器,未设置刷新.
Then, a cluster was created by adding this node to another i7 node. 'Default' bucket is definitely smaller than 1Gb, it has 1 replica and 2 writers, flush is not set.
现在,相同的命令产生了(两个主机都使用了):
Now, same command produces (both hosts used ):
- 在100-200 ns内达到50%,在200-900 ns内达到1%,在900ns内达到49%,直到"1至9 ms!"!WTF.
将-r(比率)开关设置为90%SET后,
After adding -r (ratio) switch set to 90% SETs,
- 100-200ns中有25%,900ns中有74%,在900ns内保持到"1到9 ms!"
因此,在群集模式下,似乎写入性能会受到很大影响;为什么会有这么大的10倍压降?网络很干净,没有高负载的服务正在运行.
So it seems that write performance suffers much in clustered mode; why it can be such a large, 10x drop? Network is clean, there are no highload services running..
UPD1.
忘记添加理想情况:-r 100.
Forgot to add the ideal case: -r 100.
- 在100-200 ns内为25%,在900 ns内为74%.
这让我想到:
- A)基准代码在某处阻塞(快速读取未显示任何迹象)
- B)服务器正在对我无法理解的SET进行一些未记录的魔术.复制因子?这对一个小数据集来说不是废话吗?这就是我在这里要问的.
- C)网络问题.但是wireshark却什么也没显示.
UPD2.
停止两个节点,将它们移至tmpfs.对于正常"响应,得到了20ns的改进.但是反应缓慢仍然很慢.
Stopped both nodes, moved them to tmpfs. For a "normal" responses, got 20ns improval. But slow responses remain slow.
..[cut]
50 - 59]us |## - 164
[ 60 - 69]us |#### - 321
[ 70 - 79]us |######## - 561
[ 80 - 89]us |########## - 701
[ 90 - 99]us |############ - 844
[100 - 109]us |########## - 717
[110 - 119]us |####### - 514
[120 - 129]us |##### - 336
[130 - 139]us |### - 230
[140 - 149]us |## - 175
[150 - 159]us |## - 135
[160 - 169]us |# - 81
..[cut]
[930 - 939]us | - 24
[940 - 949]us |## - 139
[950 - 959]us |##### - 339
[960 - 969]us |####### - 474
[970 - 979]us |####### - 534
[980 - 989]us |###### - 467
[990 - 999]us |##### - 342
[ 1 - 9]ms |######################################## - 2681
[ 10 - 19]ms | - 1
..[cut]
UPD3:屏幕截图.
UPD3: screenshot.
推荐答案
通过在千兆位网络上切换到三节点配置来解决"问题.
Problem is "solved" by switching to three-node configuration on gigabit network.
这篇关于Couchbase:在群集模式下运行时,cbs-pillowfight延迟测试相差10倍的可能原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!