|
|
|
|
|
by quietbritishjim
337 days ago
|
|
Well, there already is slightly more fine gained control: in the sync version, you can perhaps call sync write() a few times before calling fsync() once i.e. basically batch up a few writes. That does have the disadvantage that you can't easily queue new writes while waiting for the previous ones. Perhaps you could use calls to write() in another thread while the first one is waiting for fsync() for the previous batch? You could even have lots of threads doing that in parallel, but probably not the thousands that you mentioned. I don't know the nitty gritty of Linux file IO well enough to know how well that would work. As I said, I don't know anything about fsync in io_uring. Maybe that has more control? An article that did a fair comparison, by someone who actually knows what they're talking about, would be pretty interesting. |
|
io_uring fsync has byte range support: https://man7.org/linux/man-pages/man2/io_uring_enter.2.html#...