Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configure Pebble cache size #353

Merged
merged 3 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/server/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"oxia/cmd/flag"
"oxia/common"
"oxia/server"
"oxia/server/kv"
"time"
)

Expand All @@ -41,7 +42,8 @@ func init() {
Cmd.Flags().StringVar(&conf.DataDir, "data-dir", "./data/db", "Directory where to store data")
Cmd.Flags().StringVar(&conf.WalDir, "wal-dir", "./data/wal", "Directory for write-ahead-logs")
Cmd.Flags().DurationVar(&conf.WalRetentionTime, "wal-retention-time", 1*time.Hour, "Retention time for the entries in the write-ahead-log")
Cmd.Flags().DurationVar(&conf.NotificationsRetentionTime, "notifications-retention-time", 1*time.Hour, "Retention time for the db notifications to clients")
Cmd.Flags().Int64Var(&conf.DbBlockCacheMB, "db-cache-size-mb", kv.DefaultKVFactoryOptions.CacheSizeMB,
"Max size of the shared DB cache")
}

func exec(*cobra.Command, []string) {
Expand Down
3 changes: 3 additions & 0 deletions cmd/standalone/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"oxia/cmd/flag"
"oxia/common"
"oxia/server"
"oxia/server/kv"
"time"
)

Expand All @@ -42,6 +43,8 @@ func init() {
Cmd.Flags().StringVar(&conf.WalDir, "wal-dir", "./data/wal", "Directory for write-ahead-logs")
Cmd.Flags().DurationVar(&conf.WalRetentionTime, "wal-retention-time", 1*time.Hour, "Retention time for the entries in the write-ahead-log")
Cmd.Flags().DurationVar(&conf.NotificationsRetentionTime, "notifications-retention-time", 1*time.Hour, "Retention time for the db notifications to clients")
Cmd.Flags().Int64Var(&conf.DbBlockCacheMB, "db-cache-size-mb", kv.DefaultKVFactoryOptions.CacheSizeMB,
"Max size of the shared DB cache")
}

func exec(*cobra.Command, []string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ spec:
- "--log-json"
- "--data-dir=/data/db"
- "--wal-dir=/data/wal"
- "--db-cache-size-mb=512"
{{- if .Values.pprofEnabled }}
- "--profile"
{{- end}}
Expand Down
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ go 1.19
require (
github.com/bmizerany/perks v0.0.0-20230307044200-03f9df79da1e
github.com/cenkalti/backoff/v4 v4.2.0
github.com/cockroachdb/pebble v0.0.0-20230411220144-fa2c2ec6669a
github.com/cockroachdb/pebble v0.0.0-20230612185438-6f12cd7fc7e8
github.com/dgraph-io/ristretto v0.1.1
github.com/dustin/go-humanize v1.0.1
github.com/google/uuid v1.3.0
Expand All @@ -28,24 +28,24 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0
github.com/prometheus/client_golang v1.15.0
github.com/prometheus/client_golang v1.15.1
github.com/rs/zerolog v1.29.0
github.com/spf13/afero v1.9.5
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.2
github.com/tidwall/tinylru v1.1.0
github.com/tidwall/tinylru v1.2.1
github.com/zeebo/xxh3 v1.0.2
go.opentelemetry.io/otel v1.15.0-rc.2.0.20230420231439-002444a2e743
go.opentelemetry.io/otel/exporters/prometheus v0.38.0-rc.2.0.20230420231439-002444a2e743
go.opentelemetry.io/otel/metric v1.15.0-rc.2.0.20230420231439-002444a2e743
go.opentelemetry.io/otel/sdk/metric v0.38.0-rc.2.0.20230420231439-002444a2e743
go.uber.org/automaxprocs v1.5.2
go.uber.org/multierr v1.11.0
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
golang.org/x/net v0.9.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.7.0
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/net v0.10.0
golang.org/x/sync v0.2.0
golang.org/x/sys v0.9.0
golang.org/x/time v0.3.0
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
Expand All @@ -59,17 +59,17 @@ require (
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/errors v1.10.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.20.0 // indirect
github.com/getsentry/sentry-go v0.21.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
Expand All @@ -87,7 +87,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.4 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -102,9 +102,9 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -113,9 +113,9 @@ require (
go.opentelemetry.io/otel/sdk v1.15.0-rc.2 // indirect
go.opentelemetry.io/otel/trace v1.15.0-rc.2 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
Expand Down
Loading