I have Amazon EC2 micro server in Singapore. It has proven to be quite enough as my own playground.
I just signed up for 3 year deal to reduce the CPU costs.
The EC2 micro instance has 613MB of memory, which is not much, but seems to be enough. I have few drupal sites (drupal6 and drupal7), which are not quite optimized for CPU usage. Not a lot of load, about 800 hits per day.
Overall it's fine, except one small thing. Amazon charges for i/o operations. Currently the rate is USD$0.11 per 1 million iops.
Earlier months, before optimization I used 55-70 million iops per month. USD6-8, which is not really much, but as the server itself costs about the same I consider this as an project to reduce the iops.
So far I have managed to reduce the iops to about 400.000 per day or about 12 million per month. Mainly following the advices given how to reduce disk writes on SSD's.
Steps which have been done for now.
Tuning apache2 default settings /etc/apache2/apache2.conf
<IfModule mpm_prefork_module>StartServers 3MinSpareServers 2MaxSpareServers 5MaxClients 15MaxRequestsPerChild 800</IfModule>
<IfModule mpm_worker_module>StartServers 2MinSpareThreads 15MaxSpareThreads 25ThreadLimit 32ThreadsPerChild 15MaxClients 15MaxRequestsPerChild 800</IfModule>
<IfModule mpm_event_module>StartServers 2MinSpareThreads 15MaxSpareThreads 25ThreadLimit 32ThreadsPerChild 15MaxClients 15MaxRequestsPerChild 800</IfModule>
Earlier, these two settings dropped iops from 70M to 55M per month
- Create /tmpfs on RAM
- adding noatime,noadirtime to fastab for / and /tmpfs
During last weekend following steps, which reduced the iops to 12M per month (400.000/day)
- adding commit=60 for / which is using ext3 filesystem to /etc/fstab
LABEL=cloudimg-rootfs / ext3 noatime,nodiratime,defaults,commit=60 0 0tmpfs /tmp tmpfs defaults,noexec,nosuid,mode=1777 0 0
- Lessening disk writes and swappiness /etc/sysctl.conf
vm.dirty_ratio = 40
vm.dirty_background_ratio = 1
vm.dirty_writeback_centisecs = 6000
vm.swappiness = 10
innodb_log_buffer_size = 32Mtmp_table_size = 32Mmax_heap_table_size = 32Minnodb_flush_log_at_trx_commit=2