|
|
|
|
|
by amluto
1138 days ago
|
|
If you are allocating zeroed space and then writing a whole page quickly, then you may well avoid a read. And doing this under extreme memory pressure will indeed cause the page to be written to disk while only partly written by user code, and it will need to be read back in. Reducing memory pressure is always good. I would expect quite a bit better performance if you actually write a entire pages using pwrite(2) or the io_uring equivalent, though. Messing with fallocate on a per-page basis is asking for trouble. It changes file metadata, and I expect that to hurt performance. |
|