I am using an ubuntu openssh server to allow users to connect to and do dynamic port forwarding. the performance is good until about 100 users are connected. beyond that the performance is dropped too much. actually establishing new tcp connections take too much time, but when they are established the speed is good.
my configurations are like below:
sysctl.conf:
fs.file-max = 60000
net.core.somaxconn = 8000
net.core.netdev_max_backlog = 8000
net.ipv4.tcp_max_syn_backlog = 8000
net.ipv4.ip_local_port_range = 10000 65000
limits.conf:
* soft nofile 60000
* hard nofile 60000
root soft nofile 60000
root hard nofile 60000
when about 150 users are connected:
the cpu usage is 10%
ram usage is 50%
bandwidth usage is 30mbs
netstat -n | wc -l shows 7500
lsof | wc -l shows 36000
I think this is something related to kernel or software limitations which cause this performance drop, any idea?
please don't suggest using proxy or vpn instead.