ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE on Amazon EC2, RDS and S3 Setup - Very very slow page loading times

November 05, 2012 1:09pm

Subscribe [2]
  • #1 / Nov 05, 2012 1:09pm

    We are migrating our site from a dedicated Linux server to AWS - hosting the site on an EC2 instance (EBS opimized), the DB on RDS and the files on S3.

    Here are the specs of the current dedicated server hosting our EE install:

    Quad Core Processor 3.1Ghz e3-1220 Sandy Bridge 8MB cache
    64 Bit
    Memory 4GB DDR3
    Primary Hard Drive 500GB SATAII
    5TB (5,000GB) Transfer / 100Mbps Port
    System Linux server.thxx-xxx-xx-xx-xx-xx-.1.el6.x86_64 #1 SMP Tue Apr 17 23:56:34 BST 2012 x86_64
    Build Date May 9 2012 01:50:49
    Configure Command ‘./configure’ ‘—disable-fileinfo’ ‘—enable-bcmath’ ‘—enable-calendar’ ‘—enable-ftp’ ‘—enable-gd-native-ttf’ ‘—enable-intl’ ‘—enable-libxml’ ‘—enable-magic-quotes’ ‘—enable-mbstring’ ‘—enable-pdo=shared’ ‘—enable-sockets’ ‘—prefix=/usr’ ‘—with-curl=/opt/curlssl/’ ‘—with-enchant=/usr’ ‘—with-freetype-dir=/usr’ ‘—with-gd’ ‘—with-gettext’ ‘—with-icu-dir=/usr’ ‘—with-imap=/opt/php_with_imap_client/’ ‘—with-imap-ssl=/usr’ ‘—with-jpeg-dir=/usr’ ‘—with-kerberos’ ‘—with-libdir=lib64’ ‘—with-libexpat-dir=/usr’ ‘—with-libxml-dir=/opt/xml2/’ ‘—with-mcrypt=/opt/libmcrypt/’ ‘—with-mysql=/usr’ ‘—with-mysql-sock=/var/lib/mysql/mysql.sock’ ‘—with-openssl=/usr’ ‘—with-openssl-dir=/usr’ ‘—with-pcre-regex=/opt/pcre’ ‘—with-pdo-mysql=shared’ ‘—with-pdo-sqlite=shared’ ‘—with-pic’ ‘—with-png-dir=/usr’ ‘—with-sqlite=shared’ ‘—with-xpm-dir=/usr’ ‘—with-xsl=/opt/xslt/’ ‘—with-zlib’ ‘—with-zlib-dir=/usr’
    Server API CGI/FastCGI

    Here are the specs of the AWS EC2 and RDS:

    EC2 - Extra Large (m1.xlarge) - 8 ECUs - 4 Core - 15 GiB RAM
    RDS - Standard Large DB Instance
    System Linux ipxx-xxx-xxx-xx-xx-53.46.amzn1.x86_64 #1 SMP Thu Oct 18 18:43:32 UTC 2012 x86_64
    Build Date Sep 17 2012 20:19:56
    Configure Command ‘./configure’ ‘—build=x86_64-redhat-linux-gnu’ ‘—host=x86_64-redhat-linux-gnu’ ‘—target=x86_64-amazon-linux-gnu’ ‘—program-prefix=’ ‘—prefix=/usr’ ‘—exec-prefix=/usr’ ‘—bindir=/usr/bin’ ‘—sbindir=/usr/sbin’ ‘—sysconfdir=/etc’ ‘—datadir=/usr/share’ ‘—includedir=/usr/include’ ‘—libdir=/usr/lib64’ ‘—libexecdir=/usr/libexec’ ‘—localstatedir=/var’ ‘—sharedstatedir=/var/lib’ ‘—mandir=/usr/share/man’ ‘—infodir=/usr/share/info’ ‘—cache-file=../config.cache’ ‘—with-libdir=lib64’ ‘—with-config-file-path=/etc’ ‘—with-config-file-scan-dir=/etc/php.d’ ‘—disable-debug’ ‘—with-pic’ ‘—disable-rpath’ ‘—without-pear’ ‘—with-bz2’ ‘—with-exec-dir=/usr/bin’ ‘—with-freetype-dir=/usr’ ‘—with-png-dir=/usr’ ‘—with-xpm-dir=/usr’ ‘—enable-gd-native-ttf’ ‘—with-t1lib=/usr’ ‘—without-gdbm’ ‘—with-gettext’ ‘—with-gmp’ ‘—with-iconv’ ‘—with-jpeg-dir=/usr’ ‘—with-openssl’ ‘—with-pcre-regex=/usr’ ‘—with-zlib’ ‘—with-layout=GNU’ ‘—enable-exif’ ‘—enable-ftp’ ‘—enable-magic-quotes’ ‘—enable-sockets’ ‘—with-kerberos’ ‘—enable-ucd-snmp-hack’ ‘—enable-shmop’ ‘—enable-calendar’ ‘—without-sqlite’ ‘—with-libxml-dir=/usr’ ‘—enable-xml’ ‘—with-system-tzdata’ ‘—with-mhash’ ‘—with-apxs2=/usr/sbin/apxs’ ‘—libdir=/usr/lib64/php’ ‘—enable-pdo=shared’ ‘—with-mysql=shared,/usr’ ‘—with-mysqli=shared,/usr/lib64/mysql/mysql_config’ ‘—with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config’ ‘—with-pdo-sqlite=shared,/usr’ ‘—without-gd’ ‘—disable-dom’ ‘—disable-dba’ ‘—without-unixODBC’ ‘—disable-xmlreader’ ‘—disable-xmlwriter’ ‘—without-sqlite3’ ‘—disable-phar’ ‘—disable-fileinfo’ ‘—disable-json’ ‘—without-pspell’ ‘—disable-wddx’ ‘—without-curl’ ‘—disable-posix’ ‘—disable-sysvmsg’ ‘—disable-sysvshm’ ‘—disable-sysvsem’
    Server API CGI/FastCGI

    Both servers run Linux - httpd, php.ini and my.cnf have been fine tuned the same way with more resource allocation on the EC2/RDS instances given the 4 and 2 fold increase in RAM/resources for both.

    The problem is that the much “upgraded” instance loads EXTREMELY slow as opposed to the current dedicated server - plus the web server - database server split should allow the system to accomodate much more traffic in a more efficient manner. Our CPU utilization via Cloudwatch on AWS is less than 1% for both the EC2 and RDS instance so this is not a question of resource limits.

    I’ve attached screenshots to illustrate the problem. The EE debug page is running on a completely empty template for both sites to isolate any issues - notice the controller execution time on the AWS instance - more than twice the value of the current setup. The page loading times are tested on the home pages, I can send the links to the templates, phpinfo and home pages via PM. I am using CE Cache on the live site which was disabled + cache was completely cleared at time of testing so the page loading times were not a result of CE Cache.

    Our team has build EE install servers from scratch in the past and have configured the LAMP AMI setup in the same manner.

    As a side note, another person using EE on AWS may have experienced the same issue before, unfortunately, there have been no definite answers/resolutions to this problem:

    https://forums.aws.amazon.com/thread.jspa?messageID=318685

    I have downgraded the system to the minium for now ( t1.micro EC2 and RDS ) to save on hourly costs, but they can easily be scaled up to the XLs when needed for further testing.

    This is the only issue holding us back for the full AWS migration - any inputs are greatly appreciated.

  • #2 / Nov 07, 2012 10:35am

    Shane Eckert's avatar

    Shane Eckert

    7174 posts

    Hey there chiwayentertainment,

    Thank you for posting your question. I am sorry to hear you are running into these loading issues.

    It does seem like there are some hardware issues or system configuration settings at play here. To pinpoint that issue you will need to continue working with Amazon and your SysAdmin team.

    From ExpressionEngine’s point of view, is this a pretty vanilla install? Did you do anything out of the ordinary?

    These are blank templates that give you double the times? Are you saving templates as files? Do you have any Add-Ons installed at this point?

    Please let me know and we can go from there.

    Thank you,

  • #3 / Nov 07, 2012 12:03pm

    Hi Shane,

    This is a pretty straightforward boilerplate install done by mirroring the exact production site - nothing funky other than a remotely hosted MySQL via Amazon RDS. That is what is puzzling about the issue, the production server and its LAMP settings are exactly the same and the webserver/db.sql files are “.tars” extracted / imported from the production site to the dev site.

    Yes templates are saved as files and blank templates show the sluggishness of the site and live page templates load even slower.

    I removed (disabled and deleted ) all the addons with only marginal improvements (<10% loading improvement) - so its most probably not an addon/extension issue.

    Let me know of you need more information.

     

  • #4 / Nov 07, 2012 5:06pm

    Shane Eckert's avatar

    Shane Eckert

    7174 posts

    Hey chiwayentertainment,

    Has Amazon been able to help you any further?

    If this is an identical install and mirrors one that runs fine on another server, it’s most likely something to do with Amazon’s Service. Would be very interested in what Amazon has to say about the performance.

    Is there anything in the logs that might give you a clue? I am not sure what logs to tell you to check. Apache logs might not be very helpful here. Does Amazon provide you with tools to dig into disk I/O and Network statistics?

    Thank you,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases