-
Notifications
You must be signed in to change notification settings - Fork 236
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
Disk Persistence: call fsync every time? #267
Comments
@Steamgjk NuRaft/include/libnuraft/log_store.hxx Line 86 in 789cc75
|
@greensky00 While your are generating the bench result, are you doing fsync every time? [I guess you are not doing fsync either, because the latency will be millsecond-level with fsync every time] |
@Steamgjk The purpose of benchmark test is to measure the pure performance of NuRaft as mentioned here The reason why is the performance of log store and state machine will vary greatly according to their implementation and many others. But these are not the performance of NuRaft -- NuRaft provides "interface" only. |
Hi, @greensky00
In the implementation of Nuraft, does it call fsync everytime it persists the log, or it just flushes to the OS?
Last time while I was playing with Nuraft, under a low load, the latency is only about ~400us.
But today I made a microbench test of fsync on my VM, the median latency is about 2ms for each completion of fsync. This makes me suspect that Nuraft does not call fsync for each request, so I wan to confirm it with you: As a follower, when it replies to the leader's append action, does it call fsync every time, or it has other batching design? [You know, in Diego's ATC paper, it requires the replica to persist the log everytime before replying to the Append RPC]
The text was updated successfully, but these errors were encountered: