25 December, 2012

Disk drive for the Amazon virtual server

Amazon virtual server uses ELB (Elastic Block Store) storage as disk drive.
It's like a HDD (Hard Disk Drive) within the physical server.

You can create ELB of any size (1GB..1TB) from the Amazon Web Console.
Then you can attach ELB to EC2 (via Web Console),
format:
sudo mkfs.ext4 /dev/xvdf

mount:
sudo mount /dev/xvdf /mnt/disk1

and use:
sudo mkdir --mode=777 /mnt/disk1/tmp

I guess that internally ELB is just a dynamically expanding file, movable between servers.
And I've expanded ELB to the entire allocated size:

dd if=/dev/zero of=/mnt/disk1/tmp/zero bs=1M

921+0 records in
920+0 records out
965447680 bytes (965 MB) copied, 29.1309 s, 33.1 MB/s


Then ELB is very fast (speed depends on the file size and state of system caches):

(1.0 MB) copied, 0.0018899 s, 555 MB/s
(10 MB) copied, 0.0122498 s, 856 MB/s
(105 MB) copied, 0.442308 s, 237 MB/s
(262 MB) copied, 4.84185 s, 54.1 MB/s

New posts

Now I have time for my own ideas and interests. Time to consolidate and sort my knowledge in order to reassemble my brain.

I'm going to write series of articles about the Amazon Web Services: cloud services, servers, storage.
For me it was quite simple and very usable service. And of course I will use it in my future projects.

Also I want to thank guys from the Amazon support team: Aaron and Adam )


02 April, 2012

Resize and rotate video

From large iPhone's 1080x1920 to compact 640x360 size:

ffmpeg.exe -i SOURCE.MOV -vf "transpose=1,scale=360:640" TARGET.MOV