I was doing some performance testing for Apache using ab. Apache in our case is only working as a load balancer balancing load between two Liferay servers.
Initially, I did the testing for 1000 requests with 100 concurrent requests. The tests went fine.
But when I perform the tests for 500 concurrent users with 1000 requests, the tests were failing.
$ ab -c 500 -n 1000 http://103.X.X.X/web/guest/statistics This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, Benchmarking (be patient) Completed 100 requests Completed 200 requests Completed 300 requests apr_socket_recv: Connection timed out (110) Total of 386 requests completed
Can see the following message in Kernel.
May 13 14:21:15 www kernel: possible SYN flooding on port 80. Sending cookies.
I tried increasing the value for the following two parameters , but the tests were still failing and same error can be seen in system log file.
# echo "1024" > /proc/sys/net/core/somaxconn # echo "2048" > /proc/sys/net/ipv4/tcp_max_syn_backlog
We have a campaign coming up where we are expecting large numbers of hits to our server. Since the tests were failing, we are somewhat worried whether our server will be able to take up the load. We are expecting around 500-700 concurrent requests for one single day during the campaign.
Kindly suggest how to improve our server performance to take the load.