Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1476 from grafana/lower-chunk-cache-default
Browse files Browse the repository at this point in the history
lower default max chunk cache size to 512MB
  • Loading branch information
Dieterbe authored Sep 25, 2019
2 parents c6b8b70 + 25d4050 commit a96c912
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docker/docker-chaos/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-cluster-query/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-cluster/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-dev-custom-cfg-kafka/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ buffer-size = 20000

```
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912
```

## http api ##
Expand Down
4 changes: 2 additions & 2 deletions mdata/cache/ccache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var (

func init() {
flags := flag.NewFlagSet("chunk-cache", flag.ExitOnError)
// (1024 ^ 3) * 4 = 4294967296 = 4G
flags.Uint64Var(&maxSize, "max-size", 4294967296, "Maximum size of chunk cache in bytes. 0 disables cache")
// 512 MB = (1024 ^ 2) * 512 = 536870912
flags.Uint64Var(&maxSize, "max-size", 536870912, "Maximum size of chunk cache in bytes. 0 disables cache")
globalconf.Register("chunk-cache", flags, flag.ExitOnError)
}

Expand Down
4 changes: 2 additions & 2 deletions metrictank-sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions scripts/config/metrictank-docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down
4 changes: 2 additions & 2 deletions scripts/config/metrictank-package.ini
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ buffer-size = 20000

## chunk cache ##
[chunk-cache]
# maximum size of chunk cache in bytes. (1024 ^ 3) * 4 = 4294967296 = 4G
# maximum size of chunk cache in bytes. 512 MB = (1024 ^ 2) * 512 = 536870912
# 0 disables cache
max-size = 4294967296
max-size = 536870912

## http api ##
[http]
Expand Down

0 comments on commit a96c912

Please sign in to comment.