<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://kb.linux-vs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jkrzyszt</id>
		<title>LVSKB - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://kb.linux-vs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jkrzyszt"/>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki/Special:Contributions/Jkrzyszt"/>
		<updated>2026-05-30T05:21:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3763</id>
		<title>Talk:Locality-Based Least-Connection Scheduling</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3763"/>
				<updated>2006-09-23T17:50:38Z</updated>
		
		<summary type="html">&lt;p&gt;Jkrzyszt: /* Expiration algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expiration algorithm==&lt;br /&gt;
I find it usefull for understanding why subsequent connections to the same destination IP address may not follow the same path.&lt;br /&gt;
 ServerNode[] is a list of maps from destination IP address to server;&lt;br /&gt;
 C(ServerNode[]) is the current number of not NULL maps in the list;&lt;br /&gt;
 Now is the current system time;&lt;br /&gt;
 net.ipv4.vs.lblc_expiration is the sysctl parameter (default 24 hours).&lt;br /&gt;
Every 1 minute:&lt;br /&gt;
 Count = C(ServerNode[]);&lt;br /&gt;
 if (Count &amp;gt; 16384) then {&lt;br /&gt;
   for (dest_ip = 0.0.0.0;&lt;br /&gt;
        C(ServerNode[]) &amp;gt; min((Count-16384)*4/3, 8192);&lt;br /&gt;
        dest_ip++) {&lt;br /&gt;
     if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
         ServerNode[dest_ip].lastuse &amp;lt; Now - 6 minutes) then&lt;br /&gt;
       ServerNode[dest_ip].server = NULL;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
Every 30 minutes:&lt;br /&gt;
 for (dest_ip = 0.0.0.0; dest_ip &amp;lt; 255.255.255.255; dest_ip++) {&lt;br /&gt;
    if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
        ServerNode[dest_ip].lastuse &amp;lt; Now - net.ipv4.vs.lblc_expiration) then&lt;br /&gt;
      ServerNode[dest_ip].server = NULL;&lt;br /&gt;
 }&lt;br /&gt;
Please correct me if I am wrong.&lt;br /&gt;
:[[User:Jkrzyszt|Jkrzyszt]] 02:31, 16 September 2006 (CST)&lt;br /&gt;
--------&lt;br /&gt;
When I started to use the lblc algorithm I found that it provides an extra feature&lt;br /&gt;
- some kind of connection persistance.&lt;br /&gt;
However, the expiration algorithm, as it is, does not take into account&lt;br /&gt;
if the destination map just to be removed is related to any active connections.&lt;br /&gt;
This way, connection persistance is not guaranteed, even with very high weights set.&lt;br /&gt;
&lt;br /&gt;
You may ask why not to use the persistance option.&lt;br /&gt;
Well, the lblc algorithm is designed to be used together with fwmark in transparent cache clusters.&lt;br /&gt;
If such a cluster is accessed through another proxy (that applies access control rules, for example),&lt;br /&gt;
using classical persistance solution is not an option&lt;br /&gt;
because all the traffic from this proxy would be directed to the same cache.&lt;br /&gt;
&lt;br /&gt;
I am going to investigate the sources if it would be possible to check for no active&lt;br /&gt;
(or maybe even inactive) conections using the specific map before it can be removed&lt;br /&gt;
from the list.&lt;br /&gt;
&lt;br /&gt;
I would appreciate any comments on this matter.&lt;br /&gt;
&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 22:20, 18 September 2006 (CST)&lt;br /&gt;
-----&lt;br /&gt;
I found it much simpler to expose an additional sysctl variable&lt;br /&gt;
and use it in place of the hardcoded ENTRY_TIMEOUT parameter.&lt;br /&gt;
 --- linux-source-2.6.15/include/net/ip_vs.h     2006-01-03 04:21:10.000000000 +0100&lt;br /&gt;
 +++ linux-source-2.6.15-1-e50-debug_7bpo1.200604270947/include/net/ip_vs.h     2006-09-19 15:29:01.000000000 +0200&lt;br /&gt;
 @@ -359,6 +359,7 @@&lt;br /&gt;
         NET_IPV4_VS_SYNC_THRESHOLD=24,&lt;br /&gt;
         NET_IPV4_VS_NAT_ICMP_SEND=25,&lt;br /&gt;
         NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26,&lt;br /&gt;
 +       NET_IPV4_VS_LBLC_TIMEOUT=27,&lt;br /&gt;
         NET_IPV4_VS_LAST&lt;br /&gt;
  };&lt;br /&gt;
 --- linux-source-2.6.15/net/ipv4/ipvs/ip_vs_lblc.c      2006-01-03 04:21:10.000000000 +0100&lt;br /&gt;
 +++ 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&lt;br /&gt;
 @@ -57,6 +57,7 @@&lt;br /&gt;
   */&lt;br /&gt;
  #define CHECK_EXPIRE_INTERVAL   (60*HZ)&lt;br /&gt;
  #define ENTRY_TIMEOUT           (6*60*HZ)&lt;br /&gt;
 +static int sysctl_ip_vs_lblc_timeout = ENTRY_TIMEOUT;&lt;br /&gt;
  &lt;br /&gt;
  /*&lt;br /&gt;
   *    It is for full expiration check.&lt;br /&gt;
 @@ -118,6 +119,14 @@&lt;br /&gt;
                 .mode           = 0644,&lt;br /&gt;
                 .proc_handler   = &amp;amp;proc_dointvec_jiffies,&lt;br /&gt;
         },&lt;br /&gt;
 +       {&lt;br /&gt;
 +               .ctl_name       = NET_IPV4_VS_LBLC_TIMEOUT,&lt;br /&gt;
 +               .procname       = &amp;quot;lblc_timeout&amp;quot;,&lt;br /&gt;
 +               .data           = &amp;amp;sysctl_ip_vs_lblc_timeout,&lt;br /&gt;
 +               .maxlen         = sizeof(int),&lt;br /&gt;
 +               .mode           = 0644,&lt;br /&gt;
 +               .proc_handler   = &amp;amp;proc_dointvec_jiffies,&lt;br /&gt;
 +       },&lt;br /&gt;
         { .ctl_name = 0 }&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
 @@ -367,7 +376,7 @@&lt;br /&gt;
  &lt;br /&gt;
                 write_lock(&amp;amp;tbl-&amp;gt;lock);&lt;br /&gt;
                 list_for_each_entry_safe(en, nxt, &amp;amp;tbl-&amp;gt;bucket[j], list) {&lt;br /&gt;
 -                       if (time_before(now, en-&amp;gt;lastuse + ENTRY_TIMEOUT))&lt;br /&gt;
 +                       if (time_before(now, en-&amp;gt;lastuse + sysctl_ip_vs_lblc_timeout))&lt;br /&gt;
                                 continue;&lt;br /&gt;
  &lt;br /&gt;
                         ip_vs_lblc_free(en);&lt;br /&gt;
Now I can tune the every minute expiration procedure to suit my needs.&lt;br /&gt;
Are there any chances for this modification to be included in the mainstream kernel?&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 22:48, 19 September 2006 (CST)&lt;br /&gt;
&lt;br /&gt;
: Thanks a lot for the patch, I'll try to include it in the mainstream kernel. --[[User:Wensong|Wensong]] 21:43, 23 September 2006 (CST)&lt;br /&gt;
-----&lt;br /&gt;
Fine. For your convenience, the raw patch is available [http://www.icnet.pl/download/ip_vs_lblc-timeout.patch here].&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 01:50, 24 September 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Jkrzyszt</name></author>	</entry>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3759</id>
		<title>Talk:Locality-Based Least-Connection Scheduling</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3759"/>
				<updated>2006-09-19T14:48:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jkrzyszt: /* Expiration algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expiration algorithm==&lt;br /&gt;
I find it usefull for understanding why subsequent connections to the same destination IP address may not follow the same path.&lt;br /&gt;
 ServerNode[] is a list of maps from destination IP address to server;&lt;br /&gt;
 C(ServerNode[]) is the current number of not NULL maps in the list;&lt;br /&gt;
 Now is the current system time;&lt;br /&gt;
 net.ipv4.vs.lblc_expiration is the sysctl parameter (default 24 hours).&lt;br /&gt;
Every 1 minute:&lt;br /&gt;
 Count = C(ServerNode[]);&lt;br /&gt;
 if (Count &amp;gt; 16384) then {&lt;br /&gt;
   for (dest_ip = 0.0.0.0;&lt;br /&gt;
        C(ServerNode[]) &amp;gt; min((Count-16384)*4/3, 8192);&lt;br /&gt;
        dest_ip++) {&lt;br /&gt;
     if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
         ServerNode[dest_ip].lastuse &amp;lt; Now - 6 minutes) then&lt;br /&gt;
       ServerNode[dest_ip].server = NULL;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
Every 30 minutes:&lt;br /&gt;
 for (dest_ip = 0.0.0.0; dest_ip &amp;lt; 255.255.255.255; dest_ip++) {&lt;br /&gt;
    if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
        ServerNode[dest_ip].lastuse &amp;lt; Now - net.ipv4.vs.lblc_expiration) then&lt;br /&gt;
      ServerNode[dest_ip].server = NULL;&lt;br /&gt;
 }&lt;br /&gt;
Please correct me if I am wrong.&lt;br /&gt;
:[[User:Jkrzyszt|Jkrzyszt]] 02:31, 16 September 2006 (CST)&lt;br /&gt;
--------&lt;br /&gt;
When I started to use the lblc algorithm I found that it provides an extra feature&lt;br /&gt;
- some kind of connection persistance.&lt;br /&gt;
However, the expiration algorithm, as it is, does not take into account&lt;br /&gt;
if the destination map just to be removed is related to any active connections.&lt;br /&gt;
This way, connection persistance is not guaranteed, even with very high weights set.&lt;br /&gt;
&lt;br /&gt;
You may ask why not to use the persistance option.&lt;br /&gt;
Well, the lblc algorithm is designed to be used together with fwmark in transparent cache clusters.&lt;br /&gt;
If such a cluster is accessed through another proxy (that applies access control rules, for example),&lt;br /&gt;
using classical persistance solution is not an option&lt;br /&gt;
because all the traffic from this proxy would be directed to the same cache.&lt;br /&gt;
&lt;br /&gt;
I am going to investigate the sources if it would be possible to check for no active&lt;br /&gt;
(or maybe even inactive) conections using the specific map before it can be removed&lt;br /&gt;
from the list.&lt;br /&gt;
&lt;br /&gt;
I would appreciate any comments on this matter.&lt;br /&gt;
&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 22:20, 18 September 2006 (CST)&lt;br /&gt;
-----&lt;br /&gt;
I found it much simpler to expose an additional sysctl variable&lt;br /&gt;
and use it in place of the hardcoded ENTRY_TIMEOUT parameter.&lt;br /&gt;
 --- linux-source-2.6.15/include/net/ip_vs.h     2006-01-03 04:21:10.000000000 +0100&lt;br /&gt;
 +++ linux-source-2.6.15-1-e50-debug_7bpo1.200604270947/include/net/ip_vs.h     2006-09-19 15:29:01.000000000 +0200&lt;br /&gt;
 @@ -359,6 +359,7 @@&lt;br /&gt;
         NET_IPV4_VS_SYNC_THRESHOLD=24,&lt;br /&gt;
         NET_IPV4_VS_NAT_ICMP_SEND=25,&lt;br /&gt;
         NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26,&lt;br /&gt;
 +       NET_IPV4_VS_LBLC_TIMEOUT=27,&lt;br /&gt;
         NET_IPV4_VS_LAST&lt;br /&gt;
  };&lt;br /&gt;
 --- linux-source-2.6.15/net/ipv4/ipvs/ip_vs_lblc.c      2006-01-03 04:21:10.000000000 +0100&lt;br /&gt;
 +++ 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&lt;br /&gt;
 @@ -57,6 +57,7 @@&lt;br /&gt;
   */&lt;br /&gt;
  #define CHECK_EXPIRE_INTERVAL   (60*HZ)&lt;br /&gt;
  #define ENTRY_TIMEOUT           (6*60*HZ)&lt;br /&gt;
 +static int sysctl_ip_vs_lblc_timeout = ENTRY_TIMEOUT;&lt;br /&gt;
  &lt;br /&gt;
  /*&lt;br /&gt;
   *    It is for full expiration check.&lt;br /&gt;
 @@ -118,6 +119,14 @@&lt;br /&gt;
                 .mode           = 0644,&lt;br /&gt;
                 .proc_handler   = &amp;amp;proc_dointvec_jiffies,&lt;br /&gt;
         },&lt;br /&gt;
 +       {&lt;br /&gt;
 +               .ctl_name       = NET_IPV4_VS_LBLC_TIMEOUT,&lt;br /&gt;
 +               .procname       = &amp;quot;lblc_timeout&amp;quot;,&lt;br /&gt;
 +               .data           = &amp;amp;sysctl_ip_vs_lblc_timeout,&lt;br /&gt;
 +               .maxlen         = sizeof(int),&lt;br /&gt;
 +               .mode           = 0644,&lt;br /&gt;
 +               .proc_handler   = &amp;amp;proc_dointvec_jiffies,&lt;br /&gt;
 +       },&lt;br /&gt;
         { .ctl_name = 0 }&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
 @@ -367,7 +376,7 @@&lt;br /&gt;
  &lt;br /&gt;
                 write_lock(&amp;amp;tbl-&amp;gt;lock);&lt;br /&gt;
                 list_for_each_entry_safe(en, nxt, &amp;amp;tbl-&amp;gt;bucket[j], list) {&lt;br /&gt;
 -                       if (time_before(now, en-&amp;gt;lastuse + ENTRY_TIMEOUT))&lt;br /&gt;
 +                       if (time_before(now, en-&amp;gt;lastuse + sysctl_ip_vs_lblc_timeout))&lt;br /&gt;
                                 continue;&lt;br /&gt;
  &lt;br /&gt;
                         ip_vs_lblc_free(en);&lt;br /&gt;
Now I can tune the every minute expiration procedure to suit my needs.&lt;br /&gt;
Are there any chances for this modification to be included in the mainstream kernel?&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 22:48, 19 September 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Jkrzyszt</name></author>	</entry>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=User:Jkrzyszt&amp;diff=3758</id>
		<title>User:Jkrzyszt</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=User:Jkrzyszt&amp;diff=3758"/>
				<updated>2006-09-18T14:24:44Z</updated>
		
		<summary type="html">&lt;p&gt;Jkrzyszt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Janusz Krzysztofik&lt;br /&gt;
&lt;br /&gt;
jkrzyszt at tis dot icnet dot pl&lt;/div&gt;</summary>
		<author><name>Jkrzyszt</name></author>	</entry>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3757</id>
		<title>Talk:Locality-Based Least-Connection Scheduling</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3757"/>
				<updated>2006-09-18T14:20:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jkrzyszt: /* Expiration algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expiration algorithm==&lt;br /&gt;
I find it usefull for understanding why subsequent connections to the same destination IP address may not follow the same path.&lt;br /&gt;
 ServerNode[] is a list of maps from destination IP address to server;&lt;br /&gt;
 C(ServerNode[]) is the current number of not NULL maps in the list;&lt;br /&gt;
 Now is the current system time;&lt;br /&gt;
 net.ipv4.vs.lblc_expiration is the sysctl parameter (default 24 hours).&lt;br /&gt;
Every 1 minute:&lt;br /&gt;
 Count = C(ServerNode[]);&lt;br /&gt;
 if (Count &amp;gt; 16384) then {&lt;br /&gt;
   for (dest_ip = 0.0.0.0;&lt;br /&gt;
        C(ServerNode[]) &amp;gt; min((Count-16384)*4/3, 8192);&lt;br /&gt;
        dest_ip++) {&lt;br /&gt;
     if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
         ServerNode[dest_ip].lastuse &amp;lt; Now - 6 minutes) then&lt;br /&gt;
       ServerNode[dest_ip].server = NULL;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
Every 30 minutes:&lt;br /&gt;
 for (dest_ip = 0.0.0.0; dest_ip &amp;lt; 255.255.255.255; dest_ip++) {&lt;br /&gt;
    if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
        ServerNode[dest_ip].lastuse &amp;lt; Now - net.ipv4.vs.lblc_expiration) then&lt;br /&gt;
      ServerNode[dest_ip].server = NULL;&lt;br /&gt;
 }&lt;br /&gt;
Please correct me if I am wrong.&lt;br /&gt;
:[[User:Jkrzyszt|Jkrzyszt]] 02:31, 16 September 2006 (CST)&lt;br /&gt;
--------&lt;br /&gt;
When I started to use the lblc algorithm I found that it provides an extra feature&lt;br /&gt;
- some kind of connection persistance.&lt;br /&gt;
However, the expiration algorithm, as it is, does not take into account&lt;br /&gt;
if the destination map just to be removed is related to any active connections.&lt;br /&gt;
This way, connection persistance is not guaranteed, even with very high weights set.&lt;br /&gt;
&lt;br /&gt;
You may ask why not to use the persistance option.&lt;br /&gt;
Well, the lblc algorithm is designed to be used together with fwmark in transparent cache clusters.&lt;br /&gt;
If such a cluster is accessed through another proxy (that applies access control rules, for example),&lt;br /&gt;
using classical persistance solution is not an option&lt;br /&gt;
because all the traffic from this proxy would be directed to the same cache.&lt;br /&gt;
&lt;br /&gt;
I am going to investigate the sources if it would be possible to check for no active&lt;br /&gt;
(or maybe even inactive) conections using the specific map before it can be removed&lt;br /&gt;
from the list.&lt;br /&gt;
&lt;br /&gt;
I would appreciate any comments on this matter.&lt;br /&gt;
&lt;br /&gt;
:Janusz [[User:Jkrzyszt|Jkrzyszt]] 22:20, 18 September 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Jkrzyszt</name></author>	</entry>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3755</id>
		<title>Talk:Locality-Based Least-Connection Scheduling</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Talk:Locality-Based_Least-Connection_Scheduling&amp;diff=3755"/>
				<updated>2006-09-15T18:31:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jkrzyszt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expiration algorithm==&lt;br /&gt;
I find it usefull for understanding why subsequent connections to the same destination IP address may not follow the same path.&lt;br /&gt;
 ServerNode[] is a list of maps from destination IP address to server;&lt;br /&gt;
 C(ServerNode[]) is the current number of not NULL maps in the list;&lt;br /&gt;
 Now is the current system time;&lt;br /&gt;
 net.ipv4.vs.lblc_expiration is the sysctl parameter (default 24 hours).&lt;br /&gt;
Every 1 minute:&lt;br /&gt;
 Count = C(ServerNode[]);&lt;br /&gt;
 if (Count &amp;gt; 16384) then {&lt;br /&gt;
   for (dest_ip = 0.0.0.0;&lt;br /&gt;
        C(ServerNode[]) &amp;gt; min((Count-16384)*4/3, 8192);&lt;br /&gt;
        dest_ip++) {&lt;br /&gt;
     if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
         ServerNode[dest_ip].lastuse &amp;lt; Now - 6 minutes) then&lt;br /&gt;
       ServerNode[dest_ip].server = NULL;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
Every 30 minutes:&lt;br /&gt;
 for (dest_ip = 0.0.0.0; dest_ip &amp;lt; 255.255.255.255; dest_ip++) {&lt;br /&gt;
    if (ServerNode[dest_ip].server is not NULL AND&lt;br /&gt;
        ServerNode[dest_ip].lastuse &amp;lt; Now - net.ipv4.vs.lblc_expiration) then&lt;br /&gt;
      ServerNode[dest_ip].server = NULL;&lt;br /&gt;
 }&lt;br /&gt;
Please correct me if I am wrong.&lt;br /&gt;
:[[User:Jkrzyszt|Jkrzyszt]] 02:31, 16 September 2006 (CST)&lt;/div&gt;</summary>
		<author><name>Jkrzyszt</name></author>	</entry>

	</feed>