apache最大压力测试

来源:互联网 发布:淘宝碧凡化妆品 编辑:程序博客网 时间:2024/05/16 14:55

服务器:

地址:10.3.6.70,端口:80

CPU:Intel Xeon E312xx (SandyBridge)(四核,单核频率1999.999MHz)

内存:8G

硬盘:80G

系统:CentOS release 6.4 (Final),Linux 2.6.32-358.el6.x86_64


测试机:

CPU:Intel(R) Core(TM) i5-3470 CPU@ 3.20GHz

内存:8G

硬盘:500G

系统:Windows 7 Professional ServicePack 1,64位

测试工具:Apache JMeter Version 2.11r1554548


服务器参数调整:

sysctl.conf:

# Controls IP packet forwardingnet.ipv4.ip_forward = 0# Controls source route verificationnet.ipv4.conf.default.rp_filter = 1# Do not accept source routingnet.ipv4.conf.default.accept_source_route = 0# Controls the System Request debugging functionality of the kernelkernel.sysrq = 0# Controls whether core dumps will append the PID to the core filename.# Useful for debugging multi-threaded applications.kernel.core_uses_pid = 1# Controls the use of TCP syncookiesnet.ipv4.tcp_syncookies = 1# Disable netfilter on bridges.net.bridge.bridge-nf-call-ip6tables = 0net.bridge.bridge-nf-call-iptables = 0net.bridge.bridge-nf-call-arptables = 0# Controls the default maxmimum size of a mesage queuekernel.msgmnb = 65536# Controls the maximum size of a message, in byteskernel.msgmax = 65536# Controls the maximum shared segment size, in byteskernel.shmmax = 68719476736# Controls the maximum number of shared memory segments, in pageskernel.shmall = 4294967296net.ipv4.tcp_syncookies = 1net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_tw_recycle = 1net.ipv4.tcp_fin_timeout = 30net.ipv4.ip_local_port_range = 1024 65535net.ipv4.tcp_max_syn_backlog = 65535net.ipv4.tcp_max_tw_buckets = 1000net.core.netdev_max_backlog = 65535net.ipv4.tcp_keepalive_time = 1200net.core.somaxconn = 32768

/etc/security/limits.conf:

* soft noproc 20480* hard noproc 20480* soft nofile 10240* hard nofile 20480

/etc/pam.d/login:

session required /lib/security/pam_limits.so

~/.bash_profile:

ulimit -u 10000ulimit -n 4000

/etc/httpd/conf/httpd.conf:

## Timeout: The number of seconds before receives and sends time out.#Timeout 60## KeepAlive: Whether or not to allow persistent connections (more than# one request per connection). Set to "Off" to deactivate.#KeepAlive on## MaxKeepAliveRequests: The maximum number of requests to allow# during a persistent connection. Set to 0 to allow an unlimited amount.# We recommend you leave this number high, for maximum performance.#MaxKeepAliveRequests 100000## KeepAliveTimeout: Number of seconds to wait for the next request from the# same client on the same connection.#KeepAliveTimeout 8<IfModule prefork.c>StartServers       8MinSpareServers    5MaxSpareServers   20#ServerLimit      256ServerLimit      10240#MaxClients       256MaxClients       10240#MaxRequestsPerChild  4000MaxRequestsPerChild  10240</IfModule>

测试内容:

直接访问apache首页(根路径)(5196 bytes)。


并发线程数:10000

ramp-up period:180 sec


测试结果:

聚合报告:










服务器CPU和内存:



服务器httpd最大进程数:6240,总进程数:6400,80端口最大连接数:8300




0 0
原创粉丝点击