DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jastrzebski, MichalX K" <michalx.k.jastrzebski@intel.com>
To: Neil Horman <nhorman@tuxdriver.com>,
	"Wodkowski, PawelX" <pawelx.wodkowski@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application
Date: Fri, 20 Feb 2015 15:46:29 +0000	[thread overview]
Message-ID: <60ABE07DBB3A454EB7FAD707B4BB1582138EB174@IRSMSX109.ger.corp.intel.com> (raw)
In-Reply-To: <20150219143334.GH24069@hmsreliant.think-freely.org>

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman
> Sent: Thursday, February 19, 2015 3:34 PM
> To: Wodkowski, PawelX
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and
> example application
> 
> On Thu, Feb 19, 2015 at 01:18:41PM +0100, Pawel Wodkowski wrote:
> > Hi community,
> > I would like to introduce library for measuring load of some arbitrary jobs.
> It
> > can be used to profile every kind of job sets on any arbitrary execution unit
> or
> > tasking library.
> >
> > In provided l2fwd-headroom example I demonstrate how to use this library
> to
> > select optimal rx burst poll time. Jobs are selected by using existing
> rte_timer
> > library calls. This example does no limit possible schemes on which this
> library
> > can be used.
> >
> > PATCH v5 changes:
> >  - Fix spelling and checkpatch.pl errors.
> >  - Add maintainer claim for library and example app.
> >
> > PATCH v4 changes:
> >  - use proper branch for generating patch.
> >
> > PATCH v3 changes:
> >  - Fix spelling.
> >
> > PATCH v2 changes:
> >  - Remove jobs management/callback from library to not duplicate tasking
> library
> >    behaviour.
> >  - Cleenup/remove useless statistics.
> >  - Rework example application to use rte_timer library for jobs selection.
> >  - Introduce new app parameter '-l' for automatic thousands separating in
> stats.
> >  - More readable statistics format.
> >
> >
> >
> > Pawel Wodkowski (3):
> >   librte_headroom: New library for checking core/system/app load
> >   examples: introduce new l2fwd-headroom example
> >   MAINTAINERS: claim responsibility for headroom library and example app
> >
> >  MAINTAINERS                                  |    4 +
> >  config/common_bsdapp                         |    5 +
> >  config/common_linuxapp                       |    5 +
> >  examples/Makefile                            |    1 +
> >  examples/l2fwd-headroom/Makefile             |   51 ++
> >  examples/l2fwd-headroom/main.c               | 1040
> ++++++++++++++++++++++++++
> >  lib/Makefile                                 |    1 +
> >  lib/librte_headroom/Makefile                 |   54 ++
> >  lib/librte_headroom/rte_headroom.c           |  271 +++++++
> >  lib/librte_headroom/rte_headroom.h           |  324 ++++++++
> >  lib/librte_headroom/rte_headroom_version.map |   19 +
> >  mk/rte.app.mk                                |    4 +
> >  12 files changed, 1779 insertions(+)
> >  create mode 100644 examples/l2fwd-headroom/Makefile
> >  create mode 100644 examples/l2fwd-headroom/main.c
> >  create mode 100644 lib/librte_headroom/Makefile
> >  create mode 100644 lib/librte_headroom/rte_headroom.c
> >  create mode 100644 lib/librte_headroom/rte_headroom.h
> >  create mode 100644 lib/librte_headroom/rte_headroom_version.map
> >
> > --
> > 1.9.1
> >
> >
> I'm sorry but I still fail to see how this is a particularly useful library.  It
> clearly works fine, but it composes an application event loop in its own
> terms,
> and measures stats based on that.  While thats ok, any application is already
> going to have to write its own event loop, and can makethe same
> measurements
> synchnously within that loop, using alot less code to optimize its polling time.
> 
> In other words, I think this is one of those cases where this library is
> probably somewhat useful for anyone who just wants to write an application
> in
> terms the semantics exposed by this library, but not at all useful for anyone
> else.  I'd personally rather not have the extra code to maintain here.
> 
> Stephen just gave a presentation at netdev about some of the performance
> optimization measurements Brocade did with DPDK and how they fine tuned
> their
> environment.  One of the big take aways for me was that making time based
> measurements (especially if it was using the tsc), created cpu stalls that
> skewed the measurements, and so the best optimizations they made avoided
> time
> measurements, opting instead for packet count metrics.
> 
> Neil

Hi Neil,

I think this library offers something quite useful probably not for everyone, 
but for many people that use DPDK, and it is measuring quite accurately,
how many spare cycles a CPU have after executing any serial tasks (as you will know). 
If you look at two places in example application: main_loop()
and l2fwd_fwd() functions, you will see two possible approach there, but
this is not limited to that. You can even nest headroom objects and measure
process time of particular packets type.
Of course, this will add an overhead due to the measurements, 
but that time is also measured, so any user can know what is the relative
time "wasted" for measuring all this.
If time delays are measured in bigger timestamps, are handled reliably, 
the cost of measuring will be low.    
I find this quite similar to the power library case. I would say that library is not useful
for every application, but there are several cases where it can be 
(as demonstrated with l3fwd-power app).

About your last bit, not sure if I understood it right, but in case of the included sample app,
the main measurement to see if we are overusing a CPU is the packet count
in a queue (in this case RX queue), and I believe this should be used for other apps,
especially in those that use a pipeline model, where queues and rings are the key part.

