mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Documentation: Improve quota example
Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
bdbb32dfe8
commit
beb194967e
@ -55,7 +55,7 @@ By default, `etcd` sets a conservative space quota suitable for most application
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# set a very small 16MB quota
|
# set a very small 16MB quota
|
||||||
$ etcd --quota-backend-bytes=16777216
|
$ etcd --quota-backend-bytes=$((16*1024*1024))
|
||||||
```
|
```
|
||||||
|
|
||||||
The space quota can be triggered with a loop:
|
The space quota can be triggered with a loop:
|
||||||
@ -81,10 +81,9 @@ Removing excessive keyspace data and defragmenting the backend database will put
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# get current revision
|
# get current revision
|
||||||
$ ETCDCTL_API=3 etcdctl --endpoints=:2379 endpoint status
|
$ rev=$(ETCDCTL_API=3 etcdctl --endpoints=:2379 endpoint status --write-out="json" | egrep -o '"revision":[0-9]*' | egrep -o '[0-9]*')
|
||||||
[{"Endpoint":"127.0.0.1:2379","Status":{"header":{"cluster_id":8925027824743593106,"member_id":13803658152347727308,"revision":1516,"raft_term":2},"version":"2.3.0+git","dbSize":17973248,"leader":13803658152347727308,"raftIndex":6359,"raftTerm":2}}]
|
|
||||||
# compact away all old revisions
|
# compact away all old revisions
|
||||||
$ ETCDCTL_API=3 etcdctl compact 1516
|
$ ETCDCTL_API=3 etdctl compact $rev
|
||||||
compacted revision 1516
|
compacted revision 1516
|
||||||
# defragment away excessive space
|
# defragment away excessive space
|
||||||
$ ETCDCTL_API=3 etcdctl defrag
|
$ ETCDCTL_API=3 etcdctl defrag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user