y.sharma9283
Hi,
I have installed OpenVPN version 2.1.3 on RHEL 5. I am facing an issue which is mentioned below.
ISSUE:
When i connected an openvpn client to the OpenVPN server ( mentioned above), then after the creation of tunnel, i ran command "pmap <pid of openvpn>". The output of the command was like:
080c1000 4k rw--- /usr/local/sbin/openvpn
080c2000 24k rw--- [ anon ]
097f2000 132k rw--- [ anon ]
097gd100 28k rw--- [ anon ]
The memory usage of openvpn was 8396 K.
I disconnected the client and again connected, the output was:
080c1000 4k rw--- /usr/local/sbin/openvpn
080c2000 24k rw--- [ anon ]
097f2000 264k rw--- [ anon ]
097gd100 160k rw--- [ anon ]
memory usage of openvpn server came to be 8660 K.
Third time when i again connected the same user, the output was:
080c1000 4k rw--- /usr/local/sbin/openvpn
080c2000 24k rw--- [ anon ]
097f2000 396k rw--- [ anon ]
097gd100 160k rw--- [ anon ]
memory usage of the openvpn server came to be 8792.
So, everytime when i am connecting the openvpn client the memory usage is increasing. Seems that the server is not releasing the memory when the client disconnects. Also, i found that in the output of pmap command the memory is increased in [ anon ] .
first time the [anon] was showing 132 K, second time it shows 264 K and third time it shows 396 K.
Can someone help in resolving this issue? I want that the memory should get released when the openvpn client disconnects. I tested this case for 1 openvpn client, if there will be 1000 users then the memory usage will be very large.
Looking for a quick and helpful response.
Thanks,
Yogesh
janjust
there is some memory leakage in openvpn and in the underlying openssl libs; this has been known for some time but thus far nobody has found time to resolve it.
On the other hand, 132K per client is not a lot of memory to waste - even for 1,000 clients it would amount to 132 MB, which is not a lot for a modern server. Others have reported to have set up openvpn servers serving 2,000+ clients without issues.
y.sharma9283
Hi Jan, thanks for the reply.
Here are few more queries..
As you have written that this issue is known for sometime, may i know any link where i can get more info on this ..
Also, you said 1000 users will consume 132 MB, i agree but when 1000 users will disconnect and again connect to the same openvpn server then 132 MB additionally will be added to the existing 132 MB. Because the 132 MB will not get released after the users disconnected. Hence for 2 time connections 1000 user consumed 264 MB. Like wise this memory usage keeps on increasing.
Any idea on this? Any solution to avoid this issue. I want whenever the user disconnects, the memory used by that user should immediately be released by openvpn server.
y.sharma9283
w.r.t the above mentioned issue I want to know if the memory leakage issue has been solved? If yes, then which community version we should use now?