Linux-based Web server performance testing

Source: Internet
Author: User
Tags tru64
Article Title: Linux-based Web server performance testing. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Abstract: Linux, as a free open-source operating system, is receiving increasing attention. With the release date of the stable Linux 2.4 kernel approaching and the release of the Intel IA-64 architecture, the share of Linux in the server operating system market will continue to expand, so the Linux-based applications will become increasingly rich. In the Internet era, the most extensive market space for operating systems is Web servers, which are the foundation of Internet information resources, the performance of Web servers is directly related to the utilization efficiency of information resources. Therefore, it is necessary to test the performance of Web servers.
  
I. Importance of Linux-based Web server performance testing
  
Linux, as a free open-source operating system, is receiving increasing attention. With the release date of the stable Linux 2.4 kernel approaching and the release of the Intel IA-64 architecture, the share of Linux in the server operating system market will continue to expand, so the Linux-based applications will become increasingly rich. In the Internet era, the most extensive market space for operating systems is Web servers, which are the foundation of Internet information resources, the performance of Web servers is directly related to the efficiency of information resource utilization. Therefore, it is necessary to test the performance of Web servers.
  
2. Take the Apache server running on the Linux platform as an example to talk about the Web server performance testing
  
The performance of a Web server is not only related to the Web server software, but also to the server hardware design level and the server operating system, therefore, the Web server performance test is a comprehensive performance test. Apache servers account for more than 60% of the global Web server software market. The following uses the Apache server running on Linux as an example to describe how to test the Web server performance.
  
1. Web server performance testing tool
  
There are many performance testing tools for Web servers. The famous ones are WebStone and WebBench. Although the implementation methods of these two tools are different, the test indicators are the same, the maximum number of request responses and data throughput are all tested per second.
  
2. the Apache server supports SSL Protocol configuration.
  
With the development of e-commerce, webBench2.0 also adds an e-commerce test set, which requires the Apache server to support SSL (Security Socket Layer ). However, the Apache server does not provide effective SSL support by default. Therefore, to use WebBench to test the e-Commerce Performance of the Apache server, you need to reconfigure the Apache server to support SSL. The following describes the specific configuration methods on the Redhat Linux6.1 and Apache1.3.9 platforms:
  
1) download
  
Apache1.3.9 http://www.apache.org)
  
Openssl-0.9.5 (http://www.openssl.org)
  
Mode-ssl-2.6.0 (http://www.modssl.org)
  
2) decompress:
  
# Tar zxvf apache *. tgz
# Tar zxvf openssl *. tgz
# Tar zxvf modssl *. tgz
  
3) change the directory of the perl Executable File
  
# Cd/openssl */util
  
Start the perlpath. pl File #! /Usr/local/bin/perl is changed to the perl directory in the current operating system. In RedHat Linux, it is #! /Usr/bin/perl. Run./perlpath. pl/usr/bin.
  
4) Compile the configuration
  
# Cd openssl-0.9.x
# Sh config
-FPIC
# Make
# Make test
# Cd mod-ssl *
#./Configure
-- With-apache =/apache_1.3.12 -- with-ssl =/openssl-0.9.5
-- Prefix =/apache_1.3.12
# Cd apache_1.3.12
# Make
# Make certificate
# Make install
  
