Skip to contentSkip to conversation

Multi Cache TTL Usage

Openvpn-devel Harris, Jeff 2 participants 2 messages Jul 3, 2007 – Aug 21, 2007

lore
Share & tools
lore
#0 lore raw

Does anyone know the effect of lowering the MULTI_CACHE_ROUTE_TTL constant in multi.h from 60 seconds to say 10? Will it cause extra network traffic or anything if the routes are purged more often?

I am trying to work around an issue I'm seeing with spikes in the number of multi_instance objects. I have 125 connected clients and after a number of restarts of all the clients, the number of multi_instance objects on my server spikes to over 600 leading to an eventual exhaustion of memory. I am using keep-alive settings of 5 second pings and 30 seconds of inactivity.

Lowering the value to 30 seems to hold off the spikes for a bit. With a value of 10 I have not seen the spikes.

Any help would be appreciated.

Thanks,
Jeff

#1 lore raw
Quoted 11 lines · Jeff

Does anyone know the effect of lowering the MULTI_CACHE_ROUTE_TTL constant in multi.h from 60 seconds to say 10? Will it cause extra network traffic or anything if the routes are purged more often?

I am trying to work around an issue I'm seeing with spikes in the number of multi_instance objects. I have 125 connected clients and after a number of restarts of all the clients, the number of multi_instance objects on my server spikes to over 600 leading to an eventual exhaustion of memory. I am using keep-alive settings of 5 second pings and 30 seconds of inactivity.

Quoted 6 lines

Lowering the value to 30 seems to hold off the spikes for a bit. With a value of 10 I have not seen the spikes.

Any help would be appreciated.

OpenVPN caches routes in a hash table for efficiency, so that it doesn't need to iterate through the whole routing table in order to find a match. The problem appears to be that cache entries may prolong the life of a marked-for-delete multi-instance object by holding references to it until the cache entry expires. So timing out the cached routes earlier appears to be a good solution, and will not increase network traffic.

James