The reason for having 2 block is on purpose to keep the entries in the
cache for the longest possible time. That will maximize the number of
entries for the same ledger that will be stored sequentially on the disk
and it will increase the read performance.

On Wed, Jun 8, 2022 at 12:05 AM lordcheng10 <1572139...@qq.com.invalid>
wrote:

> The current write cache has only 2 blocks, which has the following
> deficiencies:
> &nbsp; &nbsp; &nbsp; 1.Insufficient use of cache: When half of the write
> cache is flushed, it must wait for all the data in the write cache to be
> flushed before it can be released. With the same write cache size, if we
> divide the write cache into multiple blocks, the cache resources can be
> released faster, preventing the write request from waiting too long for the
> cache resources to be released;
>
> &nbsp; &nbsp; &nbsp; &nbsp;2.The current write cache is allocated
> according to the configured data directory, so that the write cache
> resources between directories cannot be shared. When the write cache
> resources corresponding to one directory continue to be full, it is
> possible that the cache resources of other directories are still relatively
> low. Idle, so that the full utilization of the write cache is not used;
>
> So I made the following changes:
> 1.Two write caches become multi-cache blocks;
> 2.All data directories share write cache resources;
>
> For BP and PR :
> https://github.com/apache/bookkeeper/issues/3322
> https://github.com/apache/bookkeeper/pull/3260

-- 
--
Matteo Merli
<matteo.me...@gmail.com>

Reply via email to