UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 132
Python-WSGI and PHP-Apache Web Server Performance
Analysis by Search Page Generator (SPG)
Hataw Jalal Mohammed
1,a*
, Kamaran Hama Ali Faraj
2,3,b
1
Department of Applied Computer, College of Medicals and Applied Sciences, Charmo University, Sulaymaniyah,
Iraq
2
Department of Computer Science, College of Science, Cihan University, Sulaymaniyah, Iraq
3.
Department of Computer Science, College of Science, University of Sulaimani, Sulaymaniyah, Iraq
E-mail:
a
hataw.jalal87@gmail.com,
b
kamaranfaraj@yahoo.com
1. Introduction
The handwriting codes are used to design an SPG application to evaluate response time. Nevertheless, the ready
application like PageSpeed insight (PSI) was downloaded from the internet.
Three stages of benchmarking classification are management, operational and strategic benchmarking. Thus, an
operational benchmark is located in between management and strategic benchmarking (Faraj et al., 2020). Moreover,
there is a direct relationship between all three classifications of benchmarking; for example, the enhanced management
and operational will provide better strategies.
After the computer revolution and internet facilities became very popular, all businesses modified to E-business. The
very primitive benchmark is traditional changes to the E-benchmark. The operational benchmark modified to the E-
operational benchmark (Nooruldeen, 2017).
Most software uses multiple programming languages to implement specific functionalities based on the strengths and
weaknesses of different web programming languages. Researchers in the past have studied the impact of independent
Access this article online
Received on: March 18, 2021
Accepted on: April 28, 2021
Published on: June 30, 2021
DOI: 10.25079/ukhjse.v5n1y2021.pp132-138e.v5n1y2021.ppxx-xx
E-ISSN: 2520-7792
Copyright © 2021 Hataw & Kamaran. This is an open access article with Creative Commons Attribution Non-Commercial No Derivatives License
4.0 (CC BY-NC-ND 4.0)
Research Article
Abstract
The web servers (WSGI-Python) and (PHP-Apache) are in middleware tier architecture. Middleware architecture is
between frontend tier and backend tier, otherwise it’s a connection between frontend tier and backend tier for three
tier architecture. The ELearning systems are designed by two different dynamic web technologies. First is by Python-
WSGI and the second is by Personal Home Page (PHP-Apache). The two websites were designed with different
open source and cross platform web technologies programming language namely; Python and PHP in the same
structure and weight will evaluate perform over two different operating systems (OSs): 1) Windows-16 and 2) Linux-
Ubuntu 20.4. Both systems run over the same computer architecture (64bit) as a server side with a common backend
MySQL web database for both of them. Nevertheless, the middleware for PHP is a cross Apache MySQL PHP Perl
(XAMPP), but the middleware for Python is Pycharm and the web server gateway interface (WSGI). WSGI and
Apache are both web servers and this paper will show which of them has a better response time (RT). On the one
hand, the experimental results demonstrate that the Python-WSGI is even weightier in Mbyte than PHP-Apache,
on the other hand Python is still faster and more accurate than PHP. The designed SPG is by handwriting codes:
one time designed the SPG by PHP source code and the other time designed by Python source code. Both Python-
WSGI and PHP-Apache results are targeted to compare by the least time in milliseconds and take in to account
enhanced performance.
Keywords: Python, PHP, Web Server, Web service, SPG, Performance.
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 133
programming languages on software quality; however, there has been little or no research on the impact of multiple
languages on the quality of software (Kochhar et al., 2016) (QoS).
The software (SW) and hardware (HW) for web servers and E-management are an essential factor, but this paper
concentrates on software and application. Since web application is a crucial part of every functioning web application
system designed in different web technologies, Python and PHP with different web applications are WSGI-Python and
Apache-PHP and benchmarked. The benchmark has been developed to assist society in its practice of delivering quality
improvement (QI). QI for the proposed system is two different web servers (i.e., WSGI and Apache). Other sections
in the paper investigate which web server is enhanced and is calculated by handwriting codes for SPG. The enhanced
QI illustrates the results in this paper for the mentioned technologies of a search page generator in milliseconds.
The high-quality information source code measurement is considered privileged and is commonly associated with
precision and accuracy. However, it is not always pure results what features of the measurement process justify the
public trust and how the quality of measurement results are at a good level (Maul et al., 2020).
Performance can be measured in many ways, including transmit time and response time. Transmit time is the amount
of time required for a message to travel from one device to another. Response time is the elapsed time between an
inquiry and a response. The response time is the elapsed time between the end of the inquiry and the beginning of the
response (Kamaran et al., 2017). Figure 1 shows the performance by response time is elapsed time between the end
inquiry and the beginning of the response.
In the service sector, long cycle times can frustrate customers who have to wait to get service. For example, a long
cycle time in a customer service center may result in losing customers or creating negative publicity. Longer cycle time
may mean opportunities for improving the efficiency of an existing process in terms of cost and time savings and
enhancing customer satisfaction (Ramakrishnan & Kaur, 2019). The purpose of electronic technology and test web
server particularly is to support continuous quality improvement (QI) in technology-enhanced learning (Marshall &
Sankey, 2017). Correspondingly, the QI is an essential factor in this paper for evaluating web servers, and it’s a target of
enhancement for only software and application. The QI in the web server is helping for better quality of performance
(QoP) and quality of result (QoR). The QoP by the electronic operational category benchmark has opened an academic
door for researchers to investigate the new contribution, which is the workload for web servers (i.e., Apache-PHP and
WSGI-Python). Both web servers are evaluated by SPG in milliseconds. The less milliseconds is better for performance.
This means that the QoP is improved. While QoP is improved, the QI becomes much better. There is a direct relation
between QoP and QI. When the QoP and QI are enhanced, the quality of information (QoI) is definitely at a higher
level in information. In contrast, the QoP and QI are at a higher level also QoR in a perfect stage. This means that the
QoP and QI have a direct relationship between the three of them. Figure 2 shows the direct relationship between QoP,
QI, and QoR. Nevertheless, the QI and QoE are the same as each other.
Figure 2. Relationship between QoP, QI and QoR.
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 134
The purpose of this paper is to evaluate capacity added to WEBSERVER list factors. The different weight in MB for
eLearning systems is a target which is designed and implemented once by PHP-Windows and PHP-Ubuntu and another
time Python-Ubuntu and Python-Windows. The basic capacity of the web programming technique Python is 42 MB
before adding data, but the capacity of PHP is 35 MB before adding data. The WEBSERVER capacity evaluation over
different operating systems with ELearning, was designed by PHP once and by Python another time. In order to find
out the results (i.e., capacity load) of the WEBSERVER by method Search Page Generator (SPG) method was used.
The method investigated for the proposed WEBSERVER is designed by handwriting codes once by Python and the
other time designed by PHP, and was run through different operating systems, namely Linux and Windows, to
investigate new contribution parameter load capacity. The load capacity parameter was placed in the list of electronic
operations.
Ranges of Operating Systems have been used over the years, having different features and functionalities. Given this,
the comparative analysis of varying OS becomes inevitable. Thus the need arises for a comparative study that will give
an overview of the similarities and differences in different types of OS with the view to presenting and mapping the
features of the OS with various user services (Adekotujo et al., 2020).
WBRP stands for “Web Base Response Performance” which is an aspect of measuring the speed of web technology-
XAMPP over the different OS. This, in turn, is related to the design and developments, as the faster website is shown
to enhance visitor attention, loyalty, and satisfaction for XAMPP, which is currently the widespread web technology
application software and support web servers of Apache (Othman et al., 2020).
The Web Server Gateway Interface (WSGI) is a standard interface between web servers and Python web application
frameworks. By standardizing behavior and communication between web servers and Python web frameworks, WSGI
makes it possible to write portable Python web code that can be deployed in any WSGI-compliant web server. WSGI
is documented in PEP 3333 (Reitz et al., 2016).
The virtual world became more significant, and the overall number of internet users increases in the world. For that
reason, web services and web servers have become more important than ever. Web servers provide services that must
maintain reliability and maintain tolerability in terms of server response time (Samad et al., 2017). Nevertheless, the
response time of the web server is a target of investigation in this paper. The web application performance based on
load testing using performance response time in fewer results is used as a benchmark. The paper compares the results
generated from only handwriting code in Python and PHP.
2. The Architecture of the Proposed System
Electronic learning services benchmark (ELSB) is achieved in different types of web technologies over different OSs.
This paper investigates the contributed parameter in the list of operational benchmark electronically, which is more
applicable for the proposed system, and the capacity parameter for web servers parts are both Apache and WSGI is E-
operational benchmark system. Moreover, a parameter was added as a contribution of the EOB list, namely capacity
and tested by SPG method handwriting codes for ready application. The functional part covered is only the dynamic
web application because of the web database behind the website with web services in the middleware layer. Finally, the
performance benchmarking was done by applying load tests with different load sizes (i.e., 64MB, 256MB, 512MB, and
1024MB). Comparing all test results achieved for load capacity in EOB. Figure 3 shows the PHP web technology over
different OSs, also a general description of the proposed system for web technologies. Windows Apache MySQL PHP
(WAMP) by XAMP also over the Linux operating system which became LAMP.
WAMP
LAMP
Apache
PHP
Apache
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 135
Figure 4 shows Python web technology over different operating systems (i.e., Windows and Linux). Windows, WSGI,
MySQL, and Python (WWMP). The other operating system is Linux which became (LWMP).
In order to implement and test the system we designed and implemented the search engine for Search Page Generated
(SPG) in the unit of milliseconds for software requirement and hardware requirement. The system requirements for the
proposed system are hardware and software, are are explained in the next section.
2.1. Software Requirements
Software is an untouchable or soft part of the proposed system, which includes operating system and applications. All
software and applications are used for designing search engines by Search Page Generated (SPG) system. Table 1
describes all software requirements that were used for designing SPG systems by PHP web technology over different
OSs.
Table 1. Describes all software used for designing SPG by PHP over different OSs.
Windows OS
Linux-Ubuntu 20.04 OS
Development Server-WAMP (i.e. XAMP)
X: cross platform
A: Apache
M: MySQL
P: PHP
Development Server-LAMP
L: Linux
A: Apache
M: MySQL
P: PHP
Backend: database MySQL
Backend: database MySQL
Frontend: HTML, CSS and JavaScript
Frontend: HTML, CSS and JavaScript
Scripting language: PHP
Scripting language: PHP
Application: Sublime text3
Application: Sublime text3
Table 2 describes all software requirements used for designing SPG systems by Python web technology over different
OSs.
Table 2. The software requirements of Python web technology.
Windows OS
Linux-Ubuntu 20.04 OS
Development Server-WWMP
W: Windows
W: WSGI
M: MySQL
P: Python
Development Server-LWMP
L: Linux
W: WSGI
M: MySQL
P: Python
Backend: database MySQL
Backend: database MySQL
Frontend: HTML, CSS and JavaScript
Frontend: HTML, CSS and JavaScript
Scripting language: Python- Server side
Scripting language: Python- Server side
Figure 3. PHP web technology over different Oss.
WWMP
LWMP
WSGI
Python
WSGI
Figure 4. Python web technology over different OSs.
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 136
Application: PyCharm
Application: PyCharm
2.2. Hardware Requirements
The computer hardware architecture used for testing the proposed system is as below:
• Computer Laptop: HP ZBook 14.
• Processor: Intel® Core™ i7-4600U CPU @ 2.10GHz
2.70GHz.
• Installed Memory (RAM): 8.00 GB.
• System type: 64-bit architecture, x64-based processor.
• Hard drive: SSD
3. Results Analysis and Comparison
All components with different operating systems were evaluated by SPG application in milliseconds.
Table 3 shows the results of the proposed system over different OSs, namely (Windows and Linux).
Table 3. The results of the proposed system over different OSs.
Weight\
Capacity
Load time by SPG
Python-Windows
Python-
Ubuntu
PHP- Windows
PHP- Ubuntu
64MB
0ms
0ms
1ms
1ms
256MB
8ms
4ms
14ms
9ms
512MB
16ms
5ms
23ms
15ms
1024MB
24ms
9ms
38ms
30ms
The Python-Ubuntu outcome results chart illustrated in milliseconds response time by SPG is better than Python-
Windows for all capacity sizes. The overall accurate outcome results should be above two out of four and in fewer
milliseconds out of capacity. Otherwise, the perfect record result is Python-Ubuntu because the result is 4 out of 4, or
100% will be acceptable. Thus, the outcome of 100% or 4 out of 4 is the same for selecting the best OS and web
technology. Ubuntu and Python are more optimumal than Windows and PHP. Table 3 shows the rate of overall results
out of four or 75% Capacity (i.e. 64MB, 256MB, 512MB and 1024MB). All results show that Ubuntu with Python is in
the perfect state. The investigated result show that Python-Ubuntu is much more accurate and accessible than Python-
Windows; also, PHP-Ubuntu performs better than PHP-Windows. In both cases, Ubuntu and Python show a perfect
outcome. Figure 5 shows in detail all specifications of load capacity tests for Python web technology and different OSs
generated by the SPG application in the unit of millisecond.
In Figure 6, the page load time is shown in milliseconds. The page load time is a measure for performance analysis. The
designed source code is by Python web technology.
Response
Time
Capacity
Figure 5. Details of all specifications of load capacity tests for Python web technology and different Oss.
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 137
Figure 7 illustrates all specifications of load capacity tests for PHP web technology and different OSs generated by SPG
application in the unit of milliseconds.
There is an indirect relationship between response time and capacity which is shown in Figure (7); when the capacity
increases, the response time result needs more time. Thus, the overall performance is decreased.
In Figure 8, the page load time is shown in milliseconds. The page load time is a measure for performance analysis.
The designed source code is by PHP web technology.
The results for 1024 MB, which is designed in PHP web technology and tested by the SPG method, show that the load
page generator is too high in the units of milliseconds.
There are several types of architecture (i.e., tier architecture, computer architecture, internet architecture). Examples
of tier architecture are one tier architecture (1TA), two-tier architecture (2TA) and three-tier architecture (3TA).
Computer architecture examples are (32 bit, 64 bit etc.). Different types of devices or hardware are required to setup up
the internet network architecture. It can operate with both networks, such as wired or wirelessly. There are lots of
components that are involved in maintaining the architecture of internet technology.
Figure 6. Load page generator by SPG for Python.
Figure 7. Illustrates all specification of load capacity tests for PHP.
Figure 8. Load page generator by SPG for PHP.
UKH Journal of Science and Engineering | Volume 5 • Number 1 • 2021 138
4. Conclusion
New modifications have occurred in web servers, namely WSGI and Apache as mentioned and known and introduced
in modern web server communication, for example, Python-WSGI and PHP-Apache. Both were tested using
handwriting codes with difficulty to write codes if compared to ready application for testing. The ready application is
much easier to download and evaluate for both web technologies, Python, and PHP tests. The basic python capacity is
larger but executes faster. The PHP capacity is more lightweight than the Python, but time execution is faster than the
Python. This means that parallel programming in Python is better than the parallel programming of PHP. From the
results that were evaluated the Python Ubuntu is much better than PHP Ubuntu. Also, Python Windows is much better
than PHP Windows. In all evaluations, Python is run or executed at a much faster rate compared to PHP. Parallel
computing is constant for both cases; the only factor is parallelizing of programming or multitasking of Python is higher
than the PHP. That is all is related to parallelism programming of Linux-Ubuntu of users are two important factors that
affect the resulting test of capacity response time (minimum and maximum). The two factors that concentrate on the
proposed system are web technologies Python and PHP web servers that tested.
Acknowledgment
Finally, our thanks go to all who gave us permission to access their account and express their concerns of using electric
operational benchmarking. They inspired us to think deeply about the research and about providing performance
analysis by SPG and handwriting code. Also, great thanks to the Computer Science Department in College of Science
in University of Charmo and Cihan. Also, great thanks to Sulaimani University Computer Department for allowing us
to use their specific labs.
References
Adekotujo, A., Odumabo, A., Adedokun, A., & Aiyeniko, O. (2020). A Comparative Study of Operating Systems: Case
of Windows, UNIX, Linux, Mac, Android and iOS. International Journal of Computer Applications. 176. 16-23.
10.5120/ijca2020920494
Faraj, K. H.A, Kanbar, A. B., Mohammed, J.G., Hammed, W., & Karim, S. F. (2020). Cloud Computing Loading Time
over Different Operating Systems. Science Journal of University of Zakho, 8, 154 159.
Faraj, K. H.A., Najeb, N. M., Nooruldeen, B. S., & Anwar, S. A. (2017). Distances wired Relation for different connected
of Server-Computer to Client Computers Packet sizes relation for different Distances wired connected of
Server-Computer to Client Computers. The Scientific Journal of Cihan University Sulaimanyia, 1(1), 38-47. doi:
http://dx.doi.org/10.25098/1.1.4
Kochhar, P. S., Wijedasa, D., & Lo D. (2016). A Large Scale Study of Multiple Programming Languages and Code Quality. IEEE
23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), 2016, 1, 563-
573. doi: 10.1109/SANER.2016.112
Marshall, S. & Sankey, M. (2017). The ACODE Benchmarks for Technology Enhanced Learning. Conference: THETA 2017:
Conference, Connecting Minds. Creating The Future.At: Auckland, New Zealand.
Maul, A., Mari, L., Irribarra, D. T., Wilson, M. (2020). The quality of measurement results in terms of the structural
features of the measurement process, Measurement, 116.
Nooruldeen, B. S. (2017). Benchmarking Dependability of Web Servers for E-System Applications (Unpublished thesis).
University of Sulaimani,. Sulaymaniyah, Iraq.
Othman, H., Faraj, K., Ahmed, K. H., Al Attar, T. N. A., Hameed, W. M., & Kanbar, A. B. (2020). Response Time
analysis for XAMPP Server based on Different Versions of Linux Operating System. The Scientific Journal of
Cihan University Sulaimaniya, 4(2), 102-114. doi: http://dx.doi.org/10.25098/4.2.23
Ramakrishnan, R. & Kaur, A. (2019). Performance Evaluation of Web Service Response Time Probability Distribution
Models for Business Process Cycle Time Simulation. Journal of Systems and Software, 161. doi:
https://doi.org/10.1016/j.jss.2019.110480
Reitz, K., Schlusser, T., et al. (2016). The Hitchhiker’s Guide to Python: Best Practices for Development. 1st ed.. O’Reilly Media.
Samad, H., Hanizan, S. H., Din, R., Murad, R., & Tahir, A. (2017). Performance Evaluation of Web Application Server
based on Request Bit per Second and Transfer Rate Parameters. Journal of Physics: Conference Series. 1018, 1st
International Conference on Big Data and Cloud Computing (ICoBiC). doi :10.1088/1742-
6596/1018/1/012007