【问题标题】:Cassandra - Number of disk seeks in a read requestCassandra - 读取请求中的磁盘寻道次数
【发布时间】:2017-03-22 02:19:15
【问题描述】:

我试图了解 Cassandra 中读取操作所需的最大磁盘寻道次数。我看了几篇在线文章,包括这篇:https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlAboutReads.html

据我了解,在最坏的情况下需要两次磁盘寻道。一种是读取分区索引,另一种是从压缩分区中读取实际数据。压缩分区中数据的索引是从压缩偏移表(存储在内存中)中获得的。我在正确的轨道上吗?是否会出现需要超过 1 次磁盘寻道才能读取数据的情况?

【问题讨论】:

    标签: cassandra


    【解决方案1】:

    我在这里发布我从 Cassandra 用户社区线程收到的答案,以防其他人需要它:

    youre right – one seek with hit in the partition key cache and two if not.
    Thats the theory – but two thinge to mention:
    
    First, you need two seeks per sstable not per entire read. So if you data is spread over multiple sstables on disk you obviously need more then two reads. Think of often updated partition keys – in combination with memory preassure you can easily end up with maaany sstables (ok they will be compacted some time in the future).
    
    Second, there could be fragmentation on disk which leads to seeks during sequential reads.
    
    Note: Each SSTable has it's own partition index.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-04
      • 2014-03-16
      • 2020-10-22
      • 1970-01-01
      • 2016-11-12
      • 2013-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多