![Performance efficiency test comparison between Nginx and Apache](https://www.1024programmer.com/wp-content/themes/iux/thumb.php?src=http://upload.server110.com/image/20140103/0Z63U446-3.png&w=300&h=193)
Performance efficiency test comparison between Nginx and Apache
It is said that nginx performs better than apache in a high-stress environment, so I downloaded one to toss about it. Download and compile and install, my compilation process is a bit special: 1. Remove the debugging information, modify the $nginx_setup_path/auto/cc/gcc file, and set CFLAGS=”$CFLAGS -g” This line is commented out. 2. Since only the performance of the WEB server is tested, FastCGI is not installed. 1 2 3 4 5 6 7 ./configure\ –prefix=/opt/nginx\ –user=www\ –group=www\ –with-http_stub_status_module \ –with-http_ssl_module\ –without-http_fastcgi_module After the installation is complete, copy a bunch of static HTML pages in the production environment to the nginx server, my nginx.conf The configuration is as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 twenty one twenty two twenty three twenty four 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 worker_processes 8; worker_rlimit_nofile 102400; events { use epoll; worker_connections 204800; } http { include mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; charset GBK; keepalive_timeout 60; server_names_hash_bucket_size 128; client_header_buffer_size 2k; large_client_header_buffers 4 4k; client_max_body_size 8m; open_file_cache max=102400 inactive=20s; server { 80; location / {…