ycsb压测mongodb

下载解压

https://github.com/brianfrankcooper/YCSB/releases/download/0.17.0/ycsb-mongodb-binding-0.17.0.tar.gz

复制代码
tar -zxvf ycsb-mongodb-binding-0.17.0.tar.gz

ycsb提前已经在workload文件夹下准备好了几个压测场景分别对应workloada:f

workloads/workloada 样例

复制代码
# Copyright (c) 2010 Yahoo! Inc. All rights reserved.                                                                                                                             
#                                                                                                                                                                                 
# Licensed under the Apache License, Version 2.0 (the "License"); you                                                                                                             
# may not use this file except in compliance with the License. You                                                                                                                
# may obtain a copy of the License at                                                                                                                                             
#                                                                                                                                                                                 
# http://www.apache.org/licenses/LICENSE-2.0                                                                                                                                      
#                                                                                                                                                                                 
# Unless required by applicable law or agreed to in writing, software                                                                                                             
# distributed under the License is distributed on an "AS IS" BASIS,                                                                                                               
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or                                                                                                                 
# implied. See the License for the specific language governing                                                                                                                    
# permissions and limitations under the License. See accompanying                                                                                                                 
# LICENSE file.                                                                                                                                                                   


# Yahoo! Cloud System Benchmark
# Workload A: Update heavy workload
#   Application example: Session store recording recent actions
#                        
#   Read/update ratio: 50/50
#   Default data size: 1 KB records (10 fields, 100 bytes each, plus key)
#   Request distribution: zipfian
mongodb.url=mongodb://root:root@ip:27017/testmy?authSource=admin
mongodb.database=testmy
recordcount=1000
operationcount=1000
workload=site.ycsb.workloads.CoreWorkload

readallfields=true

readproportion=0.5
updateproportion=0.5
scanproportion=0
insertproportion=0

requestdistribution=zipfian

生成数据

复制代码
./bin/ycsb.sh  load  mongodb -P ./workloads/workloada

压测

复制代码
./bin/ycsb.sh  run  mongodb -P ./workloads/workloada

执行结果

复制代码
$ ./bin/ycsb.sh  load  mongodb -P ./workloads/workloada

DBWrapper: report latency for each error is false and specific error codes to track for latency are: []
[OVERALL], RunTime(ms), 3007
[OVERALL], Throughput(ops/sec), 16.627868307283006
[TOTAL_GCS_PS_Scavenge], Count, 0
[TOTAL_GC_TIME_PS_Scavenge], Time(ms), 0
[TOTAL_GC_TIME_%_PS_Scavenge], Time(%), 0.0
[TOTAL_GCS_PS_MarkSweep], Count, 0
[TOTAL_GC_TIME_PS_MarkSweep], Time(ms), 0
[TOTAL_GC_TIME_%_PS_MarkSweep], Time(%), 0.0
[TOTAL_GCs], Count, 0
[TOTAL_GC_TIME], Time(ms), 0
[TOTAL_GC_TIME_%], Time(%), 0.0
[CLEANUP], Operations, 1
[CLEANUP], AverageLatency(us), 1491.0
[CLEANUP], MinLatency(us), 1491
[CLEANUP], MaxLatency(us), 1491
[CLEANUP], 95thPercentileLatency(us), 1491
[CLEANUP], 99thPercentileLatency(us), 1491
[INSERT], Operations, 50
[INSERT], AverageLatency(us), 51999.68
[INSERT], MinLatency(us), 39424
[INSERT], MaxLatency(us), 644607
[INSERT], 95thPercentileLatency(us), 40095
[INSERT], 99thPercentileLatency(us), 644607
[INSERT], Return=OK, 50

$ ./bin/ycsb.sh  run  mongodb -P ./workloads/workloada

YCSB Client 0.17.0

Loading workload...
Starting test.


[OVERALL], RunTime(ms), 2798
[OVERALL], Throughput(ops/sec), 17.8699070764832
[TOTAL_GCS_PS_Scavenge], Count, 0
[TOTAL_GC_TIME_PS_Scavenge], Time(ms), 0
[TOTAL_GC_TIME_%_PS_Scavenge], Time(%), 0.0
[TOTAL_GCS_PS_MarkSweep], Count, 0
[TOTAL_GC_TIME_PS_MarkSweep], Time(ms), 0
[TOTAL_GC_TIME_%_PS_MarkSweep], Time(%), 0.0
[TOTAL_GCs], Count, 0
[TOTAL_GC_TIME], Time(ms), 0
[TOTAL_GC_TIME_%], Time(%), 0.0
[READ], Operations, 25
[READ], AverageLatency(us), 59205.12
[READ], MinLatency(us), 36384
[READ], MaxLatency(us), 581119
[READ], 95thPercentileLatency(us), 51967
[READ], 99thPercentileLatency(us), 581119
[READ], Return=OK, 25
[CLEANUP], Operations, 1
[CLEANUP], AverageLatency(us), 1522.0
[CLEANUP], MinLatency(us), 1522
[CLEANUP], MaxLatency(us), 1522
[CLEANUP], 95thPercentileLatency(us), 1522
[CLEANUP], 99thPercentileLatency(us), 1522
[UPDATE], Operations, 25
[UPDATE], AverageLatency(us), 36714.88
[UPDATE], MinLatency(us), 36224
[UPDATE], MaxLatency(us), 44575
[UPDATE], 95thPercentileLatency(us), 36703
[UPDATE], 99thPercentileLatency(us), 44575
[UPDATE], Return=OK, 25
相关推荐
cui_ruicheng7 小时前
MySQL(四):数据类型与字段设计
数据库·mysql
皮皮学姐分享-ppx8 小时前
政府绿色采购数据库(2015-2024.3)
大数据·网络·数据库·人工智能·制造
闪电悠米10 小时前
黑马点评-Redis 消息队列-03_stream_consumer_group
开发语言·数据库·redis·分布式·缓存·junit·lua
DIY源码阁10 小时前
JavaSwing航班订票管理系统 - MySQL版
数据库·mysql
浪客灿心12 小时前
项目篇:模块设计与实现
数据库·c++
流星白龙13 小时前
【MySQL高阶】26.事务(1)
数据库·mysql
三十..14 小时前
Redis 核心原理与高可用架构实践
运维·数据库·redis
这个DBA有点耶14 小时前
索引优化深潜(下):索引合并、ICP 与索引设计的实战法则
数据库·mysql·架构
努力努力再努力wz14 小时前
【内存管理与高并发内存池系列】从 mmap 到 malloc:文件映射、匿名映射与 glibc 内存分配机制详解
linux·c语言·数据结构·数据库·c++·qt·链表
JdSnE27zv15 小时前
Qt 操作SQLite数据库
数据库·qt·sqlite