-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
RFC: skip persisting no side effect log entries in WAL #5912
Comments
@mitake my only concern with this patch is the
and let etcdserver set |
Actually for l-read, there is a better way to do it. We already implemented the l-read feature inside raft, so that it does not need to hit disk at all. I am not sure if we really need this for other kinds of readonly requests. Even if we need, we could use similar approach. See #5193 for more details. |
@heyitsanthony yes, lettinng etcd server judge about the side effect of entries would be safer. I agree. @xiang90 IIUC, the recent l-read improvement is throughput oriented (Section 6.4 of the dissertation). Of course it will improve the read throughput but it would add latency to the request and in the worst case the latency is the heartbeat interval (100ms default and shouldn't be so short for avoiding frequent elections). On the other hand, skipping persistence does not introduce the additional latency cost. Of course I'm not against the l-read improvement and understand my approach should be analyzed carefully for ensuring that it preserves the safety properties. And I will not be surprised even if the analysis concludes that the way isn't safe ;) |
Maybe we should ask about this idea on the raft-dev mailing list? Someone else might try this kind of idea in the past and have experience. |
@mitake Sure. Probably you want to ask this in the mailing list. |
@xiang90 yes, I'll post to the mailing list and cc you people. |
closing this in favor of #6212. |
Hi,
I'm trying to implement an idea about skipping persisting no side effect log entries in WAL. Because of the persistence process, linearizable range requests of current etcd incurs disk write. I think persisting log entries that do not have side effect is not required because replaying the entries during recovery means nothing.
The most straightforward way for reducing the overhead is removing the entries from the log. However, it produces holes in the log and it goes against the design of Raft and make the recovery process very complicated. So I tried to implement the idea with this way:
It would produce batched write and I'm not sure it is enough light always. But having threshold would solve this problem.
The change affects the core part of Raft and is breaking some unit tests for now. However, as I show in the below, performance improvement is significant (more than 20x). So I'd like to hear opinions from other developers whether this change is worth to be tried seriously or not. I'm still not sure that the idea violates the design principles of Raft and etcd. The correct implementation seems to be possible but I cannot say there's no critical pitfalls yet (e.g. managing HardState will be tricky).
Current very rough draft is here: https://github.com/mitake/etcd/tree/skip-persist-in-wal
Below is the performance comparison:
The text was updated successfully, but these errors were encountered: