All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Allen Hubbe" <Allen.Hubbe@dell.com>
To: 'Dave Jiang' <dave.jiang@intel.com>,
	'Karl Kao' <karl.kao@tintri.com>,
	'linux-ntb' <linux-ntb@googlegroups.com>
Subject: RE: Misleading throughput number using ntb_perf with memcpy_toio()
Date: Thu, 2 Nov 2017 14:46:38 -0400	[thread overview]
Message-ID: <000001d3540a$ed21fc70$c765f550$@dell.com> (raw)
In-Reply-To: <64a2604c-e675-ffbf-abc9-d6c5365eb45b@intel.com>

From: Dave Jiang
> On 11/02/2017 11:33 AM, Karl Kao wrote:
> > Hi Folks,
> >
> > We have one system with PLX NTB enabled with Gen3 speed on x8 lanes
> > width. Technically, the NTB bandwidth is 64 Gbit/s (8192 MBytes/s) in
> > outbound direction to its peer on this system.
> > The ntb_perf comes with the throughput number of 9147 MBytes/s which is
> > misleading in comparison to hardware bandwidth of 8192 MBytes/s.
> >
> > We have a few questions with regard to the misleading throughput number.
> > The overall is when memcpy() returns, data may have not yet been put in
> > ingress buffer inside PLX NTB which is constrained by flow control
> > credits, limitation of 8192 Mbytes/s.
> >
> >   * The ntb_perf moves memory block to IO bus, using memcpy_toio(), a
> >     macro of memcpy(). Once cpu core is done with mov instructions, the
> >     memcpy() returns. Is this statement accurate?
> >   * At the point when memcpy() is done with mov instructions, would the
> >     data had been moved to internal buffer inside processor, instead of
> >     going through IO bus into PLX chip?
> >   * Where is the buffer, IIO buffer? What's buffer size that can
> >     accommodate gigabytes data?
> >   * Once we are clearer about the memcpy_tpio, would there be any API
> >     that can accurately measure the IO write throughput?
> >
> >
> > [11:02][root@BRYCE2-DEV][/sys/kernel/debug/ntb_perf/0000:06:00.0]\> cat run
> > 0: copied 4294967296 bytes in 469542 usecs, 9147 MBytes/s
> > [11:03][root@BRYCE2-DEV][/sys/kernel/debug/ntb_perf/0000:06:00.0]\>
> 
> 
> Hi Karl. Yes the issue with ntb_perf is that it blindly copies into the
> memory window with no acknowledgement from the peer node. So the
> performance can be somewhat misleading because you don't know if it has
> made it completely to the other side. The only way to know for certain
> everything has made it over is to do a small read at the end of the
> write I think?

Or, a warm-up phase to fill up write queues, before the measured phase of the throughput test?

We don't need to know that it made it to the other side.  That would be needed for latency, but for throughput we only care about the rate it was transmitted even if it takes a long time to arrive.


  reply	other threads:[~2017-11-02 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 18:33 Misleading throughput number using ntb_perf with memcpy_toio() Karl Kao
2017-11-02 18:39 ` Dave Jiang
2017-11-02 18:46   ` Allen Hubbe [this message]
2017-11-02 18:48   ` Karl Kao
2017-11-02 19:34     ` Dave Jiang
2017-11-02 20:27       ` Karl Kao

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='000001d3540a$ed21fc70$c765f550$@dell.com' \
    --to=allen.hubbe@dell.com \
    --cc=dave.jiang@intel.com \
    --cc=karl.kao@tintri.com \
    --cc=linux-ntb@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.