cache: Increasing caching GC percent from 20 to 50. (#4041)

Previous value was set to avoid large cache value build
up but we can clearly see this can cause lots of GC
pauses which can lead to significant drop in performance.

Change this value to 50% and decrease the value to 25%
once the 75% cache size is used. To have a larger
window for GC pauses.

Another change is to only allow caching if a server has
more than 24GB of RAM instead of 8GB.
This commit is contained in:
Harshavardhana
2017-04-15 02:16:49 -07:00
committed by GitHub
parent 18bfe5cba6
commit 7765081db7
3 changed files with 37 additions and 26 deletions

View File

@@ -41,9 +41,8 @@ const (
// Uploads metadata file carries per multipart object metadata.
uploadsJSONFile = "uploads.json"
// Represents the minimum required RAM size before
// we enable caching.
minRAMSize = 8 * humanize.GiByte
// Represents the minimum required RAM size to enable caching.
minRAMSize = 24 * humanize.GiByte
// Maximum erasure blocks.
maxErasureBlocks = 16