As a final point, last week (12th of February), there was a request for a tool/library like this
from a user in the mailing list (Ilan Borenshtein), which indicates that this would be useful
(probably not just for him, but for others). It probably could be achieved by the user
by adding their own code, but I believe this library would be a good-to-have,
in case a user is looking for an easy way to calculate the exposed above.
Let us give the users an example of this method and we will expand it with more 
advanced application that may show capabilities of dynamic load scaling based on headroom library measurement.

Best regards
Michal

  reply	other threads:[~2015-02-20 15:46 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 11:50 [dpdk-dev] [PATCH 0/2] " Pawel Wodkowski
2015-01-29 11:50 ` [dpdk-dev] [PATCH 1/2] librte_headroom: New library for checking core/system/app load Pawel Wodkowski
2015-01-29 11:50 ` [dpdk-dev] [PATCH 2/2] examples: introduce new l2fwd-headroom example Pawel Wodkowski
2015-01-29 13:25 ` [dpdk-dev] [PATCH 0/2] new headroom stats library and example application Neil Horman
2015-01-29 17:10   ` Wodkowski, PawelX
2015-01-29 19:13     ` Neil Horman
2015-01-30 10:47       ` Wodkowski, PawelX
2015-01-30 18:02         ` Neil Horman
2015-02-17 15:37 ` [dpdk-dev] [PATCH v2 " Pawel Wodkowski
2015-02-17 15:37   ` [dpdk-dev] [PATCH v2 1/2] librte_headroom: New library for checking core/system/app load Pawel Wodkowski
2015-02-17 15:37   ` [dpdk-dev] [PATCH v2 2/2] examples: introduce new l2fwd-headroom example Pawel Wodkowski
2015-02-17 16:19   ` [dpdk-dev] [PATCH v3 0/2] new headroom stats library and example application Pawel Wodkowski
2015-02-17 16:19     ` [dpdk-dev] [PATCH v3 1/2] pmd: enable DCB in SRIOV Pawel Wodkowski
2015-02-17 16:19     ` [dpdk-dev] [PATCH v3 2/2] tespmd: fix DCB in SRIOV mode support Pawel Wodkowski
2015-02-17 16:33     ` [dpdk-dev] [PATCH v3 0/2] new headroom stats library and example application Wodkowski, PawelX
2015-02-17 16:42     ` [dpdk-dev] [PATCH v4 " Pawel Wodkowski
2015-02-17 16:42       ` [dpdk-dev] [PATCH v4 1/2] librte_headroom: New library for checking core/system/app load Pawel Wodkowski
2015-02-18 13:36         ` De Lara Guarch, Pablo
2015-02-17 16:42       ` [dpdk-dev] [PATCH v4 2/2] examples: introduce new l2fwd-headroom example Pawel Wodkowski
2015-02-18 13:41         ` De Lara Guarch, Pablo
2015-02-19 12:18       ` [dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application Pawel Wodkowski
2015-02-19 12:18         ` [dpdk-dev] [PATCH v5 1/3] librte_headroom: New library for checking core/system/app load Pawel Wodkowski
2015-02-24  1:55           ` Thomas Monjalon
2015-02-19 12:18         ` [dpdk-dev] [PATCH v5 2/3] examples: introduce new l2fwd-headroom example Pawel Wodkowski
2015-02-19 12:18         ` [dpdk-dev] [PATCH v5 3/3] MAINTAINERS: claim responsibility for headroom library and example app Pawel Wodkowski
2015-02-19 14:33         ` [dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application Neil Horman
2015-02-20 15:46           ` Jastrzebski, MichalX K [this message]
2015-02-23 11:45             ` Thomas Monjalon
2015-02-23 14:36               ` Jastrzebski, MichalX K
2015-02-23 14:46                 ` Thomas Monjalon
2015-02-23 15:55                   ` Jastrzebski, MichalX K
2015-02-23 16:04                     ` Thomas Monjalon
2015-02-24  8:44                       ` Pawel Wodkowski
2015-02-24  9:49                   ` Jastrzebski, MichalX K
2015-02-24 10:00                     ` Thomas Monjalon
2015-02-24 10:05                       ` Wodkowski, PawelX
2015-02-24 10:53                       ` Wodkowski, PawelX
2015-02-24 16:33         ` [dpdk-dev] [PATCH v6 0/3] new rte_jobstats " Pawel Wodkowski
2015-02-24 16:33           ` [dpdk-dev] [PATCH v6 1/3] librte_jobstats: New library for checking core/system/app load Pawel Wodkowski
2015-02-24 21:18             ` Thomas Monjalon
2015-02-24 16:33           ` [dpdk-dev] [PATCH v6 2/3] examples: introduce new l2fwd-jobstats example Pawel Wodkowski
2015-02-24 19:10             ` De Lara Guarch, Pablo
2015-02-24 19:16               ` De Lara Guarch, Pablo
2015-02-24 20:08                 ` Thomas Monjalon
2015-02-24 21:19             ` Thomas Monjalon
2015-02-24 16:33           ` [dpdk-dev] [PATCH v6 3/3] MAINTAINERS: claim responsibility for rte_jobstats library and example app Pawel Wodkowski
2015-02-24 20:34           ` [dpdk-dev] [PATCH v6 0/3] new rte_jobstats library and example application De Lara Guarch, Pablo
2015-02-24 21:25             ` Thomas Monjalon

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=60ABE07DBB3A454EB7FAD707B4BB1582138EB174@IRSMSX109.ger.corp.intel.com \
    --to=michalx.k.jastrzebski@intel.com \
    --cc=dev@dpdk.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pawelx.wodkowski@intel.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;
as well as URLs for NNTP newsgroup(s).