From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f176.google.com (mail-qt0-f176.google.com [209.85.216.176]) by dpdk.org (Postfix) with ESMTP id 618E91B67E for ; Sun, 24 Dec 2017 11:53:42 +0100 (CET) Received: by mail-qt0-f176.google.com with SMTP id g10so40782282qtj.12 for ; Sun, 24 Dec 2017 02:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=DAsCU7Gl0ydvPSdn5iytGfKi5iQMZEEoaomWeVEs0bY=; b=nT2DvzGcZ0q7CHcmEctP9HMdPaZt9722qtZjFk2VixqheRRyQg4fQ8T5dMOFKyF6gK zb5zfOjXmu7T8Wzw0Ne3giwBWr3L3+6lbuapYJXIbh8oqEI9R4eQoVQ+5IJOwChITmS4 WmPG+bn87Dsl+5VKmW/gcy9ET1iBs/iYvJuspO1F51/8X6x2TiQhxxdYyQxrRdWSWLSZ VX/C83B6PyYXE6/CQmqBF36e2wMsVxP7Whhi7EJkP3r0P3v5dmqdV1GLGLwxqE2Cl8nX IqnlwGF0YgX0UafdqpxmxZRWYGPaHMgmvxNFC1ly9SqMWsJamiDIKahUZyuUtq3PP1zZ AD5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=DAsCU7Gl0ydvPSdn5iytGfKi5iQMZEEoaomWeVEs0bY=; b=e1kYiBlJjKgCcFQyx8lR8fsfk1uOcopFbItg53okOHQk5hJ6YCZenfkl0pVGcozsLg 0WYrIBJQQR9rjkjXFlnDP8Y9udKeilk5RYcf1D7vAanUSIx5tPLgLtEzMvn5gUrE10m3 mutAbbSKidtSrsrXd+xxyscIQT2KH9DoN6ERfE5wL3/aOzIXf+lPOrBFmwO0rEx+3+mI pifWbkRKsFbJkbQNc9DPUr3JyH8n+Ix7bc4bFsC228VVYR8SCXz0P8IV+Qf1yqbnOTn7 kLK7hyT8wREzWqQbwKdRV3tZi6UhM0mqoSVDfCBxffy/Oytds3Db5K9l1wtn5n5v+gnO gtAQ== X-Gm-Message-State: AKGB3mIOMKJb8Jq+sWjyZMTjwO9hCDB3YA4PFlXfhMOiwYXSXhhZB7JS aM/ADnGbzGhUdG6zwDgJvsvIMS8cKyS0pV+pI15+Ww== X-Google-Smtp-Source: ACJfBougo2gli5UhYfvw/C4bHX+zqB0KyOg0JQMlnGYchF0iXmznT1jX2j/d5NUuSQnnHyrYrHXPsc4vZpnHaEO8+cM= X-Received: by 10.200.50.116 with SMTP id y49mr27156052qta.10.1514112821679; Sun, 24 Dec 2017 02:53:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.104.161 with HTTP; Sun, 24 Dec 2017 02:53:11 -0800 (PST) In-Reply-To: References: From: James Bensley Date: Sun, 24 Dec 2017 10:53:11 +0000 Message-ID: To: gyp sud , users@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-users] No free hugepages reported in hugepages when running DPDK helloworld example 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: Sun, 24 Dec 2017 10:53:42 -0000 On 23 December 2017 at 21:44, gyp sud wrote: > I downloaded and built dpdk-stable-16.11.4 version (using > x86_64-native-linuxapp-gcc target). I'm running Ubuntu 16.04.3 LTS. > After setting up hugepages according to http://dpdk.org/doc/quick-start or > http://dpdk.org/doc/guides-16.04/linux_gsg/sys_reqs.html > > mkdir -p /mnt/huge > mount -t hugetlbfs nodev /mnt/huge > echo 64 > > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages > > I can see the hugepages fine. > > #cat /proc/meminfo | grep > HugeAnonHugePages: 284672 kB > ShmemHugePages: 0 kB > HugePages_Total: 64 > HugePages_Free: 64 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > But when I run the helloWorld example, it complained about no free > hugepages, see below. > > #./build/helloworld -l 0-3 -n 2 > EAL: Detected 4 lcore(s) > EAL: No free hugepages reported in hugepages-1048576kB > EAL: Probing VFIO support... > hello from core 1 > hello from core 2 > hello from core 3 > hello from core 0 > > Also, the memory info showed free hugepages were all gone. > #cat /proc/meminfo | grep Huge > AnonHugePages: 380928 kB > ShmemHugePages: 0 kB > HugePages_Total: 64 > HugePages_Free: 0 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > Any idea why this is happening? > > Gyp Note the size of the HugePages in the EAL output "hugepages-1048576kB", you allocated 2MB HugePages, this message is about 1G HugePages. 1GB HugePages can only be allocated at boot up. It's "OK" though, 1GB HugePages aren't required, as you saw the application used the 2GB HugePages you allocated. For some applications and workloads that require lots of memory fewer 1GB pages can have a performance increase over more smaller 2MB HugePages. Obviously it goes without saying it's usually best to install the most recent DPDK version and check the most recent documentation URL, here you will find info about setting up 1GB HugePages if you want to do that: dpdk.org/doc/guides/linux_gsg/sys_reqs.html Cheers, James.