<div id="header-title" style="padding: 10px 15px; border-width:1px; border-style:solid; border-color:#FFD28C; background-image: url(<nop>https://jazz.net/wiki/pub/Deployment/WebPreferences/TLASE.jpg); background-size: cover; font-size:120%"> ---+!! <img src="https://jazz.net/wiki/pub/Deployment/WebPreferences/new.png" alt="new.png" width="50" height="50" align="right">Configuring and tuning IBM HTTP Server (IHS) %DKGRAY% Authors: Main.HongyanHuo, Main.GrantCovell<br> Build basis: CLM 3.x, CLM 4.x %ENDCOLOR%</div></sticky> <!-- Page contents top of page on right hand side in box --> <sticky><div style="float:right; border-width:1px; border-style:solid; border-color:#DFDFDF; background-color:#F6F6F6; margin:0 0 15px 15px; padding: 0 15px 0 15px;"> %TOC{title="Page contents"}% </div></sticky> <sticky><div style="margin:15px;"></sticky> This article explains some of the strategies for configuring and tuning IHS. ---++ Introduction IHS is based on the Apache HTTP Server. In the [[https://jazz.net/library/article/820][CLM standard topologies]], IHS also functions as reverse proxy server. A reverse proxy server provides a layer of indirection for backend application servers, and can provide load balancing at the http server tier to other application servers. This article introduces some monitoring and tuning techniques. Generally, tuning is not always necessary as the default IHS settings are designed to handle reasonable load. However symptoms of poor performance include IHS crashing and CPU thrashing. |Diagnosing and troubleshooting IHS server problems may be out-of-scope for most Jazz administrators. These tasks may be better performed by Web server administrators. Do not make changes to IHS configurations without making backups first. Do not make changes to IHS configurations without consulting your Web server administrators.| ---++ The IHS directives and what they mean The tunable IHS directives live in the =httpd.conf= in the =<IHS_HOME>\config= directory. Always backup the =httpd.conf= file before making a change (rename it to =httpd.conf.bak= for example). After making changes, you will need to restart IHS for changes to take effect. All numeric values must be positive, non-zero integers. ---+++ *Multi-Processing Module (aka MPM)* directives <img src="%ATTACHURLPATH%/ihsdefaults.jpg" alt="ihsdefaults.jpg" width="590" height="292" /> =MaxClients= is a key factor that defines how much load IHS can serve. =MaxClients= is not the same as maximum number of users served. =MaxClients= is a soft limit to control the simultaneous connections or threads. Changing this value doesn't mean IHS will deny new or additional user requests. Requests over this value will be put in queue until there are available threads. * =MaxClients= is recommended to be set lower than 2000 for a single IHS server. Monitor the number of *bsy* threads (see "section IHS error logs" below) to determine the peak of the simutanous connections based on your typical load, and then add 25% as a secure factor to set the value of !MaxClients. * Note that on Windows there is no =MaxClients= directive and that =ThreadsPerChild= is used instead. =ServerLimit=, =ThreadsPerChild=, =ThreadsLimit= along with =MaxClients= affect the capability of IHS in handling loads. To tune these, start with =ThreadsPerChild= and consider platform, plugin, SSL and caching. A higher =ThreadsPerChild= can benefit the !WebSphere plugin, but the trade-off compensates CPU for SSL. * =ThreadsPerChild= default is 25. * =ThreadsLimit= should equal =ThreadsPerChild=. * =ServerLimit= should be equal to =MaxClients= divided by =ThreadsPerChild= rounded to nearest integer. Ideally, change =MaxClients= so that it equals =ServerLimit= multiplied by =ThreadsPerChild= without any fractions. If =ServerLimit= multiplied by 25 is greater than the amount of available RAM, lower =MaxClients= and readjust =ServerLimit=. =StartServers=, =MaxSpareThreads=, =MinSpareThreads= determine how IHS reacts when load varies. * =MinSpareThreads= should not exceed the value of 25 or 10% of =MaxClients=. * =MaxSpareThreads= can be increased in step with =MaxClients=. * =StartServers= is best to leave at default of 1. =MaxRequestsPerChild= can remain at the default of 0. ---+++ Other considerations Modules that are not in use should be unloaded to reduce IHS memory footprint. |Optimizing !KeepAlive, !KeepAliveTimeOut and !MaxKeepAliveRequests can be very helpful to improve the performance as well. Plugin parameters may also be taken into account for fine-tuning, if the !WebSphere web server plugin modules are configured.| |Note that the tuning highly depends on the actual server environment and the load. Use the suggested values above as a starting point and follow the tuning practices to adjust them. Please refer to the documents in the section 'External link' for more details.| ---++ IHS server settings ---+++ System resources On a linux system be sure that there are enough user processes allowed. You may need to increase the =max user processes= setting using this command: <verbatim>ulimit -u 65536</verbatim> Also decrease the stack size. 512 MB is sufficient for CLM apps: <verbatim>#add this line into the envvar file under folder /conf ulimit -s 512</verbatim> ---++ Tools and tips ---+++ IHS error logs Ordinarilly, IHS logging is enabled by default. In test systems, you may wish to disable the access_log to save disk space. To do this comment out the following in the httpd.conf file <verbatim> CustomLog logs/access_log common </verbatim> However, for production environment, consider the options for effectively managing log files http://httpd.apache.org/docs/2.2/logs.html. IHS error logs live in the =<IHS_HOME>/logs= directory. The frequency they are written to is controlled by the =mpmstats= module which is automatically enabled in IHS version 8.x. To obtain more accurate statistics, set the =ReportInterval= to a small value. For instance, set it to 60 (seconds). <img src="%ATTACHURLPATH%/mpmstats.jpg" alt="mpmstats.jpg" width="492" height="83" /> Sample output of =mpmstats=: <verbatim> [Mon Jun 04 14:32:00 2012] [notice] mpmstats: rdy 88 bsy 187 rd 0 wr 5 ka 160 log 0 dns 0 cls 22 </verbatim> In the above example =bsy 187= indicates the busy threads and should be less than the !MaxClients value. Monitoring the log files closely by watching for *[alert]*, *[warn]* and *[error]* messages can give you hints on what goes wrong, for example: <verbatim> [Thu May 10 15:10:34 2012] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread </verbatim> The above message shows that IHS hits a resource limit and cannot create more threads. If the MPM modules are configured correctly (see section "The IHS directives and what they mean" above), it may be often remedied by reducing !MaxClients or increasing the maximum user processes on the system. This link provides handful information for IHS trouble-shooting: http://publib.boulder.ibm.com/httpserv/ihsdiag/errorlog.html ---+++ Server status Runtime monitoring is possible through the IHS server-status page, located at =http://your_server_name/server-status= <img src="%ATTACHURLPATH%/serverstatus.jpg" alt="serverstatus.jpg" width="806" height="496" /> Enable the IHS server-status page by adding an =allow= directive to the corresponding section of the =httpd.conf=. <img src="%ATTACHURLPATH%/mod_status.jpg" alt="mod_status.jpg" width="591" height="318" /> ---+++ Useful commands on Linux Watch open IHS processes with this command: <verbatim>ps -ylC httpd</verbatim> Sort by process size: <verbatim>ps -ylC httpd --sort:rss</verbatim> Sort by parent process: <verbatim>ps -ylC httpd --sort:ppid</verbatim> <img src="%ATTACHURLPATH%/ps.jpg" alt="ps.jpg" width="588" height="326" /> Check an individual process with child threads <verbatim>pstree -cp <pid></verbatim> ---+++++!! Related topics: [[DeploymentWebHome][Deployment web home]] ---+++++!! External links: * IBM article [[http://publib.boulder.ibm.com/httpserv/ihsdiag/WebSphere61.html][Using IBM HTTP Server 6.1 and later diagnostic capabilities with WebSphere]] * IBM article on tuning IHS: [[http://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.html][IHS performance tuning]] * IBM technote: [[http://www-304.ibm.com/support/docview.wss?uid=swg21167658][Tuning IHS to maximize the number of client connections to !WebSphere Application Server]] * IBM IHS Q&A: [[http://publib.boulder.ibm.com/httpserv/ihsdiag/questions.html#IHSV8][IHS Questions and Answers]] * IBM Infocenter [[http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.ihs.doc%2Finfo%2Fihs%2Fihs%2Fwelcome_ihs.html][IHS v8 Infocenter]] * Apache.org article: [[http://httpd.apache.org/docs/current/misc/perf-tuning.html][Apache tuning]] * IBM developerWorks article: [[http://www.ibm.com/developerworks/websphere/techjournal/1010_pape/1010_pape.html][Proxy server versus the HTTP plug-in: Choosing the best !WebSphere Application Server workload management option]] ---+++++!! Additional contributors: None <sticky></div></sticky>
This topic: Deployment
>
DeploymentConfiguringAndTuning
>
ConfiguringAndTuningIBMHTTPServer
History: r16 - 2014-03-13 - 15:15:50 - Main.gcovell
Copyright © by IBM and non-IBM contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use.
Please read the following
disclaimer
.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more
here
.