Re: Very low write throughput on file opened with O_SYNC/O_DSYNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/17/20 8:49 AM, Dmitry Shulyak wrote:
> With 48 threads i am getting 200 mb/s, about the same with 48 separate
> uring instances.
> With single uring instance (or with shared pool) - 60 mb/s.
> fs - ext4, device - ssd.

You could try something like this kernel addition:

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 4b102d9ad846..8909a1d37801 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1152,7 +1152,7 @@ static void io_prep_async_work(struct io_kiocb *req)
 	io_req_init_async(req);
 
 	if (req->flags & REQ_F_ISREG) {
-		if (def->hash_reg_file)
+		if (def->hash_reg_file && !(req->flags & REQ_F_FORCE_ASYNC))
 			io_wq_hash_work(&req->work, file_inode(req->file));
 	} else {
 		if (def->unbound_nonreg_file)

and then set IOSQE_IO_ASYNC on your writes. That'll parallelize them in
terms of execution.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux