0

我为 MongoDB 运行 YCSB。

这是我的结果:

./bin/ycsb run mongodb -s -P workloads/workloada > my_run.dat
Loading workload...
Starting test.
 0 sec: 0 operations; 
 10 sec: 16690 operations; 1657.07 current ops/sec; [READ AverageLatency(us)=490.92] [UPDATE AverageLatency(us)=654.23] 
 20 sec: 34651 operations; 1784.68 current ops/sec; [READ AverageLatency(us)=489.92] [UPDATE AverageLatency(us)=612.62] 
 30 sec: 53152 operations; 1848.99 current ops/sec; [READ AverageLatency(us)=490.31] [UPDATE AverageLatency(us)=577.33] 
 40 sec: 69624 operations; 1645.55 current ops/sec; [READ AverageLatency(us)=538.23] [UPDATE AverageLatency(us)=661.69] 
 50 sec: 87998 operations; 1836.67 current ops/sec; [READ AverageLatency(us)=486.72] [UPDATE AverageLatency(us)=590.1] 
 60 sec: 105686 operations; 1768.62 current ops/sec; [READ AverageLatency(us)=507.04] [UPDATE AverageLatency(us)=611.8] 
 70 sec: 125513 operations; 1982.7 current ops/sec; [READ AverageLatency(us)=451.16] [UPDATE AverageLatency(us)=546.62] 
 80 sec: 144607 operations; 1909.21 current ops/sec; [READ AverageLatency(us)=471.99] [UPDATE AverageLatency(us)=565.08] 
 90 sec: 162982 operations; 1836.95 current ops/sec; [READ AverageLatency(us)=479.93] [UPDATE AverageLatency(us)=598.32] 
 100 sec: 182047 operations; 1906.31 current ops/sec; [READ AverageLatency(us)=464.83] [UPDATE AverageLatency(us)=573.04] 
 110 sec: 200449 operations; 1837.81 current ops/sec; [READ AverageLatency(us)=482.29] [UPDATE AverageLatency(us)=593.68] 
 120 sec: 219938 operations; 1948.71 current ops/sec; [READ AverageLatency(us)=450.92] [UPDATE AverageLatency(us)=565.71] 
 130 sec: 238601 operations; 1866.11 current ops/sec; [READ AverageLatency(us)=470.68] [UPDATE AverageLatency(us)=591.11] 
 140 sec: 259370 operations; 2076.69 current ops/sec; [READ AverageLatency(us)=423.18] [UPDATE AverageLatency(us)=529.47] 
 150 sec: 280439 operations; 2106.69 current ops/sec; [READ AverageLatency(us)=427.67] [UPDATE AverageLatency(us)=511.45] 
 160 sec: 300454 operations; 2001.3 current ops/sec; [READ AverageLatency(us)=443.84] [UPDATE AverageLatency(us)=536.78] 
 170 sec: 320651 operations; 2019.5 current ops/sec; [READ AverageLatency(us)=441.01] [UPDATE AverageLatency(us)=550.97] 
 180 sec: 339846 operations; 1919.31 current ops/sec; [READ AverageLatency(us)=467.42] [UPDATE AverageLatency(us)=564.23] 
 190 sec: 358263 operations; 1839.13 current ops/sec; [READ AverageLatency(us)=479.94] [UPDATE AverageLatency(us)=595.92] 
 200 sec: 377686 operations; 1941.72 current ops/sec; [READ AverageLatency(us)=457.56] [UPDATE AverageLatency(us)=561.6] 
 210 sec: 398299 operations; 2060.89 current ops/sec; [READ AverageLatency(us)=433.26] [UPDATE AverageLatency(us)=526.97] 
 220 sec: 416290 operations; 1798.92 current ops/sec; [READ AverageLatency(us)=495.91] [UPDATE AverageLatency(us)=604.73] 
 230 sec: 436193 operations; 1989.11 current ops/sec; [READ AverageLatency(us)=451.31] [UPDATE AverageLatency(us)=543.84] 
 240 sec: 457690 operations; 2149.49 current ops/sec; [READ AverageLatency(us)=411.25] [UPDATE AverageLatency(us)=508.66] 
 250 sec: 476801 operations; 1910.91 current ops/sec; [READ AverageLatency(us)=452.22] [UPDATE AverageLatency(us)=583.65] 
 260 sec: 494604 operations; 1780.12 current ops/sec; [READ AverageLatency(us)=497.51] [UPDATE AverageLatency(us)=612.22] 
 270 sec: 515721 operations; 2111.49 current ops/sec; [READ AverageLatency(us)=419.5] [UPDATE AverageLatency(us)=518.25] 
 280 sec: 533880 operations; 1815.54 current ops/sec; [READ AverageLatency(us)=486.85] [UPDATE AverageLatency(us)=604.71] 
 290 sec: 553822 operations; 1994 current ops/sec; [READ AverageLatency(us)=444.74] [UPDATE AverageLatency(us)=548.16] 
 300 sec: 576101 operations; 2227.01 current ops/sec; [READ AverageLatency(us)=398.8] [UPDATE AverageLatency(us)=489.87] 
 310 sec: 594411 operations; 1826.43 current ops/sec; [READ AverageLatency(us)=472.85] [UPDATE AverageLatency(us)=610.28] 
 313 sec: 600000 operations; 1792.5 current ops/sec; [READ AverageLatency(us)=496.76] [UPDATE AverageLatency(us)=602.38] 

然后输出文件:

YCSB Client 0.1
Command line: -db com.yahoo.ycsb.db.MongoDbClient -s -P workloads/workloada -t
new database url = 172.17.0.13:27017/test
mongo connection created with 172.17.0.13:27017/test
[OVERALL], RunTime(ms), 313358.0
[OVERALL], Throughput(ops/sec), 1914.7428819433364
[READ], Operations, 299981
[READ], AverageLatency(us), 462.1898386897837
[READ], MinLatency(us), 88
[READ], MaxLatency(us), 35020
[READ], 95thPercentileLatency(ms), 1
[READ], 99thPercentileLatency(ms), 2
[READ], Return=0, 299981
[READ], 0, 278042
[READ], 1, 18615
[READ], 2, 2170
[READ], 3, 493
[READ], 4, 264
[READ], 5, 120
[READ], 6, 81
[READ], 7, 37
[READ], 8, 27
[READ], 9, 14
[READ], 10, 14
[READ], 11, 13
[READ], 12, 14
[READ], 13, 8
[READ], 14, 15
[READ], 15, 14
[READ], 16, 15
[READ], 17, 9
[READ], 18, 4
[READ], 19, 1
[READ], 20, 4
[READ], 21, 1
[READ], 22, 2
[READ], 23, 1
[READ], 24, 0
[READ], 25, 0
[READ], 26, 0
[READ], 27, 0
[READ], 28, 0
[READ], 29, 0
[READ], 30, 0
[READ], 31, 1
[READ], 32, 1
[READ], 33, 0
[READ], 34, 0
[READ], 35, 1
[READ], 36, 0
[READ], 37, 0
[READ], 38, 0
[READ], 39, 0
[READ], 40, 0
[READ], 41, 0
[READ], 42, 0
[READ], 43, 0
[READ], 44, 0
[READ], 45, 0
[READ], 46, 0
[READ], 47, 0

我想绘制这样的 http://i.imgur.com/BWTLydi.jpg

但是,我对结果的输出感到困惑。不确定图中的“吞吐量”在结果中意味着什么。此外,对于

10 sec: 16690 operations; 1657.07 current ops/sec;

这不是 1657.07*10(sec)=16570.7 操作吗?

4

2 回答 2

1

阅读YCSB wiki 的这一部分以了解如何解释结果。

更具体地说,您的第一个片段基本上是由“-s”开关打开的瞬时输出。我不确定 YCSB,但通常在性能测试中,这种瞬时结果仅仅是指标,不应该被认为是非常准确的。

现在,来到您要绘制的图(跨多个数据库提供程序的给定工作负载的吞吐量与延迟),您将需要使用YCSB 中可用的“-target”开关。使用该开关改变吞吐量,捕获最终的日志输出,然后将 95% 或 99% 的百分位延迟数字与您的目标吞吐量进行映射,应该会给您所需的图表。

希望这可以帮助。

另外:性能运行应该有足够长的运行时间。仅运行 5 分钟的性能测试的结果可能因多种原因而被取消资格。加载足够的数据(YCSB 的 recordcount 属性),然后将 ops(operationcount 属性)设置为足够大的数字,以便您的测试至少运行 30 分钟。

于 2015-04-14T14:12:00.790 回答
0

我认为第一个数字是过去十秒内完成的操作数。第二个是过去一秒的操作次数。操作数每秒钟都不同,因此 10 * current ops/s 不一定是过去 10 秒内的操作数。自 16690 / 10 > 1657.07 以来,过去 10 秒内的平均每秒操作数平均高于这一特定秒。

于 2015-04-07T16:49:06.257 回答