In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
● Apache configuration parameters
⑴ KeepAlive On/Off:
KeepAlive refers to keeping the connection active, that is, if KeepAlive is set to On, then requests from the same client do not need to connect again, avoiding the burden on the server by creating a connection for each request. In general, websites with more pictures should set KeepAlive to On.
⑵ KeepAliveTimeOut number:
If the time between the second request and the first request exceeds the KeepAliveTimeOut, the first connection will be broken and a second connection will be created. Its setting generally takes into account the interval between re-requests for asking prices, such as pictures or JS, and is generally set to 3-5 seconds.
⑶ MaxKeepAliveRequests 100:
The maximum number of http requests that can be made per connection. Setting its value to 0 will support unlimited transmission requests within a single connection. In fact, no client program requests too much negativity in a single connection, and usually completes the connection without reaching this limit.
⑷ HostnameLookups on | off | double:
If you use on, there is only one reverse check, and if double is used, then there is a forward resolution after the reverse check, and only two results match each other, while off does not carry out domain name verification. It is recommended to use double for security and off for faster access. (if domain name lookup is enabled, it will increase the burden on Apache and slow down the access speed. It is recommended to turn it off)
⑸ timeout 5:
Is the Apache accepts the request or sends out the corresponding time to disconnect beyond this time
⑹ MPM is the main factor affecting concurrency efficiency
① StartServers 10:
Set the number of child processes established when the server starts, because the number of child processes dynamically depends on the load, so it is generally not necessary to adjust this parameter
② MinSpareServers 10:
Sets the minimum number of idle child processes. So an idle child process means that there is no child process that is processing the request. If the current idle child process is less than MinSpareServers, then Apache will generate new child processes at a maximum speed of one per second. This parameter needs to be adjusted only on very busy machines.
③ MaxSpareThreads 75
Sets the maximum number of free child processes. If there are currently more free child processes than MaxSpareServers, the parent process will kill the extra child processes. This parameter needs to be adjusted only on very busy machines. Setting this parameter too large is usually a bad idea. If you set the value of the instruction to be less than MaxSpareServers, Apache will automatically change it to "MaxSpareServers+1"
④ ServerLimit 2000
The maximum number of processes allowed to be configured by the server. Use it only if you need to set MaxClients higher than the default of256. Keep the value of this instruction the same as MaxClients. Changing the value of this directive will not take effect until the service is completely stopped. Restart in restart mode will not take effect.
⑤ MaxClients/MaxRequestWorkers 256
The maximum number of requests (maximum number of child processes) used for client requests, and any requests that exceed the MaxClients limit will enter the waiting queue. The default value is 256. if you want to increase this value, you must also increase the value of ServerLimit. It is recommended that you set the initial value to (maximum physical memory / 2 in Mb), and then dynamically adjust it according to the load.
⑥ MaxRequestsPerChild/MaxConnectionsPerChild 0
Set the number of requests that can be processed by each child process. Each child process is automatically destroyed after the "MaxRequestPerChild" request has been processed. 0 means infinity, that is, child processes are never destroyed. Servers with more memory can be set to 0 or a larger number, and servers with less memory can be set to 30, 50, 100. So in general, if you find that the memory of the server is rising in a straight line, it is recommended to try to modify this parameter.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.