Get A Sys Admin

sysadmin linux open source centos redhat rhel ubuntu apache mysql amazon ec2 s3 tutorial

Feb 13, 2009

More Apache benchmarks using EC2 instances

Back with more benchmarks ... This time I've tested several EC2 instances, using the AMIs provided by scalr for application roles(app and app64). Site used for testing was mEgo.
c1.medium results:
Concurrency Level: 200
Time taken for tests: 311.715596 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 306810000 bytes
HTML transferred: 303610000 bytes
Requests per second: 32.08 [#/sec] (mean)
Time per request: 6234.312 [ms] (mean)
Time per request: 31.172 [ms] (mean, across all concurrent requests)
Transfer rate: 961.19 [Kbytes/sec] received

m1.large results:
Concurrency Level: 200
Time taken for tests: 420.241673 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 308313369 bytes
HTML transferred: 305097689 bytes
Requests per second: 23.80 [#/sec] (mean)
Time per request: 8404.834 [ms] (mean)
Time per request: 42.024 [ms] (mean, across all concurrent requests)
Transfer rate: 716.46 [Kbytes/sec] received

c1.xlarge results:
Concurrency Level: 200
Time taken for tests: 70.404865 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 306810000 bytes
HTML transferred: 303610000 bytes
Requests per second: 142.04 [#/sec] (mean)
Time per request: 1408.097 [ms] (mean)
Time per request: 7.040 [ms] (mean, across all concurrent requests)
Transfer rate: 4255.66 [Kbytes/sec] received

m1.xlarge results:
Concurrency Level: 200
Time taken for tests: 215.153753 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 308098602 bytes
HTML transferred: 304885162 bytes
Requests per second: 46.48 [#/sec] (mean)
Time per request: 4303.075 [ms] (mean)
Time per request: 21.515 [ms] (mean, across all concurrent requests)
Transfer rate: 1398.43 [Kbytes/sec] received


So to sum things up:
c1.medium can serve about 32 requests per second for 0.20$ per hour.
m1.large can serve less than c1.medium, around 24 requests per second for 0.40$ per hour ... not nice :(
m1.xlarge can serve 47 requests per second, but it will cost you 0.80$ per hour.
The champion is c1.xlarge can serve 142 requests per second at same price as m1.xlarge, 0.80$ pe hour.

I didn't include m1.small benchmarks, but from a previous post I can tell you it only server 6 requests per second, not a worthy instance.

My advice would be to go with c1.medium instances since they offer best price/performance ratio. But do the math for yourself!

Labels: , , , , , , , ,

Oct 20, 2008

Updating to Ubuntu Intrepid Ibex

Last weekend I've decided to update my netbook, an MSI Wind U100 clone labeled Advent, to the latest Ubuntu version (Intrepid Ibex). While on theory everything should have been simple, the reality is I had a ton of problems.

So lets start with updating from Ubuntu 8.04 to Ibex. First you should backup your home directory to an USB stick. Also copy xorg.conf to a safe place in case things go wrong.

Start a terminal in graphic mode (press alt+f2 and type xterm). Become root:
sudo su

Type your password and when you get the root prompt (#) type:
update-manager -d

You should get a new window like this one

Press "Upgrade" and answer the questions. This was the easy part, after update-manager would have finished running I should have been a happy user running Ubuntu Intrepid, right? Wrong!



I went out to town to drink some beer since it was weekend and left the update-manager to do its job. When I got back home, surprise: I didn't plug the netbook to a power source and battery was empty, netbook offline. Nice ... Pressed the power on button and crossed fingers.


After 3-4 minutes the reality unveiled, upgrade didn't finished OK so netbook wasn't entering graphic mode and I've got a ton of failed services and errors. A quick look showed that the file system was mounted read-only. Time to repair all that mess as I didn't want to reinstall the whole system because I'm a lazy person.



Recovering after disaster


Ctr+Alt+F1 to get to first text console. Login with your username and password. Become root:
sudo su


As root remount the file system so it can be used:
mount / -o remount

If you have more partitions do so for each of them (replace / with their mount point).
Switch to run level 3:
telinit 3

When you are running in run level 3 type:
dpkg --configure -a

This should restart/fix the upgrade process from where it stopped. It will ask you if you want to replace your custom config files with new ones. I answered No. When it's done restart the netbook (use telinit 6). Make it shutdown even if you have to switch it off from power button.

When it's online again you should have a working graphic mode. If not, try to replace your xorg.conf with your backup and restart gdm with:
/etc/init.d/gdm restart


Probably you won't be having the wireless working so plug a network cable and manually reconfigure your NIC:

sudo ifconfig eth0 192.168.1.113/24
sudo route add default gw 192.168.1.1


In the above example 192.168.1.113 is netbook IP address, /24 is the netmask (equivalent to 255.255.255.0) and 192.168.1.1 is the gateway (the IP of router)


Run the following commands as root to fix all the missing dependencies:
apt-get update
apt-get -f install
apt-get upgrade

Restart the system and everything should be ok now.

Labels: , , , , , , , ,