Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: alex.nlnnfn@gmail.com (Alex Nln)
Subject: coalescing in polling mode in 4.9
Date: Mon, 5 Feb 2018 19:55:26 -0800	[thread overview]
Message-ID: <20180205195526.ecef69fbc4a9550f221134be@gmail.com> (raw)
In-Reply-To: <20180205150253.GN24417@localhost.localdomain>

On Mon, 5 Feb 2018 08:02:53 -0700
Keith Busch <keith.busch@intel.com> wrote:

> On Fri, Feb 02, 2018@12:10:28AM -0800, Alex Nln wrote:
> > Enabling interrupt coalescing in nvme device, kernel 4.9 
> > significantly reduces performance when using polling mode.
> > When I enable coalescing, IOPS drops from 100K to 35K and 
> > latency jumps from 7 usec to 25 usec.
> > 
> > Shouldn't we expect performance boost in polling mode when
> > interrupt coalescing enabled? 
> > 
> > 
> > Device is Intel DC P3600
> 
> That's a pretty low latency for this device. Are you running reads to
> unmapped blocks?

These are synchronous sequential reads, random reads' latency is higher.

> 
> I've seen the phenomenom occur where higher coalescing settings worsens
> performance. That usually means the the polling thread exceeded its time:
> need_resched() returns true, so the tasks schedules out and relies on
> interrupts, which have been throttled. Maybe a hybrid polling would be
> better for this.
> 

It looks like the eventual call to need_resched() is a result of low performance.
When I set coalescing to 0x00FFFF there are about 160 nvme interrupts/sec, 
but ~35K IOPS, so clearly only a fractions of CQ entries are processed in 
interrupt context, most of the CQ entries still processed by polling.
Somehow device delays posting completion entries when coalescing is enabled.
Is it possible?

Thanks for help

      parent reply	other threads:[~2018-02-06  3:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  8:10 coalescing in polling mode in 4.9 Alex Nln
2018-02-05  0:15 ` Alex Nln
2018-02-05 14:40   ` Sagi Grimberg
2018-02-05 15:02 ` Keith Busch
2018-02-05 15:42   ` Nitesh
2018-02-06  5:39     ` Alex Nln
2018-02-09 22:37       ` Nitesh Shetty
2018-02-10 21:08         ` Alex Nln
2018-02-12 14:53           ` Keith Busch
2018-02-06 16:29     ` Keith Busch
2018-02-07  8:27       ` Nitesh
2018-02-06  3:55   ` Alex Nln [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=20180205195526.ecef69fbc4a9550f221134be@gmail.com \
    --to=alex.nlnnfn@gmail.com \
    /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