Oak icon indicating copy to clipboard operation
Oak copied to clipboard

configurable BlocksPool

Open liran-funaro opened this issue 5 years ago • 0 comments

It would be nice to allow some of the properties of BlocksPool to be configurable. Either via a configuration file and/or programmatically.

  1. The block size
  2. The number of blocks to be pre-allocated (even allow zero pre-allocation)
  3. The number of blocks to allocate each time a new block is needed
  4. Minimal and maximal number of unused blocks to preserve until releasing them back to the OS (excess blocks)

Specifically, it would be nice that the preallocated blocks would be a different setting than the number of new blocks to allocate, and that the number of excess blocks could be set via a ratio and/or via a specific number. Also, the excess number of blocks should have a high and low threshold to prevent releasing blocks one at a time. It might also help to set the number of excess blocks with proportion to the total number of blocks.

liran-funaro avatar Feb 10 '20 08:02 liran-funaro