转载:cassandra读写性能原理分析
来源:互联网 发布:金淘淘软件 编辑:程序博客网 时间:2024/05/19 19:12
转载:cassandra读写性能原理分析
1. 关于cassandra的读性能分析的一篇文章:
Mike Perham continues his series now explaining: “reads and […] why they are slow”.
So what happens with a Cassandra read?
- a client makes a read request to a random node
- the node acts as a proxy determining the nodes having copies of data
- the node request the corresponding data from each node
- the client can select the strength of the read consistency:
- single read => the request returns once it gets the first response, but data can be stale
- quorum read => the request returns only after the majority responded with the same value
Mark mentions a couple of corner cases related to this behavior that is more complicated.
- the node also performs read repair of any inconsistent response
- each node reading data uses either Memtable (in-memory) or SSTables (disk)
Mike and Jonathan provide a very detailed explanation of the read performance:
Mike: To scan the SSTable, Cassandra uses a row-level column index and bloom filter to find the necessary blocks on disk, deserializes them and determines the actual data to return. There’s a lot of disk IO here which ultimately makes the read latency higher than a similar DBMS.
Jonathan: The reason uncached reads are slower in Cassandra is not because the SSTable is inherently io-intensive (it’s actually better than b-tree based storage on a 1:1 basis) but because in the average case you’ll have to merge row fragments from 2-4 SSTables to complete the request, since SSTables are not update-in-place.
It is also important to note that Cassandra employs row caching that addresses reads latency.
2. 关于cassandra的写性能分析的一篇文章:
An interesting explanation of how Cassandra write ops are happening:
- client submits its write request to a single, random Cassandra node
- the node behavior is similar to a proxy writing data to the cluster
- writes are replicated to N nodes according to the (the details of RackAwareStrategy are quite interesting)
- each of the N nodes performs 2 actions when receiving a write (in the form of RowMutation):
- append the mutation to the commit log for transactional purposes
- update an in-memory Memtable structure with the change
There are also a couple of asynchronous operations:
- Memtable is written to disk in a structure called SSTable
- SSTables corresponding to a are merged into a raw ColumnFamily datafile.
参考文档:
http://nosql.mypopescu.com/post/474623402/cassandra-reads-performance-explained
http://nosql.mypopescu.com/post/454521259/cassandra-write-operation-performance-explained
- 转载:cassandra读写性能原理分析
- mongodb读写性能分析
- 转载:硬盘的读写原理
- 数据库持久化中的读写性能原理分析---基于存储引擎和索引原理
- Cassandra分析
- Cassandra分析
- Cassandra分析
- 许鹏:使用Spark+Cassandra打造高性能数据分析平台
- 使用Spark+Cassandra打造高性能数据分析平台
- MySQL读写分离性能分析
- 分布式文件系统读写性能分析
- 分布式文件系统读写性能分析
- Cassandra 数据读写删
- SharedPreference的读写原理分析
- 可重入读写锁原理分析
- XML的四种解析器原理及性能分析比较【转载】
- cassandra 3.x官方文档(7)---内部原理之如何读写数据
- Cassandra性能测试
- iOS应用启动速度分析
- 给应用名加后缀以区分正式版和测试版
- MongoDB学习笔记(一) Linux下MongoDB的安装和配置
- android游戏开发中图形绘制:Canvas和Paint的使用
- 针对设置RGB颜色,无需转换
- 转载:cassandra读写性能原理分析
- Git 合并时冲突 Merge Conflict:file still marked as conflicted 解决方法
- 年终总结
- css3动画 抖动效果
- ImageView功能
- 高并发Nodejs参数调整
- 利用hibernate建立底层数据的心得
- android日常开发总结的技术经验60条
- Android 自定义View (三) ProgressBar