Server Architecture for eZ Publish Hosting

Architectural overview

In this article we are going to focus on three different hardware configurations. For each configuration, we estimate the maximum performance you can expect from a similar hardware configuration. These results are only estimates. For accurate performance statistics, you must test your own equipment and eZ Publish installation. If you want to test performance in a clustered environment but do not have one available to you, eZ systems or one of eZ's hosting partners can provide rental access to a testing environment.

Test methods

In testing these configurations, we used a standard out-of-the-box 3.8.1 eZ Publish installation loaded with 100 000 objects. We tested serving an article list from a folder containing 5 000 articles. The results show the last 10 articles sorted by publishing date. Each new request to the server instantiates a new session. (In real-world usage, returning visitors would slightly improve the performance results.)

In our tests, view cache was both enabled and disabled ("dynamic" in the performance diagram). The same tests were also done when we had heavy write load on the system ("view cache load" and "dynamic load" in the performance diagram), inserting articles at the rate of three to five articles published per second. Delayed search indexing was enabled.

Hardware

The servers used in our testing were identical Dell 1U servers with the following configuration:

  • Dual Xeon 3.1 Ghz
  • 4GB RAM
  • 100GB SATA drives
  • 2 x 1000Mb network cards
  • Internal Gigabit switch in the rack setup

The picture below shows the hardware used for testing installed in a standard 19" rack.

The diagram below shows the results from our testing. The results show that eZ Publish scales almost linearly in a clustered environment. The difference between a single server and a cluster consisting of one database server and one webserver is minimal, but would nevertheless be noticeable under load.

Clustering performance chart

Interpreting the results

These test results show the number of pages served per second for several hardware scenarios. The numbers are the absolute maximum that the server can process. Therefore, to estimate performance in real-life scenarios, we need to make some calculated assumptions.

The information that is important for doing a performance estimate includes publishing frequency and the percentage of pages served cached versus un-cached. If we take the scenario with a single server and assume that 50% of the pages are served cached and 50% un-cached, we end up with a number: 19.23 pages / second (p / s).

Normally the publishing frequency of an eZ Publish site is much lower than the load that we tested (3-5 articles per second). Even very heavily loaded sites with active forums publish messages more like every minute or every 5 minutes. But if we take the numbers under extreme heavy load we get an average of 11.17 p / s. We can therefore assume that the actual number is somewhere between 11 and 19 p / s. Therefore, we will use 15 p / s as our estimated load that reflects realistic heavy usage.

15 p / s over a period of 24 hours is 1 269 000 pageviews per day. This number assumes that the server is running at peak capacity for 24 hours, instead of the normal pattern of peak capacity only during specific periods. For example, if a site is primarily used regionally during business hours, the site is probably only under load during 8 hours of the day. For such a scenario, we would estimate 432 000 pageviews per day (that is, one-third of 1 269 000). This translates to 12.96 million pageviews per month on a single server.

If we apply the same estimates to a configuration of four servers, we end up with 70 pages per second, a total of 2 million page views per day and 60.5 million pageviews per month. (These performance numbers are probably lower than what would be seen on a real site, as a site with heavy traffic would normally serve more cached pages than a low-traffic site.) In both situations we calculated with 50% of the pages dynamically generated.

These assumptions and estimates are, of course, theoretical. To get accurate statistics, you must test your own installation. In addition to hardware and eZ Publish software variations, other system activities (such as background jobs, backups, statistics systems and other processes) can add load to the server that affects performance.

This section describes the architecture for hosting one eZ Publish installation on one server. It assumes that the complete software stack is installed on the same server, including:

  • Linux
  • MySQL
  • Apache
  • PHP and APC
  • eZ Publish

This is currently the most common environment for hosting eZ Publish solutions and can handle sites with fairly high traffic (even without using techniques like static caching or Squid caching). The diagram below shows this setup.

Single-server environment

This section describes the architecture for eZ Publish running on one webserver and one database server. This is a similar configuration as that used for clustering, except a clustered environment has more webservers.
In this configuration, the webserver runs the following software:

  • Linux
  • Apache
  • PHP and APC
  • eZ Publish

The database server runs the following software:

  • Linux
  • MySQL

Dual-server environment

This is the architecture used for clustering eZ Publish. The architecture is similar to the dual-server environment, but has more webservers and a dedicated server for load balancing.

The load balancer has the following software installed:

  • Linux + LVS patch
  • Keepalived

Webservers have the following software installed:

  • Linux
  • Apache
  • PHP and APC
  • eZ Publish

The database server has the following software installed:

  • Linux
  • MySQL

Conclusion

This article used the results of eZ Publish performance tests to predict the performance of eZ Publish installed on several different hardware configurations. This should provide you with an idea of the performance increases you can expect by scaling your site. Also, the article described the architecture of the scaling configurations that are most common and easiest to set up with eZ Publish version 3.8 and newer.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 03:05:44
Script start
Timing: Jan 18 2025 03:05:44
Module start 'layout'
Timing: Jan 18 2025 03:05:44
Module start 'content'
Timing: Jan 18 2025 03:05:44
Module end 'content'
Timing: Jan 18 2025 03:05:44
Script end

Main resources:

Total runtime0.1171 sec
Peak memory usage4,096.0000 KB
Database Queries45

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1641152.6406
Module start 'layout' 0.00540.0022 741.804739.4766
Module start 'content' 0.00760.1083 781.2813669.2344
Module end 'content' 0.11590.0012 1,450.515614.0625
Script end 0.1171  1,464.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00302.5433160.0002
Check MTime0.00121.0417160.0001
Mysql Total
Database connection0.00060.492510.0006
Mysqli_queries0.037031.5930450.0008
Looping result0.00030.2682430.0000
Template Total0.090377.120.0451
Template load0.00191.618520.0009
Template processing0.088475.444620.0442
Template load and register function0.00010.072710.0001
states
state_id_array0.00342.935760.0006
state_identifier_array0.00383.232670.0005
Override
Cache load0.00292.4926920.0000
Sytem overhead
Fetch class attribute name0.00151.270260.0002
Fetch class attribute can translate value0.00010.044450.0000
class_abstraction
Instantiating content class attribute0.00000.010260.0000
XML
Image XML parsing0.00635.372150.0013
General
dbfile0.00584.9368200.0003
String conversion0.00000.005740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/article.tplextension/sevenx/design/simple/override/templates/full/article.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/header.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/header.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
7content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
5content/datatype/view/ezxmltags/embed.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/embed.tplEdit templateOverride template
5content/view/embed.tplembed/image.tplextension/sevenx/design/simple/override/templates/embed/image.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltags/newpage.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/newpage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 65
 Number of unique templates used: 13

Time used to render debug report: 0.0001 secs