There are many options when making certificate. The main option is to select an encryption algorithm, including RSA (which is composed of R. rivest,. shamir and L. adleman, a public key cryptography system proposed by the three professors in 1977, was named by the first letter of the three inventor's surname) and DSA (Digital Signature Algorithm). Now you can select RSA, the following information includes the country name, organization name, authentication validity period, and so on. After these steps are completed, a server. crt and server. key file will be generated. Note that the server. key file must be kept confidential. Then, enter the connection username and password.
  
After all the above work is completed, three Server Authentication Files will be generated, which are:
  
/Apache */conf/ssl. key/server. key
/Apache */conf/ssl. crt/server. crt
/Apache */conf/ssl. csr/server. csr
# Cd/mod-ssl *
#./Configure
-- With-apache =/apache_1.3.12
-- With-crt =/apache_1.3.12/conf/ssl. crt/server. crt
-- With-key =/apache_1.3.12/conf/ssl. key/server. key
# Cd/apache *
# SSL-BASE =/openssl *
./Configure
-- Enable-module = ssl
-- Prefix =/apache_1.3.12
# Make
# Make certificate
# Make install
  
3. Test the Web server throughput and the maximum number of request responses per second.
  
After all the compilation is complete, apache can support ssl. However, to test websockets, you also need to configure/apache/conf/http. in the conf file, the most important thing is to open the ssl listening port 443 and map the documentroot and Webbench3.0 directories. Then run apachectl startssl under/apache */bin/to perform a subset test of e-commerce, and run apachectl start to perform a common test, by using the console and the client WebBench software, you can test the Web server throughput and the maximum number of request responses per second in the current system configuration.
  
Iii. Analysis of WEB server test results
  
1. SMP technology and server cluster technology
  
SMP (Symmetric Ric MultiProcessing), that is, Symmetric multiple processing. A group of processors (multiple CPUs) are collected on a computer ). They share the memory and bus structure, and the system distributes Processing Task queues evenly across multiple CPUs, greatly improving the system's data processing capabilities. Windows 70% uses SMP. Generally, the performance of Dual-CPU servers is improved by about compared with that of single-CPU servers. The Linux system is not sensitive to SMP technology. According to the test results, the performance of the Web server with dual PentiumIII800CPU is not significantly improved than that with a single CPU. Compared with SMP, the cluster technology is easier to implement. It has a short development cycle and a low cost. Although the data transmission speed between nodes is lower than that of the SMP bus, the scalability of nodes is much higher than that of SMP. In a cluster, it can easily support 256 CPUs. At the same time, because nodes are loosely coupled, you can easily replace or add nodes while the system is running, therefore, its reliability and scalability are superior to the current SMP technology. However, we should note that the cluster technology is mainly limited to network bottlenecks, and key nodes even use Gigabit Networks, this is unacceptable to general users. Therefore, this issue should be taken into account in the selection.
  
2. Impact of system memory
  
In Linux, note that for some BIOS, if the memory exceeds 64 MB, you need to add the extended MEMORY command in LILO. CONF; otherwise, the server memory is only 64 MB. We tested 64 MB memory and MB memory servers. The results showed that the impact of memory on Web performance was huge, especially when the performance was improved quickly under heavy loads. The author believes that for department-level servers, due to restrictions on CPU speed, network bandwidth, and disk performance, mb-1g memory is suitable.
  
3.64-bit operating system and 64-bit Server
  
For Linux, the release of Tru64 Linux is a major event. We tested the Web performance of RedHat6.2 on Alpha of Sunday and SparcII of duwen. However, the test results are not as satisfactory as you think. The author analyzes the following reasons: first, the out-of-date test set. The test tool WebBench we use does not have a 64-bit Linux test set, and does not fully consider the advantages of 64-bit high bandwidth and massive storage. Second, the cooperation between Tru64 Linux and 64-bit hardware systems still has some problems. It is not like Solaris, which is a customized operating system developed by SUN to support 64-bit operations.
  
4. Apache server Optimization
  
One of the advantages of the Apache server system is that it can be optimized. I think there are two optimization methods: application-level and code-level. Application-level optimization is relatively simple. It mainly configures parameters in three configuration files: HTTPD. conf, ACCESS. conf, and SRM. conf. In this test, the system was not optimized, but the maximum number of processes increased from 150 to 1000 by default, reducing the time when the CPU killed the process, after testing, we found that the Web performance was improved by 10%. Code-level optimization is much more complex, and there are not many instances to be referenced. I hope to further understand it in future tests. In short, the Linux operating system has many advantages in the application of Web servers, such as the high load stability of servers. I believe many Web users have a deep understanding.
  
WebBench Introduction
  
WebBench is a testing tool mainly used to test the performance of Web servers. Its Test structure is the same as that of serverslave, and it also uses three methods: Server, client, and console. WebBench installs test files on the Web server. These files are mainly composed of HTML, GIF, and executable files. The client computer is used to simulate a Web browser to send requests to the Web server. However, the client does not use a real browser or display the response file sent by the server. Instead, it records the response information immediately after receiving the response from the Web server, and send another request immediately. This method is used to test the number of requests and data throughput processed by the Web server per second. WebBench tests can be divided into common tests and E-Commerce tests: a common test set consists of static and dynamic requests, while an e-commerce test set consists of 8% of security requests and 92% of non-security requests. In e-commerce testing, Web servers need to support the SSL (Secure Socket Layer) protocol, which is a basic security measure widely used on Web servers, security measures such as Client/Server identification, data integrity, and information confidentiality can be provided to Client/Server applications based on TCP/IP protocol.
  
About serverless
  
ServerBench is a famous application Server performance testing tool. It mainly tests the processor performance, network performance and system performance of the application Server in the Client/Server environment. Among them, the integrated performance test (sys) of the application server system is the most Benchmark Test of ServerBench. In this test, we mainly tested both the integrated performance (sys) and the processor performance (proc.
  
Serverless

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.