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.