go.etcd.io/etcd@v3.3.27+incompatible/Documentation/benchmarks/etcd-2-2-0-rc-memory-benchmarks.md (about) 1 --- 2 title: Benchmarking etcd v2.2.0-rc-memory 3 --- 4 5 ## Physical machine 6 7 GCE n1-standard-2 machine type 8 9 - 1x dedicated local SSD mounted under /var/lib/etcd 10 - 1x dedicated slow disk for the OS 11 - 7.5 GB memory 12 - 2x CPUs 13 14 ## etcd 15 16 ``` 17 etcd Version: 2.2.0-rc.0+git 18 Git SHA: 103cb5c 19 Go Version: go1.5 20 Go OS/Arch: linux/amd64 21 ``` 22 23 ## Testing 24 25 Start 3-member etcd cluster, each of which uses 2 cores. 26 27 The length of key name is always 64 bytes, which is a reasonable length of average key bytes. 28 29 ## Memory Maximal Usage 30 31 - etcd may use maximal memory if one follower is dead and the leader keeps sending snapshots. 32 - `max RSS` is the maximal memory usage recorded in 3 runs. 33 34 | value bytes | key number | data size(MB) | max RSS(MB) | max RSS/data rate on leader | 35 |-------------|-------------|---------------|-------------|-----------------------------| 36 | 128 | 50000 | 6 | 433 | 72x | 37 | 128 | 100000 | 12 | 659 | 54x | 38 | 128 | 200000 | 24 | 1466 | 61x | 39 | 1024 | 50000 | 48 | 1253 | 26x | 40 | 1024 | 100000 | 96 | 2344 | 24x | 41 | 1024 | 200000 | 192 | 4361 | 22x | 42 43 ## Data Size Threshold 44 45 - When etcd reaches data size threshold, it may trigger leader election easily and drop part of proposals. 46 - For most cases, the etcd cluster should work smoothly if it doesn't hit the threshold. If it doesn't work well due to insufficient resources, decrease its data size. 47 48 | value bytes | key number limitation | suggested data size threshold(MB) | consumed RSS(MB) | 49 |-------------|-----------------------|-----------------------------------|------------------| 50 | 128 | 400K | 48 | 2400 | 51 | 1024 | 300K | 292 | 6500 |