【问题标题】:Rate of Insertion decreases as property writeBehindEnbled is set to true当属性 writeBehindEnbled 设置为 true 时,插入率会降低
【发布时间】:2018-01-15 12:01:14
【问题描述】:

我通过将 write-through 设置为 true 来使用 Ignite 的 Cache 适配器。

场景 1:

  • 在写入时,我将数据持久化到 HBase。
  • 为此,我在 Ignite 和 HBase 中插入了 100000 个对象,所需时间约为 82 秒。

场景 2:

  • 我将 write-behind 属性设置为 true。
  • 我在 Ignite 和 HBase 中插入了 100000 个对象,所需时间约为 124 秒。

以下是结果。

    Write-behind      Objects      Time in ms

     true             1,00,000      81962
     false            1,00,000      123517

据我所知,如果我们使用后写缓存,它会作为异步模式工作 但它给出了意想不到的结果。我是不是在哪里出错了。

【问题讨论】:

    标签: hbase ignite


    【解决方案1】:

    您在这里期待什么结果?后写模式只是安排稍后更新存储,这比每次缓存更改时立即更新要快得多。

    要调整它的行为,您可以检查setWriteBehindBatchSizesetWriteBehindFlushFrequencysetWriteBehindFlushSizesetWriteBehindFlushThreadCount

    【讨论】:

    • 感谢您的回复,实际上,当 write-behind 属性设置为 true 时,我期待更快的插入。但它向我展示了完全的对比。由于 write-behind 是一个异步操作,它不应该等待 HBase 中的 Persist 数据。
    • Write-behind 提供更小的延迟,但在您的情况下,吞吐量是测量的。当未刷新的数据集大小达到某个阈值时(默认情况下为getWriteBehindFlushSize 的 1.5),存储开始以直写模式工作,刷新线程也会给 GC 带来额外的压力。尝试将setWriteBehindFlushSize 设置为 100000。
    • Write-behind 可以在延迟方面更快地插入缓存。底层存储更新是异步的,因此可能会延迟,因此可能需要“更长的时间”。
    • 感谢您的意见。我想对我的 ignite 和 hbase 进行基准测试。对于 HBase,我使用了 YCSB。有什么工具可以用来对 Ignite 进行基准测试。
    猜你喜欢
    • 2011-04-02
    • 1970-01-01
    • 1970-01-01
    • 2018-12-28
    • 2011-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-16
    相关资源
    最近更新 更多