Junhua Zhang created RATIS-1545:
-----------------------------------
Summary: Raft log to can't be committed in log flush intervals
Key: RATIS-1545
URL: https://issues.apache.org/jira/browse/RATIS-1545
Project: Ratis
Issue Type: Improvement
Components: server
Affects Versions: 2.3.0
Reporter: Junhua Zhang
Attachments: image-2022-03-03-16-58-01-825.png
We previously tried to reduce disk IO by introducing a minimum interval between
flushes, the relevant pr is here: [https://github.com/apache/ratis/pull/611]
However, after subsequent tests, we found that the raft performance has
degraded, because {color:#ff0000}flushIfNecessary(){color} function does
{color:#ff0000}more operations{color} than just flushing the stream:
!image-2022-03-03-16-58-01-825.png|width=793,height=609!
Since we enforced the minimum time for each flush, the raft log to can't be
committed in flush intervals, which reduces the performance of raft.
So we want to {color:#FF0000}separate out.flush() from flushIfNecessary()
{color}and execute it asynchronously, so that the process of writing to disk
will not block the operation of other threads.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)