bnclabs / gostore

Storage algorithms.
MIT License
35 stars 4 forks source link

bogn: auto throttling write operations. #68

Open prataprc opened 6 years ago

prataprc commented 6 years ago

Write operations, if maintained at a faster rate than flush rate, might lead to memory bloat. This may not be an issue for machines supplied with adequate memory, but for resource constrained machines this can lead to surprise behaviors.

Solution: go_compact, for every tick, should compute the rate at which memory footprint is growing in comparison to configured memcapacity and initialize a throttle-load value. Subsequently every mutation will schedule out throttle-load times before returning back to the caller.