▲ | hoppp 4 days ago | ||||||||||||||||
Calling fsync on each commit makes it slower, doesn't it? Its an extra syscall. It depends on the use-case if its needed or not | |||||||||||||||||
▲ | senderista 3 days ago | parent | next [-] | ||||||||||||||||
You can enqueue fsync as an op in io_uring, using link flag to sequence it after previous ops and drain flag to ensure no new ops are started until it completes. | |||||||||||||||||
| |||||||||||||||||
▲ | mxey 3 days ago | parent | prev | next [-] | ||||||||||||||||
It’s slow because it forces a write to disk. I don’t think the syscall itself matters much. | |||||||||||||||||
▲ | praptak 4 days ago | parent | prev [-] | ||||||||||||||||
That's why big DBs do group commits, trading latency for throughput. |