2007-07-02

Amazon EC2 and S3 performance...

I was playing around with a EC2 instance, and I got this great idea that I should benchmark the disk subsystem. I had expected pretty standard performance for the disk at /mnt, but I was wrong:

Benchmarking /dev/sda1 [1537MB], wait 30 seconds
Results: 1014 seeks/second, 0.99 ms random access time

Benchmarking /dev/sda2 [152704MB], wait 30 seconds
Results: 4494 seeks/second, 0.22 ms random access time

Thats pretty damn fast. To get this sort of performance out of a RAID-5 set I think you need a hole lot of disks, maybe 20 or so? It sure as hell beats any disk I have at home with a factor of about between 15 and 60.

I don't know if this could be a Xen problem with this particular benchmark, but if it is true I actually just found a use for EC2: to run my DB-intensive information extraction jobs on. Though they are still most likely better solved by just buying a new machine with 4 or 8GB of RAM. It is pretty cheap now.

Edit: Oh, yeah, I understand that this disk array is shared by a number of instances. A good question then is by how many? And how likely are people to actually use the disk for any stressful activity, with it being non-persistent and all?

Edit2: Oh yes, I am stupid. This is most likely due to Xen using a sparse Copy-on-Write format disk image? It would explain it all, hitting the same physical sector over and over....

2007-07-01

Flash random access write performance

I just bought a new 2GB USB stick, Sandisk Cruzer Micro. I have a Pretec Tiny 256MB since before. I benchmarked these using h2benchw in windows (and seeker in linux, but only for reads).

Now, these two are actually pretty close together in performance, h2benchw reports 0.77 ms access time for the 2GB stick, and 1.77 ms for the 256MB one. Raw read speeds are, according to linux hdparm -tT about 25MB/s for the smaller one, and slightly lower for the Sandisk.


But the real odd difference comes when I set h2benchw up to test random access _write_ performance. Pretec manages ~10ms access time here, whereas the Sandisk comes in at a whopping 132 ms!! Wooha. There faded my hope somewhat of using flash as a faster substitue for disks. X-bit labs says there are faster write access times though, specifically for Apacer HT202 sticks with a 28ms access time for writes. Thats unfortunately still in line with harddisks, so the only real benefit is the read access times, in other words flash will only be great when the ratio of read/writes is heavily biased towards reads. A typical database-load might not perform so well.