Answer a question

So basically I have setup Nginx OpenResty and tried to optimize the config for maximum performance / requests .

The server can clearly handle a lot without even blinking, but it seems like after around 55k Request per Second Nginx won't establish any more connections, as shown per stats.

I am using Luameter to get my readings, and by stressing my server using cloud platform doing 50k Requests per second or 100k Requests per second never returns more then the 50k Requests from Nginx stats.

The server has a full 1gbps port but never sends more then 330mbps output when being stressed. It also has a SSD HDD.

Cpu is at 45% when being hit with 100k Requests per second.

Ulimit is unlimited and ulimit -n 999999

Here s a snippet of my nginx config :

user  nobody; worker_processes  8; worker_rlimit_nofile 262144; error_log            logs/error.log crit;

events {
worker_connections  100000;
use epoll;
multi_accept on; }

http {

open_file_cache max=200000 inactive=20s; open_file_cache_valid 30s;  
open_file_cache_min_uses 2; open_file_cache_errors on;

How could I possibly increase this limit considering there's still room to work with in what comes to server resources ?

Thanks

Answers

The limit is TCP/IP stack configuration problem. Check this out: https://www.percona.com/live/mysql-conference-2015/sites/default/files/slides/all_your_iops_are_belong_to_usPLMCE2015.pdf

Nevertheless don't expect too much out of single box, spread the load.

UPDATE

Nginx configuration can be reviewed according to official performance tuning recommendation: https://www.nginx.com/blog/tuning-nginx/

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