simerplaha / SwayDB

Persistent and in-memory key-value storage engine for JVM that scales on a single machine.
https://swaydb.simer.au
Apache License 2.0
293 stars 16 forks source link

Benchmark to see if Asynchronous IOStrategy is needed #333

Open simerplaha opened 2 years ago

simerplaha commented 2 years ago

Overview

IO concurrency can be configured via IOStrategy for each block & file. This IOStrategy is used when opening, decompressing and caching a file or blocks within the file.

Issue

Asynchronous requires the need for Future in core which requires the need to Bag[_] which requires memory allocations that can be removed if IOStrategy.AsyncIO is removed.

If IOStrategy.AsyncIO can be removed from core then the need for Bag[_] would only be at API level which is optional anyway.

Task

Benchmark the cost of IOStrategy.AsyncIO and at what point it becomes useful. Check if IOStrategy.AsyncIO can be removed completely.