From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 89ADFAD8F for ; Fri, 20 Feb 2015 16:46:47 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 20 Feb 2015 07:46:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,615,1418112000"; d="scan'208";a="688418883" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga002.jf.intel.com with ESMTP; 20 Feb 2015 07:46:32 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 20 Feb 2015 15:46:29 +0000 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.103]) by irsmsx155.ger.corp.intel.com ([169.254.14.159]) with mapi id 14.03.0195.001; Fri, 20 Feb 2015 15:46:29 +0000 From: "Jastrzebski, MichalX K" To: Neil Horman , "Wodkowski, PawelX" Thread-Topic: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application Thread-Index: AQHQTFE89sKNNirwW0yb77uFABjvv5z5r4bQ Date: Fri, 20 Feb 2015 15:46:29 +0000 Message-ID: <60ABE07DBB3A454EB7FAD707B4BB1582138EB174@IRSMSX109.ger.corp.intel.com> References: <1424191340-26451-1-git-send-email-pawelx.wodkowski@intel.com> <1424348324-29932-1-git-send-email-pawelx.wodkowski@intel.com> <20150219143334.GH24069@hmsreliant.think-freely.org> In-Reply-To: <20150219143334.GH24069@hmsreliant.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 15:46:48 -0000 > -----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 >=20 > 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 executio= n unit > or > > tasking library. > > > > In provided l2fwd-headroom example I demonstrate how to use this librar= y > 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 thi= s > 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 taskin= g > library > > behaviour. > > - Cleenup/remove useless statistics. > > - Rework example application to use rte_timer library for jobs selecti= on. > > - 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 ap= p > > > > 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 libra= ry. 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 alr= eady > 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 pollin= g time. >=20 > 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 applicatio= n > in > terms the semantics exposed by this library, but not at all useful for an= yone > else. I'd personally rather not have the extra code to maintain here. >=20 > 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 tha= t > skewed the measurements, and so the best optimizations they made avoided > time > measurements, opting instead for packet count metrics. >=20 > Neil Hi Neil, I think this library offers something quite useful probably not for everyon= e,=20 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 w= ill know).=20 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,=20 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,=20 the cost of measuring will be low. =20 I find this quite similar to the power library case. I would say that libra= ry is not useful for every application, but there are several cases where it can be=20 (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 o= ther apps, especially in those that use a pipeline model, where queues and rings are t= he key part. As a final point, last week (12th of February), there was a request for a t= ool/library like this from a user in the mailing list (Ilan Borenshtein), which indicates that th= is 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-hav= e, 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=20 advanced application that may show capabilities of dynamic load scaling bas= ed on headroom library measurement. Best regards Michal