trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: ram_cache size > 2GB
Date Thu, 16 Sep 2010 14:25:32 GMT
  Ok, looked at this, this is a bug in traffic_shell, see the patch 
below for a fix (I'll commit this today to trunk).

While I'm at it, with these large RAM caches, it's very important that 
you configure the kernel to handle a large number of mmap areas. The 
default (on linux) is only 64k, which is way too small. You can increase 
this, by adding something like this to /etc/sysctl.conf:

     vm.max_map_count = 2097152


without it, if I recall, we will fail miserably with something that 
looks like out of memory (we probably should find where this "breaks" 
and produce a better error message and suggest the sysctl above). We 
should probably have this in the FAQ as well.


Cheers,

-- leif

diff --git a/proxy/mgmt2/cli2/ShowCmd.cc b/proxy/mgmt2/cli2/ShowCmd.cc
index 4f1ba04..b2b7080 100644
--- a/proxy/mgmt2/cli2/ShowCmd.cc
+++ b/proxy/mgmt2/cli2/ShowCmd.cc
@@ -2694,8 +2694,8 @@ ShowCacheStats()
    Cli_Printf("Bytes Used --- %d GB\n", bytes_used / (1024 * 1024 * 1024));
    Cli_Printf("Cache Size --- %d GB\n", bytes_total / (1024 * 1024 * 
1024));
    Cli_Printf("--RAM Cache--\n");
-  Cli_Printf("Total Bytes -- %d\n", ram_cache_total_bytes);
-  Cli_Printf("Bytes Used --- %d\n", ram_cache_bytes_used);
+  Cli_Printf("Total Bytes -- %lld\n", ram_cache_total_bytes);
+  Cli_Printf("Bytes Used --- %lld\n", ram_cache_bytes_used);
    Cli_Printf("Hits --------- %d\n", ram_cache_hits);
    Cli_Printf("Misses ------- %d\n", ram_cache_misses);
    Cli_Printf("--Lookups--\n");


Mime
View raw message