The purpose of this study is to analyze and then model, using neural network models, the performance of the Web server in order to improve them. In our experiments, the parameters taken into account are the number of instances of clients simultaneously requesting the same Web page that contains the same SQL queries, the number of tables queried by the SQL, the number of records to be displayed on the requested Web pages, and the type of used database server. This work demonstrates the influences of these parameters on the results of Web server performance analyzes. For the MySQL database server, it has been observed that the mean response time of the Web server tends to become increasingly slow as the number of client connection occurrences as well as the number of records to display increases. For the PostgreSQL database server, the mean response time of the Web server does not change much, although there is an increase in the number of clients and/or size of information to be displayed on Web pages. Although it has been observed that the mean response time of the Web server is generally a little faster for the MySQL database server, it has been noted that this mean response time of the Web server is more stable for PostgreSQL database server.
Different types of information are available on different websites around the world via the client-server system commonly known as the World Wide Web (www). Indeed, Web technology offers the ability to manipulate data stored on database servers. Web server performance is important because users require the access speed to different information on the Internet. Alternatively, the number of clients, the type of database servers used, the quality of the network, the type and size of the information to be manipulated, affect the latency of the Web server.
On each server, the two characteristics that mark the clients are: the wait time closely related to the response time of the server, i.e. the time required by the browser to display the information, and the time taken by the server to satisfy customer requests. Previous studies [
Other authors [
Other studies [
More recently, in the example of [
This paper examines the database server’s influences on Web server performances by using the neural network model. In fact, databases are particularly resource-intensive. In this work, we used MySQL and PostgreSQL as database servers because of their popularity and licensing [
The research presented in this work is divided into two main parts. The first part is about performance analysis of the Web server; and the second part is modeling the performance of the web server using Neural Networks models.
We performed all our experiments in localhost and no formatting was done on the web pages; in order to avoid the possible influences of the network architectures on the results and not to affect the loading time of the web pages.
During experimentations, we used an ASUS K53SV laptop that has a 4 GB RAM and a Core i5-2410M processor (2.30 GHz × 4) on which we have installed Ubuntu 14.0432 bit Linux.
For both types of database server (MySQL 5.5 and PostgreSQL 9.1), we used the “employees” database downloaded from the official MySQL site because it provides a combination of a large database of about 160 Mo spread over six separate tables with 4 million records in total. Specially designed for researchers, the “employees” database also includes a series of tests to ensure the integrity of the loaded data. In order to avoid affecting the data integrity of used databases, we only used the SELECT query that was designed to display the data.
We used Apache 2.4 as HTTP server, PHP 5.5 as programming language for Web pages, Apache Benchmark 2.3 as assessment tool and SNNS 4.2 for the neural network modelization.
We adopted the test plans that the details of which are in
Where β = M for MySQL and P for PostgreSQL. For each Test βij, (where i representing the number of simultaneous connection instances of clients varies from 1 to 5 occurrences, and j which represents the number of tables affected by SQL queries varies from 1 to 3 tables). We have developed pagex.php web pages (where x varies from 1 to 1000 according to the number of records to be displayed for each test).
We have also developed Shell scripts to plan the execution of all these tests and collect all the 30,000 results, which in turn have served as inputs for the modeling phase using neural networks.
Database server β | ||||||
---|---|---|---|---|---|---|
Number of simultaneous connection occurrences of clients | ||||||
1 | 2 | 3 | 4 | 5 | ||
Number of tables affected by SQL queries | 1 | Test β11 Nb of record 1 to 1000 | Test β12 Nb of record 1 to 1000 | Test β13 Nb of record 1 to 1000 | Test β14 Nb of record 1 to 1000 | Test β15 Nb of record 1 to 1000 |
2 | Test β21 Nb of record 1 to 1000 | Test β22 Nb of record 1 to 1000 | Test β23 Nb of record 1 to 1000 | Test β24 Nb of record 1 to 1000 | Test β25 Nb of record 1 to 1000 | |
3 | Test β31 Nb of record 1 to 1000 | Test β32 Nb of record 1 to 1000 | Test β33 Nb of record 1 to 1000 | Test β34 Nb of record 1 to 1000 | Test β35 Nb of record 1 to 1000 |
We have summarized the results of experiments M3J in
It is observed in
In
In
In this Section 1, we presented an analysis of Web server performance in terms of mean response time where MySQL and PostgreSQL here used as the
database server. The Apache Benchmark tool which is an HTTP server performance testing tool has allowed us to the custom simulations during the various experiments carrying out the examination of the Web server behavior. It was equally possible to analyze the inpact of some SQL queries settings on the Web server behavior. Indeed, changes in these parameters affect a non-linear web server mean response time. The modeling of these non-linear characteristics of the relationship between the parameters and server response time requires “smart” mechanisms; hence the concept of “smart system”. We’ll treat in the Section 2, the neural networks modeling for predicting the average response times from the Web server performances based on the number of clients, number of queried tables by SQL queries, and the number of records to display.
This second section addresses the phases of modeling Web server performance in terms of average response time using neural network models. We used SNNS version 4.2 [
As a neural network architecture, we used a MLP (or MultiLayer Perceptron) model with 3 layers. An input layer with 3 neurons that correspond to the 3 parameters taken into account during the performance analyzes in Section 2. Then, a hidden layer with 2, 4, 8, 16 and 32 neurons. And an output layer of a neuron corresponding also to the average response times of the Web server obtained during the performance analyzes of the previous section. We used Supervised Learning [
We performed much training with many possible combinations for the choices parts of the learning basis. In our case, so we calculated C 8 10 = 45 independent learning for the evaluation of the generalization error. The MSE or “Mean Squared Error” was used to estimate the neural models performance. In this experiment, each learning basis contains 12,000 examples for MySQL and PostgreSQL database servers, and 3000 examples for each validations.
Training ResultsBoth simulation results obtained with the SNNS tool are presented in this section. The first simulation corresponds to the response time of the MySQL database server, while the second when using PostgreSQL. The three parameters of the input vector are: number of occurrence of simultaneous client connections (nb_occ); the number of tables queried by SQL (nb_tbl); and the number of records to display on Web pages (nb_rec). We have only one output, the Web server mean response time: θm for MySQL and θp, for PostgreSQL. It is therefore to learn the relationships: (nb_occ, nb_tbl, nb_rec) → θ m for MySQL and (nb_occ, nb_tbl, nb_enreg) → θ p for PostgreSQL.
The learning outcomes of the Web server mean response time using the MySQL and PostgreSQL servers database for MLP with 2, 4, 8, 16 and 32 hidden neurons are summarized in
When learning networks using the foundations of examples from the performance test results of the server using MySQL and PostgreSQL, it is found that the network whose architecture is 3/16/1 turns out the most efficient. Indeed, 3/16/1 architecture yields sufficiently small MSE: 0.0015108 for MySQL and 0.44738 for PostgreSQL.
The various research works related to Web server performance are in different aspects. If [
In our case, we examined the influence of the MySQL and PostgreSQL database servers on Apache Web server performance using neural network modeling. To do this, we started by analyzing the mean response time of the Web server based on: the number of simultaneous connection instances of clients, the number of tables requested by SQL queries, and the number of records to display. Then, we used the results obtained for the neural modeling phase with the “Stuttgart Neural Network Simulator” tool.
MySQL | PostgreSQL | ||
---|---|---|---|
Architecture | MSE | Architecture | MSE |
03/02/2001 | 0.012828 | 03/02/2001 | 0.014817 |
03/04/2001 | 0.003253 | 03/04/2001 | 0.005559 |
03/08/2001 | 0.001689 | 03/08/2001 | 0.004564 |
3/16/1 | 0.001511 | 3/16/1 | 0.004474 |
3/32/1 | 0.012828 | 3/32/1 | 0.014817 |
This research work has been specially oriented to the evaluation problem and neural network modeling of the Web server performance using MySQL and PostgreSQL. It was possible to study the influence of some parameters of the database management system used by the Web server; in particular, according the number of customers, the size of the information requested and the number of records to display. We created a learning base from obtained data during the Web server performance analysis. The SNNS (Stuttgart Neural Network Simulator) as neural network simulation tool was used for the construction of two neural networks for the prediction of the Web server response time. The first network is for predicting the web server mean response time using MySQL, while the second, for a Web server using PostgreSQL.
The interpretations of the results obtained allowed us to state that for the two types of database server used, the average response times observed are much faster for MySQL than for PostgreSQL to a few tens of milliseconds. At the same time, we observed significant variations in these average response times for MySQL. While for PostgreSQL, the variation of these average response times of the Web server is more stable.
It would be interesting to increase the values of the parameters that we have taken into account in a very significant way in order to broaden our scope of analysis. The Apache Web server and the two database servers we used, were used with the default configuration values. Indeed, the proposal of a model taking into account the different configurations of the Web server, the database servers, etc. remains a challenge.
The authors declare no conflicts of interest regarding the publication of this paper.
Rafamantanantsoa, F. and Laha, M. (2018) Analysis and Neural Networks Modeling of Web Server Performances Using MySQL and PostgreSQL. Communications and Network, 10, 142-151. https://doi.org/10.4236/cn.2018.104012