当 属性 writeBehindEnbled 设置为 true 时,插入率降低

Rate of Insertion decreases as property writeBehindEnbled is set to true

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

场景 1:

场景 2:

结果如下。

    Write-behind      Objects      Time in ms

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

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

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

要调整它的行为,您可以检查 setWriteBehindBatchSize, setWriteBehindFlushFrequency, setWriteBehindFlushSize, setWriteBehindFlushThreadCount