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

--nosync development flag #11930

Closed
crawshaw opened this issue May 21, 2020 · 1 comment · Fixed by #11946
Closed

--nosync development flag #11930

crawshaw opened this issue May 21, 2020 · 1 comment · Fixed by #11946

Comments

@crawshaw
Copy link
Contributor

Background

I regularly spin up a single-node etcd in unit tests and read/write many keys. Experiments with tmpfs on linux suggest that most of the time in my tests is spent writing to disk. Unfortunately macOS does not have a tmpfs, and standard dev/CI environments do not have one configured so typically the tests are slow, dominated by ephemeral etcd writes.

Proposal

Add an unsafe --nosync flag to etcd that disables fsync.

The implementation is straightforward as the underlying bbolt already exposes options for this, NoSync and NoFreelistSync, it's a matter of plumbing them through.

I would be happy to implement this if the idea is generally acceptable.

@gyuho
Copy link
Contributor

gyuho commented May 21, 2020

implementation is straightforward as the underlying bbolt already exposes options for this, NoSync

Yeah think it can be exposed as an unsafe option --unsafe-no-sync?

etcd also writes WAL (no option to disable).

crawshaw added a commit to crawshaw/etcd that referenced this issue May 25, 2020
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
crawshaw added a commit to crawshaw/etcd that referenced this issue May 25, 2020
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
crawshaw added a commit to crawshaw/etcd that referenced this issue May 25, 2020
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
jpbetz pushed a commit to jpbetz/etcd that referenced this issue Jun 5, 2020
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
jpbetz pushed a commit to jpbetz/etcd that referenced this issue Jun 5, 2020
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants