In the optimization of the Web server, it is necessary to optimize the scheme according to the situation and characteristics of the real Web application system. First, according to the different network characteristics: In the LAN, reduce m T U (maximum transmission unit) value pairs can avoid copying data and check, and by optimizing the select system call or in the socket event handler to perform the calculation can optimize request concurrency management, using HTTP1. 1 continuous connection and so on can improve the performance of the system, but in the WAN environment, there is no big role, and some even the opposite.
With regard to web load, in addition to analyzing the characteristics of the web load to better reproduce the real load during the evaluation, consider the load in the network environment where the Web server resides. People not only require the server to meet the normal workload requirements, but also maintain high throughput during the peak period. However, the performance of servers in high load situations is often lower than people expect.
Server overload is divided into two types: an instantaneous overload, that is, the server temporary, short time overload, this situation is mainly caused by the characteristics of the server load. A large number of studies have shown that the network traffic distribution of Web Requests is self-similar, that is, the traffic of Web requests can be significantly changed in a large range. This causes the server to overload over a short period of time, but this is usually a short duration. One is that the server is overloaded for a long time, which is typically caused by a particular event, such as a denial-of-service attack or a "live lock" phenomenon.
The first type of server overload is unavoidable, but the second scenario can be improved by improving the server. Aside from malicious attacks, careful analysis of the process of server processing information packets can be found that the system in the overload situation, the root cause of performance degradation is the high priority processing stage of the CPU unfair preemption.