- 论坛徽章:
- 0
|
服务器负载不高,4核cpu,平时负载1-2左右,80端口的链接数在1000左右
sysctl.conf 配置:
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 5000 65000
net.ipv4.tcp_max_syn_backlog = 10000
nginx配置
worker_processes 5;
error_log logs/error.log crit;
pid /usr/local/webserver/nginx/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 128k;
large_client_header_buffers 4 512k;
client_max_body_size 100m;
sendfile on;
tcp_nopush on;
使用
webbench -c 1500 -t 30 http://x.x.x.x/t.php
1500 clients,running 30 sec
Requests:14764 susceed,0 failed.
但是用一个脚本,2秒钟获取请求一次 http://x.x.x.x/t.html 就会几分钟就会出现一个超时,同时进行ping 没有丢包现象
服务器的负载也不高
如果还需其他的参数,我再贴上来
期盼高手!!!
|
|