Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
hoppp
12 months ago
|
parent
|
context
|
favorite
| on:
SQLite (with WAL) doesn't do `fsync` on each commi...
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
12 months ago
|
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.
dgshsg
12 months ago
|
parent
|
next
[–]
You still need to wait for it to complete to report the commit success to the user, the cost of syscall itself is rather minor here.
senderista
12 months ago
|
root
|
parent
|
next
[–]
Avoiding the syscall cost is about maximizing throughput, not minimizing latency. The media's time-to-durability is what it is.
mxey
12 months ago
|
prev
|
next
[–]
It’s slow because it forces a write to disk. I don’t think the syscall itself matters much.
praptak
12 months ago
|
prev
[–]
That's why big DBs do group commits, trading latency for throughput.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Its an extra syscall. It depends on the use-case if its needed or not