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

Update compression method and expose badger options #31

Merged
merged 47 commits into from
Jul 1, 2020

Conversation

a9kitkumarsinha
Copy link
Collaborator

@a9kitkumarsinha a9kitkumarsinha commented Jun 11, 2020

  1. Use zlip compression
  2. Expose badger options as
badger: 
  levelOneSize: 204800000
  maxLevels: 3
  syncWrites: false
  1. Add statsd metrics for
  • Keys addes
  • Keys deleted
  • Compaction latency
  • Delete key latency

@a9kitkumarsinha a9kitkumarsinha changed the title [DO NOT MERGE]revert changes for compression Update compression method and expose badger options Jun 29, 2020
internal/config/config.go Outdated Show resolved Hide resolved
internal/config/config.go Show resolved Hide resolved
internal/storage/compact/compact.go Show resolved Hide resolved
MaxTableSize *int64 `json:"maxTableSize" yaml:"maxTableSize" env:"MAXTABLESIZE"` // maximum size in bytes for each LSM table or file.
LevelOneSize *int64 `json:"levelOneSize" yaml:"levelOneSize" env:"LEVELONESIZE"` // maximum total size in bytes for Level 1. defaults to 1 Million
LevelSizeMultiplier *int `json:"levelSizeMultiplier" yaml:"levelSizeMultiplier" env:"LEVELSIZEMULTIPLIER"` // the ratio between the maximum sizes of contiguous levels in the LSM. defaults to 10
MaxLevels *int `json:"maxLevels" yaml:"maxLevels" env:"MAXLEVELS"` // maximum number of levels of compaction allowed in the LSM. defaults to 7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add something like

Defaults string `json:"defaults" yaml:"defaults" env:"DEFAULTS"`

which would essentially be one of 3 possible values badger, ingestion, storage and switch either badger.DefaultOptions(dir) or 2 other sets of constant values.

I know it's making it a bit specific for our use-cases, but I'd rather not loose the track of the tuned parameters we have and we can interate from here.

main.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kelindar kelindar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kelindar kelindar merged commit 4bd46c7 into master Jul 1, 2020
@kelindar kelindar deleted the revert-compaction branch July 1, 2020 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants