From the archive
Workstation on AWS EC2 - is it possible and worth doing?
On this page
Introduction
Motivation
This idea first came to me when I was trying to buy a new computer. I was thinking about whether I should get a good computer and use it for 1-2 years, or a perfect computer and use it for 3+ years. I then got frustrated with the number of choices and the balance between performance, weight and price. And then the idea came to me: what if I could have a machine that can be easily accessed wherever I go, can be upgraded whenever I want, and is also cost-efficient? It seems to me that a cloud workstation may be the solution.
Requirements
- A Linux/Windows programming workstation. (I am sorry if you have to use an OS X application like Xcode)
- A relatively high-performance CPU/RAM combination for programming
- Enough disk space to store project files (for me that means around 50G), preferably with good IO performance
- Fast internet connection
- Upgradable, which means I should be able to upgrade if it’s not powerful enough
- Stable and reliable
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 at a really low price. I chose to use an Arch Linux instance with the Xfce desktop environment so that I can quickly boot it up and get it running. I live in Australia so I chose to set it up in the 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 settings 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 a few things that will affect how much you are going to spend:
- Region - Where you live is something you need to consider. If you live in Australia like me, you may end up using the Sydney data centre, which will be slightly more expensive than the US data centre.
- Operating system - Yes your guess is correct, a Windows machine will cost you more than an Ubuntu machine. You don’t just get a paid operating system for free.
- Usage - AWS charges you by the number of hours you have your machine turned on, so obviously if you just use it for 2 hours every day you will not pay as much as someone who runs a server with the same instance type.
- Performance of the machine - of course, the instance type you select will directly affect your cost, by a lot. The cheapest machine is US$0.006, whereas the most expensive one can be around US$1.796
- Storage and its performance - on AWS you pay for every bit that you use (em… this doesn’t sound really optimistic, let’s try another way) - on AWS you only pay for the storage you use. The more storage you want, the more you are going to spend.
- Reserved or On Demand - AWS offers great discounts if you sign up for a contract, which they call a Reserved Instance. The advantage is obviously price, and the disadvantage is that you lose upgradeability so you are stuck for either 1 or 3 years.
- Bandwidth usage and Disk I/O - AWS charges for outbound internet usage and disk I/O, so if you are doing something crazy (which I can’t think of anything a normal developer would do) you may get some surprising costs on these things.
- Backup - If you have a full backup and if you back up regularly, this will cost some money.
Luckily everything you want to know about cost can be found here. Just 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:
- Ubuntu machine running in the Sydney region
- 8 hours average daily use (I am a heavy user)
- relatively powerful configuration as a desktop (I choose m3.large)
- about 50G SSD and reasonable bandwidth usage (as a programmer, 10% weekly disk change and network 10G outbound and 200G inbound monthly)
- 1 year on-demand contract (medium-usage works best with 8-hour daily usage)
- weekly rolling backup for the last 4 weeks
According to the AWS calculator, the calculation is like this. So a quick summary of the cost is:
- Initial cost: US$403
- Monthly bill: US$33.15
- Total cost for a year: US$800.8
Just a quick note, all the prices above are tax-exclusive. So the final cost for me at the current exchange rate will be US$880.88, which is about A$1003.87 at the time of writing this (per year).
Performance
The most important aspects of 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 results will vary a little bit so I also tried to do something like check out two Git repositories from GitHub: (docker 12.542s, mongo 38.997s)

I think there is no need to say more: you are using server infrastructure, so it must be better than ADSL2+!
CPU
I use Hardinfo to generate the CPU benchmark (sorry I am not a benchmark Pro):
- CPU Blowfish: 7.622
- CPU CryptoHash: 201.160
- CPU Fibonacci: 1.770
- CPU N-Queens: 5.643
- FPU FFT: 2.946
- FPU Raytracing: 4.235
Just to quickly compare with my home server (i7-4770):
- CPU Blowfish: 1.54 (495% better)
- CPU CryptoHash: 997.08 (495% better)
- CPU Fibonacci: 1.05 (169% better)
- CPU N-Queens: 0.39 (1447% better)
- FPU FFT: 0.64 (460% better)
- FPU Raytracing: 2.60 (163% better)
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 client and a reasonably good internet connection.
Also you have the ability to back up your machine with the snapshot feature at any time, so you get a kind of time machine feature. You also have the convenience of upgrading your hardware as needed. 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 the same 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 of testing because the VPN client lost its connection.
Conclusion
There are 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 don’t care that much about the experience or you are a system administrator who is already used 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.