EVALUATING PERFORMANCE OF DRUPAL

28 281 0
EVALUATING PERFORMANCE OF DRUPAL

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

EVALUATING PERFORMANCE OF DRUPAL

UNIVERSITY OF ENGINEERING AND TECHNOLOGY VIETNAM NATIONAL UNIVERSITY OF HANOI STUDENT SCIENTIFIC RESEARCH CONTEST 2012 PROJECT: EVALUATING PERFORMANCE OF DRUPAL Name: Vu Quang Son Class: K53CA Faculty: Computer Science Supervisor: Dr. Vo Dinh Hieu Hanoi, 2012 2 PROJECT SUMMARY Project: Evaluating performance of Drupal Research time: 29/01/2012 – 29/03/2012 1. Motivation My motivation is to research on performance testing for web applications and then apply to evaluate performance of Drupal – a top open source content management framework (CMF) nowadays. 2. Main content In this project, I focus on evaluating performance of the latest Drupal 7 release at the time of this research (version 7.12 published on February 2 nd , 2012) by: - Compare its performance with the latest release of Joomla at the time of this research (version 2.5.1 published on February 2 nd , 2012) – another top open source content management system. - Compare its performance between default configuration and optimized configuration For each evaluation, a summary report will be given based on the result of testing. 3. Research result - An overview of performance testing for web applications - An overview of architecture of Drupal content management framework - An experimental on Drupal performance with the following parts: o A comparison between Drupal and Joomla performance o A comparison between Drupal 7.12 default configuration and optimized configuration performance 3 Table of contents I. INTRODUCTION 5 II. PERFORMANCE TESTING FOR WEB APPLICATIONS 7 1. Overview 7 2. Types of performance testing 7 3. Core activities of performance testing 8 III. OVERVIEW OF DRUPAL 9 1. What is Drupal 9 2. Technology stack 9 3. Drupal work flow 9 IV. PERFORMANCE EVALUATION 11 1. Evaluating default Drupal 7.12 performance, a comparison with Joomla 11 1.1. Identify test environment 11 1.2. Plan and design tests 13 1.3. Execute tests 14 1.4. Analyze test results, report 16 2. Evaluating cache and page compression in Drupal 7.12 performance 17 2.1. Identify test environment 17 2.2. Plan and design tests 18 2.3. Execute tests 19 2.4. Analyze test results, report 20 3. Evaluating front-end bandwidth optimization in Drupal 7.12 performance 22 3.1. Back-end and front-end performance 22 3.2. Make fewer HTTP requests 22 3.3. Identify test environment 23 3.4. Plan and design tests 24 3.5. Execute tests 24 3.6. Analyze test results, report 25 V. CONCLUSION 27 VI. REFERENCES 28 4 Table of figure Figure 1 – Drupal’s technology stack 9 Figure 2 – Drupal’s architecture view 10 Figure 3 – Blank theme website built with Drupal 7.12 11 Figure 4 – Default theme website built with Drupal 7.12 12 Figure 5 – Default theme website built with Joomla 2.5.1 12 Figure 6 – Apache jMeter – HTTP request configuration 14 Figure 7 – Apache jMeter – Thread group configuration 14 Figure 8 – Result for testing Drupal default theme with 10 RPS 15 Figure 9 – Result for testing Drupal default theme with 120 RPS – errors appear 15 Figure 10 – Result of testing average response time with different RPS 16 Figure 11 – Enable cache and Gzip compression in Drupal website 18 Figure 12 – Apache Benchmark result for testing Drupal site non-cached page 19 Figure 13 – Result for testing requests per second 20 Figure 14 – Result for testing bandwidth usage 21 Figure 15 – End user response time of a web page 22 Figure 16 – Enable CSS and JavaScript aggregation in Drupal 23 Figure 17 – Result testing default Drupal site with YSlow – Statistics view 24 Figure 18 – Result testing optimized Drupal site with YSlow – Statistics view 25 List of table Table 1 – Comparison in file’s weight – Drupal default and optimized site 25 Table 2 – Comparison in number of requests – Drupal default and optimized site 26 Table 3 – Comparison in loading time – Drupal default and optimized site 26 5 I. INTRODUCTION Nowadays, web sites become an essential part in every aspect of human life from economy, education, culture to entertainment. We can do a lot of things thank to the presence of the internet applications that we have on our computer systems. The importance of web application developments lie in the fact that without their innovations, internet usage and internet interaction would not have been what it is today. Therefore, building high quality websites should be considered. Of which high speed generating and loading page or website performance is a key factor. Why is it? It is only for a single reason: Users care about performance! Web site’s visitors will not be waste their time waiting for page loads themselves, but they will browse elsewhere when they are forced to wait too long. Fast web sites are rewarded, slow web sites are punished. Scalable and high performance web sites get more visitors; have happier visitors and their visitors return more often. If the revenue of a company is generated through web site, they will want to make sure that their website performance is as good as possible, because it will reduce the time required to access information, increase the number of satisfied visitors and maximize their revenue as well. Some statistics:  Amazon: 100 ms of extra load time caused a 1% drop in sales [ 1 ]  Yahoo!: 400 ms of extra load time caused a 5-9% drop in full page traffic (meaning that they leave before the page has finished generating and loading) [1]  Google: 500 ms of extra load time caused 20% fewer searches [1]  Google: trimming page size by 30% resulted in 30% more map requests [ 2 ] Hence, it is clear that even the smallest delay can have disastrous and website performance is a big problem to care about. However, there is a question can be risen up: How to evaluate performance of a website accurately. In some cases, the performance tests overestimated the performance and scalability of the web sites – leading to embarrassing and costly crashes when the web sites were deployed. In other cases, they underestimated the capacity and scalability – leading to unnecessary spending on hardware and infrastructure. 6 The purpose of this research is studying on:  Key concept of performance testing including load testing, stress testing, and other types of performance related testing  An approach for evaluating web sites including all core activities of performance testing: identifying objectives, designing tests, executing tests, analyzing results, and reporting.  Applying the above approach to execute an experimental on performance of Drupal – the most popular content management framework nowadays - to discover its speed, capacity and scalability. Now, why is this important to Drupal – because this research is about evaluating performance of Drupal in particular? No, because the Drupal experience get better: evaluating exactly performance of a Drupal website, we can:  Decide whether using Drupal as our website framework or using other content management framework instead, such as Joomla or so on.  In case of using Drupal, know how many users our website can serve without crashing, how much money we should invest on hardware and infrastructure for web server.  Measure the current speed, capacity and scalability of Drupal site and base on these measurements to improve its performance, both in front- end and back-end. More generally, a better performance Drupal would affect many:  Drupal is increasingly being used for big, high-traffic web sites, thus a better Drupal performance, a faster Drupal site would affect a lot of people  Drupal is still growing in popularity (according to its usage statistics, which only include web sites with the Update Status module enabled, there are over 670,000 web sites as of March 4 th , 2012 [ 3 ]) and would therefore affect ever more people.  Drupal is international, thanks to its internationalization and localization support, and thanks to that it is used for sites with very geographically dispersed both in developed and developing countries. A faster performance Drupal would make a big difference there as well. 7 II. PERFORMANCE TESTING FOR WEB APPLICATIONS The main task of any testing activity is to collect information in order to help stakeholders make right decisions related to the overall quality of the application being tested. Performance testing additionally focus on helping to identify bottlenecks in a system, tuning a system, establishing a baseline for future testing, and determining compliance with performance goals and requirements. In addition, the results from performance testing and analysis can help to estimate the hardware configuration required to support the application when the productions “go live”. 1. Overview Performance testing is a type of testing intended to determine or validate the speed, scalability, and/or stability characteristics of the system or application under a given workload. Performance is concerned with achieving response times, throughput, and resource-utilization levels that meet the performance objectives for the project or product. Performance testing is commonly conducted to accomplish the following:  Assess production readiness  Evaluate against performance criterion  Compare performance characteristics of multiple systems or system configurations  Find the source of performance problems  Support system tuning  Find throughput levels 2. Types of performance testing The following are the most common types of performance testing for Web applications. Load testing: This type of testing is usually used to understand the behavior of the system under a specific expected load. This load can be the expected concurrent number of users performing a specific number of transactions within the set duration. This test will give out the response times and point towards any bottlenecks in the application software. Stress testing: Stress testing is normally used to understand the upper limits of capacity within the system. This kind of test is done to determine the system's robustness in terms of extreme load and helps administrators to determine if the 8 system will perform sufficiently if the current load goes well above the expected maximum. Endurance testing: This type of testing is usually done to determine if the system can sustain the continuous expected load. During endurance tests, memory utilization is monitored to detect potential leaks and to ensure that the throughput and/or response times after some long period are as good as or better than at the beginning of the test. Spike testing: Spike testing is done by suddenly increasing a very large amount of users or loads and observing the behavior of the system. The goal is to determine whether performance will suffer, the system will fail, or it will be able to handle dramatic changes in load. Configuration testing: This type of testing is created to determine the effects of configuration changes to the system's components on the system's performance and behavior. A common example would be experimenting system’s performance with different methods of tuning and optimization. 3. Core activities of performance testing There are many approaches used for performance testing. In this research, a method with following activities is applied: Activity 1: Identify test environment. Identify the test environment as well as the tools and resources available for testing. The test environment includes hardware, software, and network configurations. Having a clear and thorough understanding of the test environment at the beginning enables more efficient test design and planning and helps identify testing challenges early in the project. Activity 2: Plan and design tests. Define test data, determine variability and how to simulate that variability, identify key scenarios. Combine this information into one or more strategy to be implemented, executed, and analyzed. Activity 3: Execute the Test. Run and monitor tests. Validate the tests, test data, and results collection. Execute validated tests for analysis while monitoring the test and the test environment. Activity 4: Analyze Results, Report, and Retest. Review, compare and analyze the data. Writing report base on result and re-execute test as needed. If all of the desired information has been collected, the test for that particular scenario on that particular configuration has been finished. 9 III. OVERVIEW OF DRUPAL 1. What is Drupal Drupal is a free and open source web content management system (CMS) and content management framework (CMF). It is used to build web sites ranging from personal blogs to corporate, political, and government sites including whitehouse.gov and data.gov.uk. Drupal ships with basic core functionality, and additional functionality is gained by enabling built-in or third-party modules. Drupal is designed to be customized, but customization is done by overriding the core or by adding modules, not by modifying the code in the core. Drupal’s design also successfully separates content management from content presentation. 2. Technology stack Drupal’s design goals include both being able to run well on inexpensive web hosting and being able to scale up to massive distributed sites. The former goal means using the most popular technology. The operating system is at such a low level in the stack that Drupal does not care much about it. Drupal runs successfully on any operating system that supports PHP. Drupal’s technology stack is illustrated in the following figure: Figure 1 – Drupal’s technology stack 3. Drupal work flow The Drupal’s core is responsible for providing the basic functionality that will be used to support other parts of the system. The core includes code that allows the 10 Drupal system to bootstrap when it receives a request, a library of common functions frequently used with Drupal, and modules that provide basic functionality Drupal handles requests from a user through a series of steps. For example, the Drupal core first bootstraps the application, defines critical variables and frequently used functions. Next, it loads critical libraries, themes, modules and so on. Finally, it returns this output to the user's browser. At predefined moments in this step-by-step process, Drupal executes hooks. In short, it means that Drupal examines some or all of the currently enabled modules, looking for functions that follow specific, predefined patterns Hooks allow modules to “hook into” Drupal’s core. Suppose user logs in, Drupal fires hook_user_login. It means that any function named according to the convention module name plus hook name will be called. For example, comment_user_login() in the comment module, locale_user_login() in the locale module, node_user_login() in the node module, and any other similarly named functions will be called. Figure 2 – Drupal’s architecture view [...]... amount of requests per second (RPS) that Drupal and Joomla website capable of serving The results from the evaluations will be compared to get a conclusion of whether Drupal or Joomla have a better performance on cache and Gzip mechanism 2.1 Identify test environment 2.1.1 The test site Default theme website of Drupal 7.12 and Joomla 2.5.1 is used for this performance testing The screenshot of two... amount of users requesting the web page concurrently, compressing and aggregating CSS, JS file will help Drupal website save a lot of loading time, traffic requests and bandwidth usage 27 V CONCLUSION Evaluating performance of Drupal is definitely a challenging project In this research I have attempted to assess Drupal performance in some aspects and got some evaluable results First, I have compared performance. .. number of HTTP requests, the total weight of the web page and the page loading time The results from the evaluations will be compared to get a conclusion of how much Drupal performance will improve when enable front-end bandwidth optimization support for CSS and JS 3.3 Identify test environment 3.3.1 The test site Default theme website of Drupal 7.12 is used for this performance testing The screenshot of. .. response time of Joomla blank theme (with no feature enabled) and default theme (with lots of features enabled) in contrast with a small different in Drupal Therefore, Drupal is more stable than Joomla 2 Evaluating cache and page compression in Drupal 7.12 performance Both Drupal and Joomla have page cache mechanism that stores dynamically generated web pages in the database By caching a web page, Drupal. .. the page’s weight and the total number of requests Optimized Drupal site saves 171.2% of the total weight and reduce 91.7% the total number of requests comparing to non-optimized Drupal site According to table 3, the average loading time for non-optimized Drupal website is 5.236 seconds and it is 20.2% slower than optimized Drupal site Remember to note that, this performance testing is done only with... administration page of both Drupal and Joomla The image below shows how caching and Gzip compression are enabled in Drupal The configuration for Joomla is similar to Drupal 18 Figure 11 – Enable cache and Gzip compression in Drupal website 2.1.2 The testing tool A testing tool is needed to measure the document length and the number of requests that Drupal and Joomla site is capable of serving per second... words, Drupal caches the web pages in compressed state while Joomla caches in uncompressed state It is still the tradeoff If the client does not support Gzip compression, Drupal performance will be impacted because it has to un-compress the cached compressed web pages for the client 2.4.3 Test result – a comparison of document length The following chart shows the difference of bandwidth usage between Drupal. .. have compared performance of the latest Drupal and Joomla release at the time of this writing In general, Drupal has a better speed, scalability and stability than Joomla In addition, Drupal s cache page mechanism for anonymous visitors is far better than Joomla Joomla, on the other hand, has a better Gzip mechanism and hence saving more bandwidth usage than Drupal in case of enabling Gzip compression... going to experiment on three aspects: Firstly, evaluate performance of Drupal on different web servers such as Apache, Nginx, Lighttpd, IIS and on different database servers including MySQL, PostgreSQL, SQLite Secondly, evaluate Drupal performance with different optimization modules such as boost, cdn, advanced cache and so on Lastly, evaluate Drupal performance before and after optimizing and tuning database,... faster page loads Drupal website contains a lot of JavaScript (JS) and CSS style sheets (CSS) not only in the core but also in the theme and modules However, Drupal can gather all the CSS and JS files to fewer big files through front-end bandwidth optimization support for CSS and JS By default, this optimization is not enabled This section shows a comparison between performance of a Drupal website before . about evaluating performance of Drupal in particular? No, because the Drupal experience get better: evaluating exactly performance of a Drupal website, we can:  Decide whether using Drupal. 7 2. Types of performance testing 7 3. Core activities of performance testing 8 III. OVERVIEW OF DRUPAL 9 1. What is Drupal 9 2. Technology stack 9 3. Drupal work flow 9 IV. PERFORMANCE. to evaluate performance of Drupal – a top open source content management framework (CMF) nowadays. 2. Main content In this project, I focus on evaluating performance of the latest Drupal 7 release

Ngày đăng: 12/04/2014, 15:45

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan