io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Shulyak <yashulyak@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org
Subject: Re: Very low write throughput on file opened with O_SYNC/O_DSYNC
Date: Fri, 21 Aug 2020 16:43:43 +0300	[thread overview]
Message-ID: <CAF-ewDoqyx5knsnd_qgfRXE+CxK==PO1zF+RE=oEuv9NQq+48g@mail.gmail.com> (raw)
In-Reply-To: <CAF-ewDrW-7hRuQ1QkNzJVbBWM5U4cTMi1reB=e=-dTuh8WymMg@mail.gmail.com>

noticed that i made a mistake in c reproducer. it doesn't reap
completelitions correctly, but it was still sufficient to reproduce
the problem.
the idea is to submit writes at the high rate, waiting only when
necessary and at the end.

anyway, i am not so interested in making it work on my computer but
rather would like to ask, what are your thoughts about serializing
writes in the kernel?
it looks like that sometimes it is strictly worse and might be a
problem for integrations into the runtimes (e.g. libuv, nodejs,
golang). at the same time it is very easy to
serialize in user space if necessary.

On Wed, 19 Aug 2020 at 10:55, Dmitry Shulyak <yashulyak@gmail.com> wrote:
>
> reproducer with liburing -
> https://github.com/dshulyak/liburing/blob/async-repro/test/async-repro.c
> i am using self-written library in golang for interacting with uring,
> but i can reproduce the same issue with that snippet consistently.
>
> On Tue, 18 Aug 2020 at 19:42, Jens Axboe <axboe@kernel.dk> wrote:
> >
> > On 8/18/20 9:09 AM, Dmitry Shulyak wrote:
> > > 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.
> >
> > Do you have a reproducer I can run? Curious what that CPU spin is,
> > that obviously shouldn't happen.
> >
> > --
> > Jens Axboe
> >

      reply	other threads:[~2020-08-21 13:47 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
2020-08-18 16:42         ` Jens Axboe
2020-08-19  7:55           ` Dmitry Shulyak
2020-08-21 13:43             ` Dmitry Shulyak [this message]

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-ewDoqyx5knsnd_qgfRXE+CxK==PO1zF+RE=oEuv9NQq+48g@mail.gmail.com' \
    --to=yashulyak@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).