16 Commits

Author SHA1 Message Date
Albert a517d2d153 Fix typo (#6) 2016-07-01 22:46:08 +03:00
Albert bf51c4698b Small refactoring (#4)
* Move some methods to pool.go

* Use method instead of manual resetting of buffer

* Fix typo
2016-06-28 22:46:18 +03:00
Aliaksandr Valialkin fd4be3f08f Issue #1: clarified the comment regarding CPU cache line size 2016-06-27 16:07:21 +03:00
Aliaksandr Valialkin 928aed2629 Renaming: Acquire->Get, Release->Put for the sake of the consistency with standard package 2016-06-24 14:57:35 +03:00
Aliaksandr Valialkin 5dec51fcf9 optimized index calculation 2016-06-24 14:46:58 +03:00
Aliaksandr Valialkin b48200dc4a Return all the byte buffers to the pool until the first calibration 2016-06-24 14:18:14 +03:00
Aliaksandr Valialkin ea471ff2ce Do not return buffers with too big capacity to the pool 2016-06-23 22:41:46 +03:00
Aliaksandr Valialkin a1c2e6cf76 Revert "Return back pools segementation by size".
This reverts commit 08eb8e13d0,
since it led to high memory usage on the production box.

The commit need additional investigation.
2016-06-23 22:19:16 +03:00
Aliaksandr Valialkin 08eb8e13d0 Return back pools segementation by size 2016-06-23 22:07:48 +03:00
Aliaksandr Valialkin da2b103f14 Removed debug logging 2016-06-23 20:59:29 +03:00
Aliaksandr Valialkin 1dbe0d3c7d Drop buffers with sizes greater than 95% percentile 2016-06-23 20:58:48 +03:00
Aliaksandr Valialkin c0dd811f50 Atomically load pool indexes 2016-06-23 19:20:57 +03:00
Aliaksandr Valialkin 5f9190a306 Allocate from the most frequently used pool 2016-06-23 19:08:27 +03:00
Aliaksandr Valialkin ee98c9419f Keep zero-length buffers in the pool 2016-06-23 17:43:05 +03:00
Aliaksandr Valialkin 7e712dfeb6 Drop buffers with under-used capacity in order to reduce memory waste 2016-06-23 15:09:07 +03:00
Aliaksandr Valialkin 21bf76e6cc Initial implementation 2016-06-22 20:28:05 +03:00