From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id D82EA20F for ; Tue, 16 May 2017 18:30:49 +0200 (CEST) Received: by mail-pg0-f44.google.com with SMTP id u187so78827046pgb.0 for ; Tue, 16 May 2017 09:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Iwn2tCkfaW4W4Hw2NduGCgFaa73TKuBsavOYxbegBqI=; b=blTXyTxh1u3NBor7Jsqtw2Mb3lB7maInEQUQSrlC6zQoauaxKucidg8SnUVL9SuObv l0gPRL14PsPPrTKCQk+vnkMKCj9V7WY6uxL6vm6pPCntkQ6DIhZ/VMpP8Ms7RE341hOp /FVLtJgSdBqmUUInPaAjcbrlTExoaFSJzE5quPdzRXwiq7u0kz2BkbQfX4UikpV5ZmsM ITuc6gSNiielU20IDBflZWtIy0E/gimPgkx5niOE2oeEgoQBgU5getUoSQPL6EpH5FzH 3lrvxFwESYT2iiqZzA1FPUZ0FEAn4BpSNLTf30vO2Tp+kZOwFoJBGPvljFuEMAruiBoa t4Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iwn2tCkfaW4W4Hw2NduGCgFaa73TKuBsavOYxbegBqI=; b=bqm/anf+9ck1SjtYafhobc3pQhaKhMHJz3yweEgccnaC5tHKFeMpjcgGfH08+HHeZ5 XECiuMvO8kZTPyiJwEGeflQs+Cw3GzQxe5502pxVRYqiaT2JxBI+YRr2bVO8/sr9LDbO Sa9P+JUtI7ib6IIf1jGhz+ysyodIcB0R4L5+c7YvlK0xUPlksRxz6Yzb1uz1cz42tvL/ ALgxHmW1z09XuIFO30Q1JQPKJoOEdHAfTlUQ8sFKzcbdX2ux2IVzHJlsqLHkC2TJGk0n Gb/rHiLijA8c3yLCUpdAgMLMyJrOJBL7jpx8ZcXJwLlVS6Zi8+oYaN8ODxrBURM13GDF hMRw== X-Gm-Message-State: AODbwcBptwPK7+eSgxjufeZFvx8pfXvuiIMPRtkncurKdujJDsD5nCSe qa6ciXaHXfCCtg== X-Received: by 10.84.217.222 with SMTP id d30mr17314962plj.156.1494952249073; Tue, 16 May 2017 09:30:49 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id q9sm24339037pfg.77.2017.05.16.09.30.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 09:30:48 -0700 (PDT) Date: Tue, 16 May 2017 09:30:40 -0700 From: Stephen Hemminger To: Kumaraparameshwaran Rathnavel Cc: users@dpdk.org Message-ID: <20170516093040.44cc3e9e@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Memory Allocation X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 16:30:50 -0000 On Tue, 16 May 2017 21:44:46 +0530 Kumaraparameshwaran Rathnavel wrote: > Hi All, > > When I have a system with NUMA enabled and say my application is running one DPDK thread and I use that thread for the memory allocation will the memory be physically allocated during the access time or will the memory be allocated on the Node where the DPDK thread was initially running when the memory allocation functions was called. So threads accessing the memory locations from the other nodes remotely will suffer a degradation in performance. Please correct me if I am wrong. > > Thanking You, > Param. > > Most of the memory allocation mechansisms (malloc, mmap) in Linux are not NUMA aware. If you read the source (which is always the definitive place to look), for DPDK you will see that rte_malloc, rte_mempool, and other routines have option to take a NUMA node as argument. It is up to the application to determine what the "right" node is. Often it is the node where the hardware is located (for mbuf pools), or the node where the thread is running. But unless you lock the thread to a node, the scheduler is likely to move it around under load.