From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 649667D30 for ; Mon, 19 Feb 2018 22:12:35 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 07D1820C87; Mon, 19 Feb 2018 16:12:35 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 19 Feb 2018 16:12:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=cKsbEMuf/uqjqut6SVvgHEv6EI 9VCOhK3JhqLoXItAc=; b=nEKTn8V3d2q0ZqVxlhdnETpOFvLCDckfzfZk/AtN2x 1r7bmhbWWJvnwgLbgLpe2enfbTfCHlto6hMIDwqhUulcDdspEa64K8Fd6tZR0/WG XPbNjCcOnsJ0cozCJAM5POakJhiQD678dHeNlqGhdcdO/r3Zf3VCoGloCUWQ8C0p k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cKsbEM uf/uqjqut6SVvgHEv6EI9VCOhK3JhqLoXItAc=; b=hF2/s4i2DfTYnIRBzip4yU He+fIhnbZoJFdWKqfJqAiFRNpGFZ91+YWxwTndvANSHzLPqV48Ks87NHM38eQA+s xR+eCDsuHZfID1saVvyzf3acomjJPQMMp23SWznG3rRyKi/ghWXpeD4G9i+B+7XS tNo/mZTmtM9FiVE01+CoTw1cgD5skm5+QNf3/q+Ptvfl6YxKo+PTzMYrY4uDuWls 6eXiIeZcNoBjdZTqYmem3ollj8lFfDjzWfYMR3Z9tOT/PdM7OlAsX7U59jtKg5wg 9dardAG4YUgm578enLQJR+TUFuy7um8u5NtMzLSC1AJ4sy1niEyekhSObjPXJQvA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id AB0937E279; Mon, 19 Feb 2018 16:12:34 -0500 (EST) From: Thomas Monjalon To: Jasvinder Singh , cristian.dumitrescu@intel.com Cc: dev@dpdk.org Date: Mon, 19 Feb 2018 22:12:15 +0100 Message-ID: <1538626.jQhP2Ch2ao@xps> In-Reply-To: <20180108154356.44765-1-jasvinder.singh@intel.com> References: <20180108100044.38368-2-jasvinder.singh@intel.com> <20180108154356.44765-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] lib/librte_meter: add meter configuration profile X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 21:12:35 -0000 08/01/2018 16:43, Jasvinder Singh: > From: Cristian Dumitrescu > > This patch adds support for meter configuration profiles. > Benefits: simplified configuration procedure, improved performance. > > Q1: What is the configuration profile and why does it make sense? > A1: The configuration profile represents the set of configuration > parameters for a given meter object, such as the rates and sizes for > the token buckets. The configuration profile concept makes sense when > many meter objects share the same configuration, which is the typical > usage model: thousands of traffic flows are each individually metered > according to just a few service levels (i.e. profiles). > > Q2: How is the configuration profile improving the performance? > A2: The performance improvement is achieved by reducing the memory > footprint of a meter object, which results in better cache utilization > for the typical case when large arrays of meter objects are used. The > internal data structures stored for each meter object contain: > a) Constant fields: Low level translation of the configuration > parameters that does not change post-configuration. This is > really duplicated for all meters that use the same > configuration. This is the configuration profile data that is > moved away from the meter object. Current size (implementation > dependent): srTCM = 32 bytes, trTCM = 32 bytes. > b) Variable fields: Time stamps and running counters that change > during the on-going traffic metering process. Current size > (implementation dependant): srTCM = 24 bytes, trTCM = 32 bytes. > Therefore, by moving the constant fields to a separate profile > data structure shared by all the meters with the same > configuration, the size of the meter object is reduced by ~50%. > > Signed-off-by: Cristian Dumitrescu > Signed-off-by: Jasvinder Singh Applied for 18.05 (was postponed to preserve 18.02 ABI), thanks.