당신이해야 수에 대한 1.4.14
PHP는 - FPM 고려가 Avg error rate
, 귀하의 WP
+ Nginx
+ Memcached
구성이 너무 나쁘지 않아 보이는데, 제 생각에 이것은 좋은 선택입니다. -m
매개 변수를 memcached
으로 늘리면 RAM의 절반과 일치시킬 수 있습니다.
그러나 : memcached
은 데이터가 메모리에서 사용 가능하다는 것을 보장하지 않으며 캐시 미스 폭풍에 대비해야합니다. 폭풍우를 피하기위한 흥미로운 방법 중 하나는 임의의 오프셋 (예 : 10 + [0..10] 분)으로 만료 시간을 설정하는 것입니다. 이는 몇 가지 항목이 10 분 동안 저장되고 다른 항목이 20 분 동안 저장된다는 것을 의미합니다 (목표는 모든 항목이 동시에 만료되지는 않음).
memcached
에 할당 할 메모리 용량에 관계없이 필요한 양만 사용합니다 (예 : 실제로 사용 된 메모리 만 할당합니다. -k
옵션을 사용하는 경우 (구성에서 비활성화 됨)으로 설정하면 memcached
이 시작될 때 전체 메모리가 예약되므로 필요할 때마다 전체 메모리가 항상 할당됩니다.
이 숫자의 451
연결은 실제로 달라질 수 있습니다. 즉, 더 나은 Avg error rate
및 451
이 65 % Avg error rate
보다는 클라이언트를 제공하고 8200+ 클라이언트를 제공 0 %를 가지고, 벤치 마크를 수행 할 때 평균을보고 항상 좋은 생각이다.
그러나 일부 더 많은 자원을 오프로드하기 위해, 당신은 워드 프레스에 대한 추가 캐싱을 사용할 수 있습니다, 플러그인 많이, 나는 개인적으로 그 목적을 위해 하나를 썼다있다. nginx
구성에 대한
, 당신 조정할 수있다 또한 일부 매개 변수 : 우리가 가진
worker_rlimit_nofile 100000;
worker_connections 4000;
# optmized to serve many clients with each thread, essential for linux use epoll;
# accept as many connections as possible,may flood worker connections if set too low
multi_accept on;
# cache informations about FDs, frequently accessed files
# can boost performance, but you need to test those values
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
# to boost IO on HDD we can disable access logs
access_log off;
# copies data between one FD and other from within the kernel
# faster then read() + write()
sendfile on;
# send headers in one peace, its better then sending them one by one
tcp_nopush on;
# don't buffer data sent, good for small data bursts in real time
tcp_nodelay on;
# number of requests client can make over keep-alive -- for testing
keepalive_requests 100000;
# allow the server to close connection on non responding client, this will free up memory
reset_timedout_connection on;
# request timed out -- default 60
client_body_timeout 10;
# if client stop responding, free up memory -- default 60
send_timeout 2;
# reduce the data that needs to be sent over network
gzip on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
내가 두 개 이상의 링크를 게시하지 못할 유래의 멋진 기능으로, 여기에 구성 파일입니다 인해 : 의 Nginx : http://pastebin.com/H3YyKYdj Memcached가 : http://pastebin.com/Jz4ZmqsP PHP-fpm : http://pastebin.com/BmxrQGVz – Rustypredator