From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16FD9A04C1; Thu, 21 Nov 2019 22:25:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E01872BAE; Thu, 21 Nov 2019 22:25:06 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 0166691 for ; Thu, 21 Nov 2019 22:25:04 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9397F22B3E; Thu, 21 Nov 2019 16:25:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 21 Nov 2019 16:25:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=ZHd14zF5RtXOCGTJgc/9NEB8lJwDzl5AxX2G7IS5dGg=; b=J3/hYAtGSxM7 GTUpQCbG5g0EWyDWeYzKdn4KSvF04d/EVJJyPILk6aQbCkN3tPAVBMJhn3ZOxxP2 bX9gXVLQz94Ug3QSD5ZyImVoC+w4NenSZ+WeyhMLg3TZwQP1lxnwvcNEEzsloSga kf8Wo0x9BsCnsNpeBKM++UxXnC8lRi0= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ZHd14zF5RtXOCGTJgc/9NEB8lJwDzl5AxX2G7IS5d Gg=; b=cinbTS4sESPlxMRxbVYlHVTwaoKB1Rx3dBHxj8Z0oQZB6SvAAdywct1CP XrMvxOS6Gl1YMlySXiOoQON8jMqbEYu1Z1DgEjWS7C2mjWsA438G+UsNIPia/cTu /qasZcL+dfahaU61qmvZKw+RVHpCwuMko9uQ8kQs/ZAeqx7A7wqPeD0HV2l4st5Q bB354IFKauWlD5phUND7rSvAqRV/snL8CRTDur8ojJox7e+ug1tJNnquhKCjvAxr k8sOLoHXZimbZfNw6FVutJegFL5M3ckyiw75+d53lXKxJ56eNV4BE0uIGWGs7mbN PcEoDyoHgCrqpBqjv7V+gAGl4Rn8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudehvddgudehtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefgedrvddtfedrudekgeen ucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth enucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 11E9C80064; Thu, 21 Nov 2019 16:25:02 -0500 (EST) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, ferruh.yigit@intel.com, Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Date: Thu, 21 Nov 2019 22:25:01 +0100 Message-ID: <16929516.SoWFOtNGnN@xps> In-Reply-To: <20191121151256.20613-1-david.marchand@redhat.com> References: <20191121151256.20613-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: reduce memory consumption 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/11/2019 16:12, David Marchand: > Following [1], testpmd memory consumption has skyrocketted. > The rte_port structure has gotten quite fat. > > struct rte_port { > [...] > struct rte_eth_rxconf rx_conf[65536]; /* 266280 3145728 */ > /* --- cacheline 53312 boundary (3411968 bytes) was 40 bytes ago --- */ > struct rte_eth_txconf tx_conf[65536]; /* 3412008 3670016 */ > /* --- cacheline 110656 boundary (7081984 bytes) was 40 bytes ago --- */ > [...] > /* size: 8654936, cachelines: 135234, members: 31 */ > [...] > > testpmd handles RTE_MAX_ETHPORTS ports (32 by default) which means that it > needs ~256MB just for this internal representation. > > The reason is that a testpmd rte_port (the name is quite confusing, as > it is a local type) maintains configurations for all queues of a port. > But where you would expect testpmd to use RTE_MAX_QUEUES_PER_PORT as the > maximum queue count, the rte_port uses MAX_QUEUE_ID set to 64k. > > Prefer the ethdev maximum value. > > After this patch: > struct rte_port { > [...] > struct rte_eth_rxconf rx_conf[1025]; /* 8240 49200 */ > /* --- cacheline 897 boundary (57408 bytes) was 32 bytes ago --- */ > struct rte_eth_txconf tx_conf[1025]; /* 57440 57400 */ > /* --- cacheline 1794 boundary (114816 bytes) was 24 bytes ago --- */ > [...] > /* size: 139488, cachelines: 2180, members: 31 */ > [...] > > [1]: https://git.dpdk.org/dpdk/commit/?id=436b3a6b6e62 > > Signed-off-by: David Marchand Acked-by: Thomas Monjalon I was really concerned by the memory requirement increase due to my patch on ethdev structs. Thank you for finding these giant arrays.