公司在美国托管的某台服务器出现异常,异常现象如下:
  1. load average 30+ 以上
  2. service iptables start 无法启动,同时大量iptable进行在后台运行(60个)
 
判断过程:
  1. 起初认为是一个综合性问题,因为该服务器运行的服务较多,环境也比较复杂,访问量也非常大。 
  2. 安装sysstat软件包,yum install sysstat ,发现安装软件过程非常顺利,不太像一台load 30+应用服务器应有的反馈。后来通过iostat,mpstat,vmstat命令确实证明了load高的瓶颈不在io
  3. killall kill iptables进程无效。通过手工kill无法生效。目标确定在iptables上。
  4. 最终结果:发现/etc/sysconfig/iptables-config配置项:
InBlock.gif# Unload modules on restart and stop
InBlock.gif#     Value: yes|no,     default: yes
InBlock.gif# This option has to be 'yes' to get to a sane state for a firewall
InBlock.gif# restart or stop. Only set to 'no' if there are problems unloading netfilter
InBlock.gif# modules.
InBlock.gifIPTABLES_MODULES_UNLOAD= "no"
       就是这个“no”,导致了iptables服务在重启和关闭,需要卸载相关模块时出现异常。RadHat系列linux,如果iptables过滤模块要生效,默认是使用netfiler模块的。如果设置为“no”,就会导致如上截图所显示 modprobe -q --iptbls_filter 产生30个锁死进程,引起load达到30。
   
      感慨和总结:现网模块默认配置文件,不敢修改啊!!!出人命的!!!