Scene:
Local data obtained from kafka, analog devices, transmitting data to a third party through the internet protocol 808, a device connected to a.
Problem:
When using netty do performance testing, concurrency caused by too much Too Many open files issue
each device object, inside it is a netty object request, the results of more than 1,000 devices, use the server handle reached 17w +,
Solution as follows: Last by modifying bootstrap.group (new new NioEventLoopGroup ( . 1 )) ; then handle the data correctly. Before you can use the default new NioEventLoopGroup ()
View the process corresponding number of handles
[root@xxxxx]# lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more|grep '36576'
6619 36576
Check the corresponding connection
[root@xxxxx]# netstat -lnaop|grep 7008|wc -l
17
View the process corresponding to the number of threads
[root @ XXXXX] # CAT / proc / 36576 / Status | grep 'Threads'
Threads: 4323