-
Given a cluster of three nodes, let's say we start two of them at the beginning. After loading several GiB keys, we start the third one. Based on the network monitoring log, I can see that leader sends its db to the new peer as a snapshot. However, I also monitored disk I/O, and I couldn't see the leader node read anything from the disk. Does the leader maintain the whole db in memory? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi, did you check the page cache in the leader? The leader reads the boltdb from disk and send it to follower. The boltdb is mmaped into memory. REF: etcd/server/etcdserver/snapshot_merge.go Line 38 in 60051be |
Beta Was this translation helpful? Give feedback.
Hi, did you check the page cache in the leader?
The leader reads the boltdb from disk and send it to follower. The boltdb is mmaped into memory.
If the file has page cache in kernel, I think there is not disk IO.
REF:
etcd/server/etcdserver/snapshot_merge.go
Line 38 in 60051be