咨询LVS在 i7-2600处理器中性能很低的问题
LVS-DR模式,DS、RS通过交换机连接,DS和RS硬件配置完全一样且只有一台(参见下面),RS使用Nginx提供HTTPS双向服务。
直接压RS TPS为1500左右,而压DS性能却只有500左右,按照网上优化也不生效,不确定是否是硬件问题,但是同样的硬件
直接压RS性能却能上去,请大家指导下。
系统环境:
Linux: Linux version 2.6.32-431.el6.x86_64 (root@localhost.localdomain)
Build: (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) )
Release : 2.6.32-431.el6.x86_64
Version : #1 SMP Tue Nov 17 17:25:46 CST 2015
cpuinfo: GenuineIntel Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
cpuinfo: Hz=3392.272 bogomips=6784.54
cpuinfo: ProcessorChips=1 PhyscalCores=4
cpuinfo: Hyperthreads =2 VirtualCPUs =8
# of CPUs: 8
Machine : x86_64
Nodename : localhost.localdomain
/etc/*ease[1]: CentOS release 6.5 (Final)
/etc/*ease[2]: CentOS release 6.5 (Final)
/etc/*ease[3]: CentOS release 6.5 (Final)
/etc/*ease[4]: (null)
lsb_release: Distributor ID: CentOS
lsb_release: Description: CentOS release 6.5 (Final)
lsb_release: Release: 6.5
lsb_release: Codename: Final
网卡:
Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
系统资源:
[root@localhost admin]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 29502
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 204800
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
测试场景:
LVS-DR模式,RSA SSL双向100B页面,DS的cpu几乎没有,软中断差不多占用0.1,有时为0,RS的CPU也没有压上来
已优化参数(没什么效果其实,可能因为并发其实并不大):
IP Virtual Server version 1.2.1 (size=1048576)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.16.1.241:rxapi rr persistent 1 mask 255.255.225.255
-> 172.16.1.101:rxapi Route 1 0 0
另外优化了如下参数:
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth1.arp_ignore = 1
net.ipv4.conf.eth1.arp_announce = 2
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_keepalive_time = 1
net.ipv4.tcp_fin_timeout = 30
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 524288 699050 1048576
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144
lijianqiuyan
周五, 2015-11-27 02:08
Permalink
这是锻炼你分析解决
这是锻炼你分析解决问题的好机会,这种问题在论坛是问不出来的