UPDATE

Salam.life
TEKNOLOGITUTORIAL

Apache MPM Directives Explained: The Ultimate Performance Tuning Guide

Ⓒ Hak cipta foto di atas dikembalikan sesungguhnya kepada pemilik foto

Avoid increasing the global Timeout when addressing issues with a single script, or user, that requires a long Timeout. Problems can usually be resolved by a .htaccess file or include file to increase the Timeout directive for that specific script.

KeepAlive

Ⓒ Hak cipta foto di atas dikembalikan sesungguhnya kepada pemilik foto

A simple on|off toggle enables the KeepAlive protocols with supported browsers. The KeepAlive feature can provide as much as a 50% reductions in latency, significantly boosting the performance of Apache. KeepAlive accomplishes this by reusing the same initial connections a browser creates when connecting to Apache for all follow-up requests which occur within a short period.

KeepAlive is a powerful feature and in general, should be enabled in most situations. It works great for reducing some of the CPU and Network overhead with modern element heavy websites. For example, an easy way to visualize KeepAlive is with the “hold the door” phrase. Imagine a queue of people entering a building through a single doorway. Each person is required to open the door, walk through it, then close the door before the next person does the same process. Mostly, that’s how Apache works without KeepAlive. When enabled, the door stays open until all the people in line are through the door before it closes again.

Two additional related directives also govern KeepAliveMaxKeepAliveRequests and KeepAliveTimeout. Discussed in the next section, each one plays a vital role in fine-tuning of the KeepAlive directive.

MaxKeepAliveRequests

Sets a limit on the number of requests an individual KeepAlive connection is permitted to handle. Once reached, Apache forces the connection to terminate, and creates a new one for any additional requests.

Determining an ideal setting here is open to interpretation. Generally, you want this value to be at least as high as the largest count of elements (HTML, Text, CSS, Images, Etc..) served by the most heavily trafficked pages on the server.

Ⓒ Hak cipta foto di atas dikembalikan sesungguhnya kepada pemilik foto

Set MaxKeepAliveRequests to double that of the largest count of elements on common pages. Services like webpagetest.org or gtmetrix.com can count elements on a page.

KeepAliveTimeout

This directive is measured in seconds and will remain idle waiting for additional requests from its initiator. Since these types of connections are only accessible to their initiator, we want to keep KeepAliveTimeout very low. A low value prevents too many KeepAlive connections from locking out new visitors due to connection priority.

Ⓒ Hak cipta foto di atas dikembalikan sesungguhnya kepada pemilik foto

A large MaxKeepAliveRequests directive with a very low KeepAliveTimeout allows active visitors to reuse connections while also quickly recovering threads from idle visitors:

image_print
1 2 3 4 5 6 7 8
Story Terbaru
MEMUAT STORY...

Bagaimana reaksi Kamu?

Beri Komentar

Terkait

Tampilkan Lainnya Loading...Tidak ada lagi data informasi lainnya.