Package: linux-2.6 Severity: wishlist Tags: patch This patch simply adds a new sysctl variable that enables better tuning of the lblc scheduler expiration algorithm. More details are available at http://kb.linuxvirtualserver.org/wiki/Talk:Locality-Based_Least-Connection_Scheduling
Thanks, Janusz -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (600, 'testing'), (300, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.17-2-vserver-686 Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
--- linux-source-2.6.15/include/net/ip_vs.h 2006-01-03 04:21:10.000000000 +0100 +++ linux-source-2.6.15-1-e50-debug_7bpo1.200604270947/include/net/ip_vs.h 2006-09-19 15:29:01.000000000 +0200 @@ -359,6 +359,7 @@ enum { NET_IPV4_VS_SYNC_THRESHOLD=24, NET_IPV4_VS_NAT_ICMP_SEND=25, NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26, + NET_IPV4_VS_LBLC_TIMEOUT=27, NET_IPV4_VS_LAST }; --- linux-source-2.6.15/net/ipv4/ipvs/ip_vs_lblc.c 2006-01-03 04:21:10.000000000 +0100 +++ linux-source-2.6.15-1-e50-debug_7bpo1.200604270947/net/ipv4/ipvs/ip_vs_lblc.c 2006-09-19 16:37:29.000000000 +0200 @@ -57,6 +57,7 @@ */ #define CHECK_EXPIRE_INTERVAL (60*HZ) #define ENTRY_TIMEOUT (6*60*HZ) +static int sysctl_ip_vs_lblc_timeout = ENTRY_TIMEOUT; /* * It is for full expiration check. @@ -118,6 +119,14 @@ static ctl_table vs_vars_table[] = { .mode = 0644, .proc_handler = &proc_dointvec_jiffies, }, + { + .ctl_name = NET_IPV4_VS_LBLC_TIMEOUT, + .procname = "lblc_timeout", + .data = &sysctl_ip_vs_lblc_timeout, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_jiffies, + }, { .ctl_name = 0 } }; @@ -367,7 +376,7 @@ static void ip_vs_lblc_check_expire(unsi write_lock(&tbl->lock); list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { - if (time_before(now, en->lastuse + ENTRY_TIMEOUT)) + if (time_before(now, en->lastuse + sysctl_ip_vs_lblc_timeout)) continue; ip_vs_lblc_free(en);