LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] Invalidate expired persistance templates

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] Invalidate expired persistance templates
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 1 Dec 2005 08:03:38 +0000 (UTC)
Roberto Nibali <ratz@xxxxxxxxxxxx> wrote:
>> I finally got around to preparing the backport and patch for Dave,
>> and in the course of doing this I realises that as long as
>> ip_vs_conn_expire() doesn't reeset the timer, the problem goes away.
>> This is because the problem is not how long the persistance entry
>> stays around, but rather that it changes from the user-configured
>> value.
> 
> Seems so, yes. Why was it done in the first place?

Because in the first place, when ip_vs_conn_expire_now() set the
timeout to 0, when ip_vs_conn_expire() if it decided the connection
couldn't be expired, it reset it to avoid the counter firing about
every 0HZ. 

Well, I think the 0 thing turned out to be racy in 2.6, which is
why ip_vs_conn_expire() was changed to use del_timer, but I digress.

>>     ip_vs_conn_expire_now() used to set timeout values to 0,
>>     and because of this ip_vs_conn_expire() reset them to some
>>     other value. However, ip_vs_conn_expire_now() now deletes
>>     timers, so there is no reason for ip_vs_conn_expire() to
>>     reset timers.
> 
> Ahhh ;)

:)

>>     It turns out that the current behaviour causes the timeout of
>>     persistance templates to be changed from their user-configured
>>     timeout in the situation where they timeout before their controled
>>     connections. This can happen if the user configures the
>>     persistane timeout to less than IP_VS_TCP_S_FIN_WAIT (2 minutes).
>>     And although such small persistance timeouts are of questionable
>>     value, its still an unexpected, weird behaviour, without any
>>     benifits.
> 
> It's not so questionable if you run a site that should maintain 10k
> sessions/s or so in persistency mode :). I got to see LVS use 1.6 GB of
> RAM once.

Perhaps I should rephrase: Its a different question.

Its also a question that I think is somewhat harder to answer.
I think it would be ideal if the persistance templates could expire
independantly of their controlled processes. But I'm not sure that
will be clean to implement. I'm happy to be convinced otherwise.

>>     See: 
>>     
>> http://archive.linuxvirtualserver.org/html/lvs-users/2005-11/msg00096.html
>>     
>>     Signed Off By: Horms <horms@xxxxxxxxxxxx>
> 
> Maybe Signed-Off-By?

Yeah, [_ -] are old enemies. Then again so is spelling...

I've fixed my local copies.

-- 
Horms


<Prev in Thread] Current Thread [Next in Thread>