Replace pwrite with asynchronous write #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ASD uses synchronous reads/writes for IOs on disk/file devices.
During startup ASD creates a thread per storage backend. The thread
consumes a single ssd_write_buf from queue and issues a synchronous
write to disk. As a result, only a single write IO can be
outstanding at a time.
The size of the Q from which writer thread consumes writes is limited.
If the writer thread is not able to flush at the rate of client, ASD
start issuing OVERLOAD errors.
This is a first attempt to issue asynchronous writes to device, raising
the pull request just to get feedback. The work is not complete,
however I would like to get early review.
I have written a benchmark tool, which write 4096 sized objects with
various IO depths (from 1 to 128). It always fails with OVERLOAD error.
Besides, while the benchmark is running, IOSTAT reports only single
outstanding IO to disk.
The overload error is gone with the modified code and the IO
Request Q depth reported by IOSTAT is continuously more than 1.
The code change includes
Both the eventfds are registered with same poll.
thread per SSD for all writes
issues multiple writes in a single system call.
Signed-off-by: Prasad Joshi [email protected]