From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 61095271 for ; Mon, 18 Dec 2017 12:27:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2017 03:27:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,421,1508828400"; d="scan'208";a="187963642" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.5.162]) ([10.252.5.162]) by fmsmga006.fm.intel.com with ESMTP; 18 Dec 2017 03:27:04 -0800 To: liupan1234 , "dev@dpdk.org" References: <7accecd7.4d04.1605841acbf.Coremail.liupan1234@163.com> From: "Burakov, Anatoly" Message-ID: <0685d96e-1370-1d50-d47d-2208f8eadbad@intel.com> Date: Mon, 18 Dec 2017 11:27:03 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <7accecd7.4d04.1605841acbf.Coremail.liupan1234@163.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] shared memory statistic 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, 18 Dec 2017 11:27:06 -0000 On 15-Dec-17 3:39 AM, liupan1234 wrote: > Hi all, > > > I have an urgent question: > > > 1) when an app runs, how to get the really memory it used in real time? for example, it use -m param to specify 1G memory, but it only used 500 MB, how to get this info > 2) When several apps runs with shared memory: shm 0, is there any method to get the memory used info for each process? > > > Thanks > Pan > For 1, i'm assuming you mean "how much of allocated memory is in use by DPDK". I don't think there is a unified API to do that, the closest you can get is check heap statistics (since all DPDK memory allocation is done through rte_malloc one way or another) and, check them against physical memory layout (available via rte_eal_get_physmem_layout()), which will give you a list of all memsegs DPDK currently has allocated. For question 2, DPDK processes share all memory with each other, so there isn't any way to tell which process owns which memory. -- Thanks, Anatoly