Apache Performance Tuning.ppt
《Apache Performance Tuning.ppt》由会员分享,可在线阅读,更多相关《Apache Performance Tuning.ppt(40页珍藏版)》请在麦多课文档分享上搜索。
1、Apache Performance Tuning,Part 1: Scaling Up,Sander Temme ,2,“Apache is a general webserver, which is designed to be correct first, and fast second. Even so, its performance is quite satisfactory. Most sites have less than 10Mbits of outgoing bandwidth, which Apache can fill using only a low end Pen
2、tium-based webserver.”,http:/httpd.apache.org/docs/1.3/misc/perf-tuning.html says:,3,4,Goals of Performance Tuning,Serve as Many Requests as Possible Graceful Degradation (Dont crash the box),5,Assumptions,Limited Resources Work With What You Have Youre probably running Linux No Compiling or Recompi
3、ling! You can find httpd.conf,6,Monitoring Your Server,7,Purposes of Monitoring,Observation Extrapolation Signals/Alerts Testing,8,Monitoring Apache,9,Monitoring Solaris: SE Toolkit,Lightweight Programmable Alive,http:/ Monitoring Tools,vmstat iostat top free,11,12,Web Server Logs,ErrorLog LogLevel:
4、 debug, info, notice, warn, error, crit Access Log: TransferLog or CustomLog Common Log Format,13,Common Log Format,172.16.2.91 - - 16/Nov/2003:15:23:27 -0800 “GET /sctemme/ HTTP/1.1“ 200 1446 172.16.2.91 - - 16/Nov/2003:15:23:28 -0800 “GET /sctemme/css/doc.css HTTP/1.1“ 200 167 172.16.2.91 - - 16/N
5、ov/2003:15:23:28 -0800 “GET /sctemme/css/menu.css HTTP/1.1“ 200 623 172.16.2.91 - - 16/Nov/2003:15:23:29 -0800 “GET /favicon.ico HTTP/1.1“ 404 283 172.16.2.91 - - 16/Nov/2003:15:23:34 -0800 “GET /sctemme/index.html HTTP/1.1“ 200 1446,14,Configuring for Performance,Configuring Apache Tuning the Opera
6、ting System,15,Apache Configuration,Process/Thread Management DNS Lookups Avoid .htaccess Files Disable unused modules Tune your App Tier,16,DNS Lookups,HostnameLookups Access Control Bad: Deny from Good: Deny from 172.160.234.5,17,.htaccess Files,Per-directory configuration files Accessed for ever
7、y request Best performance: AllowOverride none,GET /dir1/dir2/restricted.html HTTP/1.0,18,MaxClients,Configuration file directive Maximum number of workers Apache 1.3, 2.0 Prefork: processes Apache 2.0 Worker: threads * processes Limit according to resources (memory),19,Server-side Includes,We Love
8、Them! Easy to implement Easy to manage We Hate Them! They break sendfile() They break cacheability,20,SSI on www.apache.org,SSI Enabled,21,Sizing MaxClients,Take total RAM Subtract OS allowance look at free value without Apache, etc. Subtract external program allowance JVM, cgi programs, MySQL? Divi
9、de by httpd process size Read process size from top,22,Top,23,Selecting Your MPM,Apache 2.0 only! Processes and Threads Differences between platforms Thread-safety issues,24,Processes and Threads,Process: Own copy of data structures Shares: program code, shared memory Context switches expensive Thre
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- APACHEPERFORMANCETUNINGPPT
