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 99DE7CF9 for ; Mon, 10 Aug 2015 13:02:23 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 10 Aug 2015 04:02:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,644,1432623600"; d="scan'208";a="780406795" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.159]) by fmsmga002.fm.intel.com with SMTP; 10 Aug 2015 04:02:08 -0700 Received: by (sSMTP sendmail emulation); Mon, 10 Aug 2015 12:02:07 +0025 Date: Mon, 10 Aug 2015 12:02:07 +0100 From: Bruce Richardson To: Gopakumar Choorakkot Edakkunni Message-ID: <20150810110207.GA1100@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Performance of rte_ring APIs 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: Mon, 10 Aug 2015 11:02:24 -0000 On Fri, Aug 07, 2015 at 10:07:07AM -0700, Gopakumar Choorakkot Edakkunni wrote: > Hi All, > > I have an extremely simple test - I have just one single DPDK EAL > thread which pulls packets from one 10G port and just puts the packet > exactly as is (no changes) on another 10G port - I get 9.5million pps, > so far so good. So its like this > > dpdk_rx > dpdk_tx > > 9.5 Millionpps > > Now I do the below and the performance comes down to like 4 Million > pps, less than half ! > > dpdk_rx > rte_ring_mc_dequeue_bulk(my_ring1, my_array, nb_rx) > dpdk_tx > rte_ring_mp_enqueue_bulk(my_ring1, my_array, nb_rx) > > Note that I do nothing with the things I dequeue from the ring, I just > enqueue it back. So is there any gotchas in using these rings ? I am > sure I am missing something, it cant drop from 9.5Mpps to 4Mpps just > because of a dequeue/enqueue ? > You are using the multi-producer and multi-consumer ring functions, which tend to be much more expensive than the single producer single consumer function. Depending on the contention on those rings, performance can vary considerably in your application. /Bruce