From 7bbd26c64a1dd7dcf7fc98971032a5bfbd686bc6 Mon Sep 17 00:00:00 2001
From: PiBa-NL
Date: Thu, 13 Mar 2014 16:45:59 +0100
Subject: haproxy-devel, corrections for memory requirements and link to
'System Tunables' for high connection counts.
---
config/haproxy-devel/haproxy_global.php | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/config/haproxy-devel/haproxy_global.php b/config/haproxy-devel/haproxy_global.php
index 8264558f..c860fa38 100755
--- a/config/haproxy-devel/haproxy_global.php
+++ b/config/haproxy-devel/haproxy_global.php
@@ -199,11 +199,17 @@ function enable_change(enable_change) {
Sets the maximum per-process number of concurrent connections to X.
NOTE: setting this value too high will result in HAProxy not being able to allocate enough memory.
+
Current memory usage: {$memusage} K.
";
+ echo "Current memory usage: {$memusage} kB.
";
?>
+ Current 'System Tunables' settings.
+ 'kern.maxfiles': =`sysctl kern.maxfiles | awk '{ print $2 }'`?>
+ 'kern.maxfilesperproc': =`sysctl kern.maxfilesperproc | awk '{ print $2 }'`?>
+
+ Full memory usage will only show after all connections have actually been used.
@@ -216,23 +222,29 @@ function enable_change(enable_change) {
- 999 |
- 1888K |
+ 1 |
+ 50 kB |
- 99999 |
- 8032K |
+ 1.000 |
+ 48 MB |
- 999999 |
- 50016K |
+ 10.000 |
+ 488 MB |
- 9999999 |
- 467M |
+ 100.000 |
+ 4,8 GB |
+
+
+ Calculated for plain HTTP connections, using ssl offloading will increase this. |
|
+ When setting a high amount of allowed simultaneous connections you will need to add and or increase the following two 'System Tunables' kern.maxfiles and kern.maxfilesperproc.
+ For HAProxy alone set these to at least the number of allowed connections * 2 + 31. So for 100.000 connections these need to be 200.031 or more to avoid trouble, take into account that handles are also used by other processes when setting kern.maxfiles.
+
--
cgit v1.2.3