Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Bump series cache default size
Browse files Browse the repository at this point in the history
This means less re-allocations and
less evictions when cache needs to grow.
Promscale memory usage on start
will increase from 120MB to 360MB.
  • Loading branch information
niksajakovljevic committed Dec 7, 2022
1 parent ed2303c commit 73ec0bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/pgmodel/cache/series_cache.go
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/timescale/promscale/pkg/prompb"
)

// this seems like a good initial size for /active/ series. Takes about 32MB
const DefaultSeriesCacheSize = 250000
// this seems like a good default size for /active/ series. This results in Promscale using around 360MB on start.
const DefaultSeriesCacheSize = 1000000

const growCheckDuration = time.Second * 5 // check whether to grow the series cache this often
const growFactor = float64(2.0) // multiply cache size by this factor when growing the cache
Expand Down

0 comments on commit 73ec0bc

Please sign in to comment.