Workstation on AWS EC2 - is it possible and worth doing?

Introduction

Motivation

This idea came first when I was trying to buy a new computer. I was thinking about whether should I get a good computer and use for 1-2 years; or a perfect computer and use it for 3+ years. I then frustrated with the amount of choices and the balance between performance, weight and price. And then it came to me the idea that what if I could have a machine that can be easily accessed wherever I go, and can be upgraded whenever I want and also cost efficient. It seems to me that a cloud workstation may be the solution.

Requirements

Let’s get real first

Step 1 - Register the machine

For the machine, I am using to test whether this is a good idea, I started with a “Spot Instance” in AWS to allow me to test it in a really low price. I choose to use an ArchLinux instance with Xfce desktop environment so that I can quickly boot it up and get it running. I live in Australia so I choose to set it up in Sydney region.

Step 2 - Install GUI and VNC

As mentioned before I am using the Xfce desktop, so in Arch Linux I just need to install the Xfce4 package group and also install tigervnc, and very quickly I now have a desktop environment. Here I won’t say too much about setting up these services. There are a lot of great tutorials out there.

Of course, you will need to tweak some UI like the font and hinting, but generally you can quickly get a relatively good looking desktop. Mine looks like this after around 10 minutes of quick tweaks.

My review and thoughts

Cost

There are few things that will affect how much you are going to spend:

Luckily everything you want about cost can be found here, just to make sure you don’t miss anything when you are doing your calculation. A good example is if you choose an EBS disk, don’t forget that I/O will cost you.

Let me just give you an example. Here is what I think I may need:

According to the AWS calculator, the calculation is like this. So a quick summary of the cost is:

Just a quick note, all the prices above are tax exclusive. So the final cost for me as the exchange rate now will be - US$880.88, which is about A$1003.87 at the time of writing this (per year).

Performance

The most important performance that I care about are network and CPU performance as I am doing a lot of code pulling and pushing, a lot of docker operations and a lot of code compiling.

Network

I did the performance test with speedtest.net, and I think the speed is quite good considering you are on Amazon’s network infrastructure. Here are some screenshots:

Speed to Melbourne Australia (Delay 12ms, Download 625.99Mbps, Upload 318.68Mbps)

Speed to California US (Delay 142ms, Download 138.67Mbps, Upload 20.29Mbps)

Speed to London UK (Delay 337ms, Download 11.15Mbps, Upload 17.56Mbps)

Speed to Beijing China (Delay 156ms, Download 375.73Mbps, Upload 192.34Mbps)

I think the result will vary a little bit so I also try to do something like check out two git repository from Github: (docker 12.542s, mongo 38.997s)

I think no need to say more: you are using a server infrastructure, must be better than ADSL2+!

CPU

I use Hardinfo to generate the CPU benchmark (sorry I am not a benchmark Pro):

Just to quickly compare with my home server (i7-4770):

Convenience

In terms of convenience, I think the cloud based workstation is really good. You don’t need to bring your heavy workstation with you anymore and you get all your files and working environment with you all the time. The only tools you will need are some kind of thin clients and a reasonable good internet connection.

Also you have the ability to backup your machine with the snapshot feature at any time, so you get a kind of time machine feature. You can also get the convenience to upgrade your hardware as you need. So you can upgrade your machine to be a more powerful one if you need more CPU power in the next few days for a specific project, or you can upgrade the machine to have more memory temporarily to run a lot of things at some time.

However, one problem I can think of is that you will lose the ability to work “offline” as there will be no “offline” option for you at all. Also the internet connection has to be reasonably stable. With my ADSL2+ at home I had to reconnect once during the hour testing because of the VPN client lost connection.

Conclusion

There’s a lot of things that I didn’t test, for example, hard drive performance and graphical performance. I think to summarise the experience a remote machine on the internet is still laggy and hard to use. Of course, if you are not that care about the experience or you are a system administrator who already use to a remote connection, then yes you would definitely get a lot of performance benefits from this.

I think it would be good if you can try it by yourself if you are really thinking of moving your workstation online. Everything matters a little bit so you need to actually try it.