koculu / ZoneTree

ZoneTree is a persistent, high-performance, transactional, ACID-compliant ordered key-value database for NET. It can operate in memory or on local/cloud storage.

Home Page:https://tenray.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] Reduce overall memory consumption and improve read speed.

koculu opened this issue · comments

To reduce the memory consumption of ZoneTree, consider the following optimizations:

  • Convert byte arrays (byte[]) into Memory<byte> to eliminate unnecessary buffer copies.
  • Utilize ArrayPool for efficient memory management.
  • Enhance read block caches by replacing the unstable CircularBlockCache.
  • Pin iterators to single block cache to prevent multiple block caches from consuming memory during a table scan.
  • Create and persist default sparse arrays upon disk segment creation.
  • Implement key and value caches for each disk segment to minimize IO operations.
  • Optimize the default configuration options.