Cassandra写入性能测试(集群环境)
2017-05-27 14:32
323 查看
环境:
五个服务器节点(实质是用xserver虚拟出的虚拟机)
master2 218G 29741MB(mem) 2core
slave1 438G 29741MB(mem) 2core
slave2 310G 29741MB(mem) 2core
slave4 366G 29741MB(mem) 2core
slave5 338G 29741MB(mem) 2core
cassandra内存调整如下(每个节点一致),版本为3.10。
memtable_heap_space_in_mb: 2048
memtable_offheap_space_in_mb: 2048
批量写入大小失败阈值为50kb
JVM内存配置:
MAX_HEAP_SIZE="4G"
HEAP_NEWSIZE="800M"
表模式:
<dev_id, time, k1 .. k350, tag1 .. tag150>,其中tag*列为double, k* 列为boolean, dev_id与time为ASCII。
程序描述:
每 次一个insert,使用驱动为datastax/java-driver。写入时使用了BatchStatement。每次批量四个insert,测试 写入10240条记录(insert语句)。使用长连接,Cluster产生的session不关闭,每个insert产生一次 BoundStatement,并加入到batchstatement中,每批(4个insert)调用一次execute(),直到所有的批量执行完成 才统一关闭。这里没有使用连接池。
还有一种测试不使用batch,直接逐条写入。
运行结果:
逐条写入,共运行五次,每次处理10240个insert,用时如下:
Spending 47029 ms in general.
Spending 43375 ms in general.
Spending 41938 ms in general.
Spending 45987 ms in general.
Spending 47186 ms in general.
批量写入,共运行五次,每次处理10240个insert,每批次4条insert,用时如下:
Spending 41070 ms in general.
Spending 34927 ms in general.
Spending 37261 ms in general.
Spending 34880 ms in general.
Spending 37496 ms in general.
结论:
逐条写入平均每秒:113316.95点
逐条写入平均每个insert用时:4.41ms
批量写入平均每秒:137905.75点
批量写入平均每个insert用时:3.62ms
五个服务器节点(实质是用xserver虚拟出的虚拟机)
master2 218G 29741MB(mem) 2core
slave1 438G 29741MB(mem) 2core
slave2 310G 29741MB(mem) 2core
slave4 366G 29741MB(mem) 2core
slave5 338G 29741MB(mem) 2core
cassandra内存调整如下(每个节点一致),版本为3.10。
memtable_heap_space_in_mb: 2048
memtable_offheap_space_in_mb: 2048
批量写入大小失败阈值为50kb
JVM内存配置:
MAX_HEAP_SIZE="4G"
HEAP_NEWSIZE="800M"
表模式:
<dev_id, time, k1 .. k350, tag1 .. tag150>,其中tag*列为double, k* 列为boolean, dev_id与time为ASCII。
程序描述:
每 次一个insert,使用驱动为datastax/java-driver。写入时使用了BatchStatement。每次批量四个insert,测试 写入10240条记录(insert语句)。使用长连接,Cluster产生的session不关闭,每个insert产生一次 BoundStatement,并加入到batchstatement中,每批(4个insert)调用一次execute(),直到所有的批量执行完成 才统一关闭。这里没有使用连接池。
还有一种测试不使用batch,直接逐条写入。
运行结果:
逐条写入,共运行五次,每次处理10240个insert,用时如下:
Spending 47029 ms in general.
Spending 43375 ms in general.
Spending 41938 ms in general.
Spending 45987 ms in general.
Spending 47186 ms in general.
批量写入,共运行五次,每次处理10240个insert,每批次4条insert,用时如下:
Spending 41070 ms in general.
Spending 34927 ms in general.
Spending 37261 ms in general.
Spending 34880 ms in general.
Spending 37496 ms in general.
结论:
逐条写入平均每秒:113316.95点
逐条写入平均每个insert用时:4.41ms
批量写入平均每秒:137905.75点
批量写入平均每个insert用时:3.62ms
相关文章推荐
- docker搭建linux集群,搭建mpi环境,并使用MTT benchmark测试集群性能
- UNIX环境下性能测试指令1——top
- 阿翔编程学-Java环境下的Axis与XFire性能测试
- GlusterFS分布式集群文件系统安装、配置及性能测试
- 性能测试环境部署
- 页面性能测试之二----ShowSlow+Yslow环境搭建
- Tomcat5集群性能测试!
- 性能测试环境方案
- GlusterFS分布式集群文件系统安装、配置及性能测试
- Apache 2+Tomcat 6负载均衡与集群配置及性能测试
- 如何搭建ORACLE性能测试环境
- PHP4和PHP5性能测试和对比 测试代码与环境
- 在生产环境中使用php性能测试工具xhprof
- 服务集成平台性能测试与优化(应用与环境)
- Iometer测试集群文件系统性能
- 网络游戏之性能测试规划(二)——如何建立有效的基准数据及环境(拟稿)
- 多进程多线程环境下的同步机制性能测试
- Linux集群的I/O性能测试
- 中间件性能测试环境和标准
- linux环境下 C++性能测试工具 gprof 和gprof2dot