zzg
Hi,
I have two question on openvpn sever side memory using.
1. One connection will take about 700KB memory in openvpn server side, and after one renegotiation the memory using will increase to 1300KB.
Are there methods to reduce the memory using on every connection? Why do the memory using increase so much after the renegotiation?
2. Openvpn server will use 70M memory when 100 clients connect to server, but after disconnected these 100 clients, openvpn server memory using also is 70M. Why not release the memory after the disconnection?
I have tested the openvpn 2.1 and 2.2, both version have same question.
The configuration:
Server:
port 1194
proto tcp
dev tun
ca /etc/openvpn/conf/ca.crt
cert /etc/openvpn/conf/server.crt
key /etc/openvpn/conf/server.key # This file should be kept secret
dh /etc/openvpn/conf/dh1024.pem
server 10.8.0.0 255.255.255.0
;ifconfig-pool-persist ipp.txt
;push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.8.0.1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
;client-to-client
keepalive 10 120
reneg-sec 480
duplicate-cn
comp-lzo
user nobody
group nobody
;persist-key
;persist-tun
status openvpn-status.log
verb 3
client:
client
dev tun
proto tcp
remote 10.139.36.104 1194
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
reneg-sec 480
;redirect-gateway def1
nobind
zzg
Have found the root cause, the most memory are taken by openssl library. If change to polarssl, the memory usage decrease massively.