Cassandra写入性能测试(集群环境)
来源:互联网 发布:windows官方主题 编辑:程序博客网 时间:2024/06/16 16:31
环境:
五个服务器节点(实质是用xserver虚拟出的虚拟机)
master2 218G 29741MB(mem) 2core
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
memtable_offheap_space_in_mb: 2048
批量写入大小失败阈值为50kb
JVM内存配置:
MAX_HEAP_SIZE="4G"
HEAP_NEWSIZE="800M"
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 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
阅读全文
0 0
- Cassandra写入性能测试(集群环境)
- Cassandra多节点集群测试环境计划(草稿)
- Cassandra性能测试
- 利用ycsb测试cassandra性能
- cassandra 集群
- cassandra 集群
- 通过eclipse方法来操作Hadoop集群上cassandra数据库(包括创建Keyspace对象以及往数据库写入数据)
- Tomcat5集群性能测试!
- linux集群性能测试
- TestDFSIO测试集群性能
- Hadoop集群性能测试
- python 测试mysql写入性能
- docker搭建linux集群,搭建mpi环境,并使用MTT benchmark测试集群性能
- Linux环境Cassandra的单机及集群部署
- hbase写入性能测试(从hdfs向hbase写入数据)
- 使用maven编译YCSB0.1.4对cassandra进行性能测试
- 性能测试:SequoiaDB vs. MongoDB vs. Cassandra vs. HBase
- 性能测试:SequoiaDB vs. MongoDB vs. Cassandra vs. HBase
- 【企业级框架整合】Springmvc+mybatis+restful+bootstrap框架整合
- zookeeper 的Watcher机制实现
- spring mvc 不拦截静态资源
- 如何实现:每天收集数据到表格,但只看到当天的数据?
- w_char 和 char 之间的转换
- Cassandra写入性能测试(集群环境)
- 编程第三十八天
- “奔三”了_程序员_你该怎么选择未来的路?
- 摄像机模型 坐标变换 单应矩阵资料
- 二叉搜索树的后序遍历序列
- Android中CardView使用
- zookeeper 的Watcher机制实现
- bitset
- 网络连接端扫描软件Nmap的使用---网络扫描(端口、主机)