diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 7cf66ee..c23e4c0 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -74,6 +74,11 @@
     }
   else
     {
+      u32 rx_fifo_size, tx_fifo_size, rx_rounded_data_size,
+	tx_rounded_data_size;
+      u32 approx_segment_count;
+      u64 approx_total_size;
+
       ca->segment_name = "process-private-segment";
       ca->segment_size = ~0;
       ca->rx_fifo_size = sm->properties->rx_fifo_size;
@@ -82,6 +87,36 @@
       ca->private_segment_count = sm->properties->private_segment_count;
       ca->private_segment_size = sm->properties->private_segment_size;
 
+      /* Default to a small private segment */
+      if (ca->private_segment_size == 0)
+	ca->private_segment_size = 128 << 20;
+
+      /* Calculate space requirements */
+      rx_rounded_data_size = (1 << (max_log2 (ca->rx_fifo_size)));
+      tx_rounded_data_size = (1 << (max_log2 (ca->tx_fifo_size)));
+
+      rx_fifo_size = sizeof (svm_fifo_t) + rx_rounded_data_size;
+      tx_fifo_size = sizeof (svm_fifo_t) + tx_rounded_data_size;
+
+      approx_total_size = (u64) ca->preallocated_fifo_pairs
+	* (rx_fifo_size + tx_fifo_size);
+      approx_segment_count =
+	(approx_total_size +
+	 (ca->private_segment_size - 1)) / (u64) ca->private_segment_size;
+
+      /* The user asked us to figure it out... */
+      if (ca->private_segment_count == 0)
+	{
+	  ca->private_segment_count = approx_segment_count;
+	}
+      /* Follow directions, but issue a warning */
+      else if (approx_segment_count != ca->private_segment_count)
+	{
+	  clib_warning
+	    ("Honoring segment count %u, but calculated count was %u",
+	     ca->private_segment_count, approx_segment_count);
+	}
+
       if (svm_fifo_segment_create_process_private (ca))
 	clib_warning ("Failed to create process private segment");
 
@@ -503,7 +538,9 @@
   u8 show_segments = 0, verbose = 0, *name;
   uword address;
   u64 size;
-  u32 fifos;
+  u32 active_fifos;
+  u32 free_fifos;
+
   mheap_t *heap_header;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -536,8 +573,8 @@
       segments = svm_fifo_segment_segments_pool ();
       vlib_cli_output (vm, "%d svm fifo segments allocated",
 		       pool_elts (segments));
-      vlib_cli_output (vm, "%-20s%=12s%=12s%=15s", "Name", "Size (M)",
-		       "Fifos", "Address");
+      vlib_cli_output (vm, "%-20s%=12s%=16s%=16s%=16s", "Name",
+		       "HeapSize (M)", "ActiveFifos", "FreeFifos", "Address");
 
       /* *INDENT-OFF* */
       pool_foreach (seg, segments, ({
@@ -557,9 +594,14 @@
 	    size = seg->ssvm.ssvm_size;
 	    name = seg->ssvm.sh->name;
 	  }
-	fifos = svm_fifo_segment_num_fifos (seg);
-	vlib_cli_output (vm, "%-20s%=12u%=12u%=15x", name, size << 20, fifos,
+	active_fifos = svm_fifo_segment_num_fifos (seg);
+        free_fifos = svm_fifo_segment_num_free_fifos (seg, ~0 /* size */);
+	vlib_cli_output (vm, "%-20v%=16llu%=16u%=16u%16llx",
+                         name, size >> 20ULL, active_fifos, free_fifos,
 			 address);
+        if (verbose)
+          vlib_cli_output (vm, "%U",
+                           format_svm_fifo_segment, seg, verbose);
 	if (seg->h->flags & FIFO_SEGMENT_F_IS_PRIVATE)
 	  vec_free (name);
       }));
@@ -573,7 +615,7 @@
 VLIB_CLI_COMMAND (segment_manager_show_command, static) =
 {
   .path = "show segment-manager",
-  .short_help = "show segment-manager [segments]",
+  .short_help = "show segment-manager [segments][verbose]",
   .function = segment_manager_show_fn,
 };
 /* *INDENT-ON* */
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c
index 44b1f70..94e6b4a 100644
--- a/src/vnet/tcp/builtin_client.c
+++ b/src/vnet/tcp/builtin_client.c
@@ -563,12 +563,14 @@
       else if (unformat (input, "private-segment-count %d",
 			 &tm->private_segment_count))
 	;
-      else if (unformat (input, "private-segment-size %dm", &tmp))
-	tm->private_segment_size = tmp << 20;
-      else if (unformat (input, "private-segment-size %dg", &tmp))
-	tm->private_segment_size = tmp << 30;
-      else if (unformat (input, "private-segment-size %d", &tmp))
-	tm->private_segment_size = tmp;
+      else if (unformat (input, "private-segment-size %U",
+			 unformat_memory_size, &tmp))
+	{
+	  if (tmp >= 0x100000000ULL)
+	    return clib_error_return
+	      (0, "private segment size %lld (%llu) too large", tmp, tmp);
+	  tm->private_segment_size = tmp;
+	}
       else if (unformat (input, "preallocate-fifos"))
 	tm->prealloc_fifos = 1;
       else if (unformat (input, "preallocate-sessions"))
diff --git a/src/vnet/tcp/builtin_proxy.c b/src/vnet/tcp/builtin_proxy.c
index d8cfb11..91377e7 100644
--- a/src/vnet/tcp/builtin_proxy.c
+++ b/src/vnet/tcp/builtin_proxy.c
@@ -523,7 +523,7 @@
 {
   builtin_proxy_main_t *bpm = &builtin_proxy_main;
   int rv;
-  u32 tmp;
+  u64 tmp;
 
   bpm->fifo_size = 64 << 10;
   bpm->rcv_buffer_size = 1024;
@@ -542,12 +542,14 @@
       else if (unformat (input, "private-segment-count %d",
 			 &bpm->private_segment_count))
 	;
-      else if (unformat (input, "private-segment-size %dm", &tmp))
-	bpm->private_segment_size = tmp << 20;
-      else if (unformat (input, "private-segment-size %dg", &tmp))
-	bpm->private_segment_size = tmp << 30;
-      else if (unformat (input, "private-segment-size %d", &tmp))
-	bpm->private_segment_size = tmp;
+      else if (unformat (input, "private-segment-size %U",
+			 unformat_memory_size, &tmp))
+	{
+	  if (tmp >= 0x100000000ULL)
+	    return clib_error_return
+	      (0, "private segment size %lld (%llu) too large", tmp, tmp);
+	  bpm->private_segment_size = tmp;
+	}
       else
 	return clib_error_return (0, "unknown input `%U'",
 				  format_unformat_error, input);
diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c
index 295c189..9331452 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -369,7 +369,7 @@
   builtin_server_main_t *bsm = &builtin_server_main;
   u8 server_uri_set = 0;
   int rv;
-  u32 tmp;
+  u64 tmp;
 
   bsm->no_echo = 0;
   bsm->fifo_size = 64 << 10;
@@ -392,12 +392,14 @@
       else if (unformat (input, "private-segment-count %d",
 			 &bsm->private_segment_count))
 	;
-      else if (unformat (input, "private-segment-size %dm", &tmp))
-	bsm->private_segment_size = tmp << 20;
-      else if (unformat (input, "private-segment-size %dg", &tmp))
-	bsm->private_segment_size = tmp << 30;
-      else if (unformat (input, "private-segment-size %d", &tmp))
-	bsm->private_segment_size = tmp;
+      else if (unformat (input, "private-segment-size %U",
+			 unformat_memory_size, &tmp))
+	{
+	  if (tmp >= 0x100000000ULL)
+	    return clib_error_return
+	      (0, "private segment size %lld (%llu) too large", tmp, tmp);
+	  bsm->private_segment_size = tmp;
+	}
       else if (unformat (input, "uri %s", &bsm->server_uri))
 	server_uri_set = 1;
       else
