当 属性 writeBehindEnbled 设置为 true 时,插入率降低
Rate of Insertion decreases as property writeBehindEnbled is set to true
我通过将 write-through 设置为 true 来使用 Ignite 的缓存适配器。
场景 1:
- 在写入过程中,我将数据持久化到 HBase。
- 为此,我在 Ignite 中插入了 100000 个对象,然后在 HBase 中插入,所需时间约为 82 秒。
场景 2:
- 我将后写 属性 设置为 true。
- 我在 Ignite 中插入了 100000 个对象,然后在 HBase 中,这需要大约 124 秒的时间。
结果如下。
Write-behind Objects Time in ms
true 1,00,000 81962
false 1,00,000 123517
据我所知,如果我们使用后写缓存,它会以异步模式工作
但它给出了意想不到的结果。我哪里出错了。
您希望得到什么结果?后写模式只是稍后安排存储更新,这比每次缓存更改时立即更新要快得多。
要调整它的行为,您可以检查 setWriteBehindBatchSize, setWriteBehindFlushFrequency, setWriteBehindFlushSize, setWriteBehindFlushThreadCount。
我通过将 write-through 设置为 true 来使用 Ignite 的缓存适配器。
场景 1:
- 在写入过程中,我将数据持久化到 HBase。
- 为此,我在 Ignite 中插入了 100000 个对象,然后在 HBase 中插入,所需时间约为 82 秒。
场景 2:
- 我将后写 属性 设置为 true。
- 我在 Ignite 中插入了 100000 个对象,然后在 HBase 中,这需要大约 124 秒的时间。
结果如下。
Write-behind Objects Time in ms
true 1,00,000 81962
false 1,00,000 123517
据我所知,如果我们使用后写缓存,它会以异步模式工作 但它给出了意想不到的结果。我哪里出错了。
您希望得到什么结果?后写模式只是稍后安排存储更新,这比每次缓存更改时立即更新要快得多。
要调整它的行为,您可以检查 setWriteBehindBatchSize, setWriteBehindFlushFrequency, setWriteBehindFlushSize, setWriteBehindFlushThreadCount。