diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 6553fca..b9b3b15 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1284,15 +1284,17 @@
 	  /* *INDENT-ON* */
 	}
 
+      uword default_hugepage_sz = clib_mem_get_default_hugepage_size ();
       /* *INDENT-OFF* */
       clib_bitmap_foreach (c, tm->cpu_socket_bitmap, (
         {
 	  clib_error_t *e;
-
+	  uword n_pages;
 	  vec_validate(mem_by_socket, c);
+	  n_pages = round_pow2 (mem_by_socket[c], default_hugepage_sz);
+	  n_pages /= default_hugepage_sz;
 
-	  e = clib_sysfs_prealloc_hugepages(c, 0, mem_by_socket[c] / 2);
-	  if (e)
+	  if ((e = clib_sysfs_prealloc_hugepages(c, 0, n_pages)))
 	    clib_error_report (e);
       }));
       /* *INDENT-ON* */
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 2fbda96..6a551ec 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -46,6 +46,41 @@
 #define F_SEAL_WRITE    0x0008	/* prevent writes */
 #endif
 
+
+uword
+clib_mem_get_page_size (void)
+{
+  return getpagesize ();
+}
+
+uword
+clib_mem_get_default_hugepage_size (void)
+{
+  unformat_input_t input;
+  static u32 size = 0;
+  int fd;
+
+  if (size)
+    goto done;
+
+  if ((fd = open ("/proc/meminfo", 0)) == -1)
+    return 0;
+
+  unformat_init_clib_file (&input, fd);
+
+  while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (&input, "Hugepagesize:%_%u kB", &size))
+	;
+      else
+	unformat_skip_line (&input);
+    }
+  unformat_free (&input);
+  close (fd);
+done:
+  return 1024ULL * size;
+}
+
 u64
 clib_mem_vm_get_page_size (int fd)
 {
diff --git a/src/vppinfra/linux/sysfs.c b/src/vppinfra/linux/sysfs.c
index 199e6bb..c45897f 100644
--- a/src/vppinfra/linux/sysfs.c
+++ b/src/vppinfra/linux/sysfs.c
@@ -22,8 +22,6 @@
 #include <fcntl.h>
 #include <dirent.h>
 
-#define DEFAULT_HUGETLB_SIZE 2048
-
 clib_error_t *
 clib_sysfs_write (char *file_name, char *fmt, ...)
 {
@@ -121,8 +119,12 @@
   clib_error_t *error = 0;
   struct stat sb;
   u8 *p = 0;
-  int page_size = log2_page_size ? 1ULL << (log2_page_size - 10) :
-    DEFAULT_HUGETLB_SIZE;
+  uword page_size;
+
+  if (log2_page_size == 0)
+    log2_page_size = min_log2 (clib_mem_get_default_hugepage_size ());
+
+  page_size = 1ULL << (log2_page_size - 10);
 
   p = format (p, "/sys/devices/system/node/node%u%c", numa_node, 0);
 
@@ -168,8 +170,14 @@
   clib_error_t *error = 0;
   struct stat sb;
   u8 *p = 0;
-  int page_size = log2_page_size ? 1ULL << (log2_page_size - 10) :
-    DEFAULT_HUGETLB_SIZE;
+
+  uword page_size;
+
+  if (log2_page_size == 0)
+    log2_page_size = min_log2 (clib_mem_get_default_hugepage_size ());
+
+  page_size = 1ULL << (log2_page_size - 10);
+
 
   p = format (p, "/sys/devices/system/node/node%u%c", numa_node, 0);
 
@@ -232,8 +240,13 @@
 {
   clib_error_t *error = 0;
   int n, needed;
-  int page_size = log2_page_size ? 1ULL << (log2_page_size - 10) :
-    DEFAULT_HUGETLB_SIZE;
+  uword page_size;
+
+  if (log2_page_size == 0)
+    log2_page_size = min_log2 (clib_mem_get_default_hugepage_size ());
+
+  page_size = 1ULL << (log2_page_size - 10);
+
   error = clib_sysfs_get_free_hugepages (numa_node, log2_page_size, &n);
   if (error)
     return error;
diff --git a/src/vppinfra/mem.h b/src/vppinfra/mem.h
index 04c26d2..813ff6c 100644
--- a/src/vppinfra/mem.h
+++ b/src/vppinfra/mem.h
@@ -390,6 +390,7 @@
 clib_error_t *clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a);
 void clib_mem_vm_ext_free (clib_mem_vm_alloc_t * a);
 u64 clib_mem_vm_get_page_size (int fd);
+uword clib_mem_get_default_hugepage_size (void);
 int clib_mem_vm_get_log2_page_size (int fd);
 u64 *clib_mem_vm_get_paddr (void *mem, int log2_page_size, int n_pages);
 
diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c
index 6268709..e83e0e8 100644
--- a/src/vppinfra/mem_dlmalloc.c
+++ b/src/vppinfra/mem_dlmalloc.c
@@ -229,33 +229,6 @@
   return clib_mem_init (memory, memory_size);
 }
 
-#ifdef CLIB_LINUX_KERNEL
-#include <asm/page.h>
-
-uword
-clib_mem_get_page_size (void)
-{
-  return PAGE_SIZE;
-}
-#endif
-
-#ifdef CLIB_UNIX
-uword
-clib_mem_get_page_size (void)
-{
-  return getpagesize ();
-}
-#endif
-
-/* Make a guess for standalone. */
-#ifdef CLIB_STANDALONE
-uword
-clib_mem_get_page_size (void)
-{
-  return 4096;
-}
-#endif
-
 u8 *
 format_clib_mem_usage (u8 * s, va_list * va)
 {
diff --git a/src/vppinfra/mem_mheap.c b/src/vppinfra/mem_mheap.c
index f3387b7..4077bf2 100644
--- a/src/vppinfra/mem_mheap.c
+++ b/src/vppinfra/mem_mheap.c
@@ -114,33 +114,6 @@
   return heap;
 }
 
-#ifdef CLIB_LINUX_KERNEL
-#include <asm/page.h>
-
-uword
-clib_mem_get_page_size (void)
-{
-  return PAGE_SIZE;
-}
-#endif
-
-#ifdef CLIB_UNIX
-uword
-clib_mem_get_page_size (void)
-{
-  return getpagesize ();
-}
-#endif
-
-/* Make a guess for standalone. */
-#ifdef CLIB_STANDALONE
-uword
-clib_mem_get_page_size (void)
-{
-  return 4096;
-}
-#endif
-
 u8 *
 format_clib_mem_usage (u8 * s, va_list * va)
 {
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c
index 0f9df9c..a8b47d7 100644
--- a/src/vppinfra/pmalloc.c
+++ b/src/vppinfra/pmalloc.c
@@ -55,26 +55,12 @@
 int
 clib_pmalloc_init (clib_pmalloc_main_t * pm, uword size)
 {
-  struct stat st;
   uword off, pagesize;
-  int fd;
 
   ASSERT (pm->error == 0);
 
-  pm->log2_page_sz = 21;
-  pm->error = clib_mem_create_hugetlb_fd ("detect_hugepage_size", &fd);
-
-  if (pm->error)
-    return -1;
-
-  if (fd != -1)
-    {
-      if (fstat (fd, &st) == -1)
-	pm->log2_page_sz = min_log2 (st.st_blksize);
-      close (fd);
-    }
-
-  pagesize = 1ULL << pm->log2_page_sz;
+  pagesize = clib_mem_get_default_hugepage_size ();
+  pm->log2_page_sz = min_log2 (pagesize);
 
   size = size ? size : ((u64) DEFAULT_RESERVED_MB) << 20;
   size = round_pow2 (size, pagesize);
