We benchmarked Amazon’s new Aurora database for use with WordPress. Results within.
As an Amazon advanced technology partner we get a first look at Amazon’s new products and tools. At last year’s RE:Invent Amazon announced a new database product called Aurora, which promised up to 5x performance gains on the same hardware AND would act as a drop-in replacement to MySQL. While we did see impressive gains across the board, on average Aurora RDS is 3x faster than MySql RDS when used with WordPress. Aurora is now in full production at Pagely and we’d like to share some data and thoughts on how it has improved performance for our WordPress hosting customers.
Aurora Delivers Operational Improvements
- Aurora features Fast failover which means things like a DB upgrade can be done without noticeable down time
- Improved data in AWS dashboard (DDL/DML/Select throughput and latency, result set cache hit ratio) We have some of this in 3rd party monitoring, but it makes the day to day dashboard more useful.
- Features built-in lag reporting/monitoring
- Auto-scaling of underlying storage
- Faster metadata access
- Lower and more consistent slave lag
Our Testing Methodology.
Before moving Aurora into production use we wrote a custom script that logged every database action on 100 of our hosted WordPress sites and replayed those same database queries on Aurora. These sites were not chosen with anything special in mind and are just a random representation of WordPress sites that we host; Some small, some large, some heavy database users, some not. The script replayed every database statement that was happening on our MySQL RDS instance(s), on the Aurora RDS instance.
Furthermore, once we moved Aurora into production we logged data from WordPress sites on the MySQL RDS instances, and again once they were moved to a new Aurora Database production instance.
- We captured 3 days of production data across 100 randomly selected WordPress sites on our platform
- Comparison is between: 2 m3.2xlarge MySQL RDS servers (sites were spread across 2 of them) compared to 1 Aurora r3.large instance
- This is not a perfect comparison as the MySQL RDS’s had other traffic and are of different instance types
- However it is a fair comparison for Pagely since this was the transition we were making
- In all cases, our goal was not to maximize utilization of MySQL, it was to keep a consistent latency profile
WordPress database queries are on average up to 3x faster with Aurora.
(3x being the average means we saw some gains as high as 7x and 8x. Holy crap!)
Over 3 days of testing, the aggregate data looks like this.
|Aurora||MySql||% Improvement||Nx Faster|
|Average Query time||0.00066||0.00211||219.69%||3.2x|
|Average UPDATE time||0.00738||0.01925||160.84%||2.6x|
|Average SELECT time||0.00057||0.00118||107.01%||2.1x|
- Amazon’s Aurora Database is faster on average. Larger impact from lack of outliers than minimum query times. Minimums are heavily affected by network. In cross AZ scenarios you can lose 1-2 ms to network latency.
- In High Availability (HA) scenarios your read slaves are accessible in Aurora as compared to Multi-AZ RDS. This means for a similar price you get more available servers, and we could use AZ matching on slaves to lesson network lag, however we haven’t done this yet.
- The WordPress wp_postmeta table design leads to lots of table scans and use of disk temp tables because of the usage of blobs. With Aurora instances you are limited to one instance type, so you can’t spend less on memory and more on CPU to compensate. This hurts the $ cost per site served for the small % of sites we host with huge wp_postmeta tables.
- 1-2% of sites are not compatible with Aurora because they have odd table designs or key structures in additional tables
Pagely customers win with Amazon.
“If you ain’t first, you’re last” – Ricky Bobby. One of our favorite quotes and it hold’s true.
As the data shows there is a a real performance gain delivered by using the new Aurora Database for the average WordPress site. We have found the added performance to be very useful in scaling large WordPress sites with many millions of rows and high read counts.
Web Server caching with NGINX or Varnish has made it easy to speed up nearly any WordPress site on the front-end. PHP5 was an instant 20% speed bump, and the forthcoming PHP7 and HHVM further speed up the PHP processes. At the database layer though only MariaDB has been shown to increase query speed modestly for WordPress sites. Not anymore.
With Aurora+Pagely the gains in WordPress database performance are impactful.
Amazon has been an amazing partner to Pagely®, allowing us to scale in every direction needed to support our Enterprise clientele. WordPress is becoming ubiquitous and powers a vast swath of websites on the net today. To our customers Speed = Revenue. The new Aurora Database helps us further deliver on our core promise of high performance and scalable Managed WordPress Hosting
All Pagely customers benefit from the increased performance as we continue to roll Aurora into production. No other major WordPress hosting operation uses Amazon at the scale that we do, therefore this instant performance boost to managed WordPress is unique to Pagely. Once again: If you ain’t first, you’re last.
Contact our technical sales team to learn how Pagely can make your WordPress site fly on the most scalable WordPress hosting platform in the world.