loadrunner web服务器监控和调优

Apache

  • 打开httpd配置,设置server-status中的handler调用,设置为:allow from all,输入http://ip/server-status?auto&refresh=5,即可动态每隔5s刷新监控Apache,如果去掉后面的参数就是静态监控

Apache 调优

硬件与操作系统

  • 选择最新最稳定的版本并大好补丁
  • 如果操作系统支持sendfile系统调用,则务必安装此功能或补丁,可以更快的发送静态内容且占用较少的cpu时间

运行时配置

运行时配置一些常用模块为:mod_dir,mpn_common,mod_status 涉及到的相关指令为Allowaoverride,HostnameLookups,DirectoryIndex,EnableMMAPr,EnableSendfile,KeepAliveTimeout,MaxSpareServers,MinSpareServers,Option,StartServers

AllowOverride

  • 有两种设置,All和None。在htdocs中的Directory如果设置了all,表示网站空间允许覆盖.htaccess文件,如打开index.html,Apache会试图打开/.htaccess,/www/.htaccess,/www/htdocs/.htaccess,所以应该设置成None

FollowSymLink和SymLinkIfOwnerMatch

  • 如果网站空间没有使用Option FollowSymLink,或使用了Option SymLinksIfOwenerMatch,Apache 必须执行额外的系统调用来验证符合连接,文件每一部分

猜你喜欢

转载自blog.csdn.net/weixin_34116110/article/details/87313654