public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dmitry Shulyak <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected]
Subject: Re: Very low write throughput on file opened with O_SYNC/O_DSYNC
Date: Tue, 18 Aug 2020 19:09:53 +0300	[thread overview]
Message-ID: <CAF-ewDqANgn-F=9bQiXZtLyPXOs2Dwi-CHS=80hXpiZYGrJjgg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

it worked, but there are some issues.
with o_dsync and even moderate submission rate threads are stuck in
some cpu task (99.9% cpu consumption), and make very slow progress.
have you expected it? it must be something specific to uring, i can't
reproduce this condition by writing from 2048 threads.




On Mon, 17 Aug 2020 at 19:17, Jens Axboe <[email protected]> wrote:
>
> 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
>

  reply	other threads:[~2020-08-18 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 11:46 Very low write throughput on file opened with O_SYNC/O_DSYNC Dmitry Shulyak
2020-08-17 11:58 ` Dmitry Shulyak
2020-08-17 14:29 ` Jens Axboe
2020-08-17 15:49   ` Dmitry Shulyak
2020-08-17 16:17     ` Jens Axboe
2020-08-18 16:09       ` Dmitry Shulyak [this message]
2020-08-18 16:42         ` Jens Axboe
2020-08-19  7:55           ` Dmitry Shulyak
2020-08-21 13:43             ` Dmitry Shulyak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF-ewDqANgn-F=9bQiXZtLyPXOs2Dwi-CHS=80hXpiZYGrJjgg@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox