makeitfaster

performance, scalability and optimizing processes

Development workstation in the Cloud

leave a comment »

I have a dream that one day I will not need to have a dedicated machine to do software development. That I will be free from the shackles of physical hardware and do all my development in the cloud.

I work as a consultant, so I change places quite often. It should not matter whether I’m at work, at home or at a client site. When virtualization first came along, I was pleased. My prayers were heard. In practice, the virtual machines required serious physical hardware to run at any decent speed and that still chained me to a big machine.

Then came the cloud. Hmm, not so much different from running my own machine… on the surface. In practice, it gives me a lot of freedom. I just rent my powerful machine instead of buying it.

I work with java, grails and .NET and for my purposes I use Windows 7 64bit most of the time. Sure, Linux is great too, but not for .NET work. Many of the cloud hosts do not support running windows so those are out of the question. I need a very responsive system, so I can’t feel the difference between running a remote desktop on my LAN or on the cloud.

That sets a very high requirement for the 4 big factors of cloud performance:

                  Network latency, Disk IOPS, RAM and CPU

Network latency is the most important. I need the host to register my mouse movement and my typing quickly. Cable quality, router speed and distance all matter. For my purposes I need to run it really close to home. I live in Copenhagen, Denmark and the network latency to Rackspace and Amazon is too great. Even their european servers are too far away in ping-time. I’ve tried host with 50ms ping time or less, and it’s still too much. I tried a great cloudhost called Cloudsigma in Zürich, but even though their performance was great, their latency was not good enough for me.

Up until now there was nothing to do. Host a server at home maybe…? Nah, I don’t want to run a powerful server at home. Not because I can’t, but because it’ll be a dinosaur in two years anyway. And what if i need 10 machines for a projekt? Or another 32 GB of ram? Nope, not for me. Cloud it is.

Cloud.dk is a new danish provider of cloud computers. Their datacenter is around 3 ms away from me, and their disk/ram/cpu are pretty good too. I’ll show some benchmarks later.
Here’s a little how-to of how to get a Windows 7 running on their infrastructure. I’ll assume that you have an account and know how to fire up a virtual machine from one of their existing images.

Step 1
Download the ISO image of your operating system. I used my MSDN account to download Windows 7 Enterprise with SP1 in the 64 bit version

Step 2
Make the ISO available via HTTP. In my case i uploaded it to an S3 bucket and made it public.

Step 3
Go into the cloud.dk control panel and go to “images” and then “fetch image” http://i.imgur.com/NkhRk.jpg

Step 4
Instruct cloud.dk to fecth the image from your httpserver. Take a look at the following image http://i.imgur.com/Y8LGG.jpg. Be sure to change the URL and be sure to add a default user.
That will start a job that fetches the image. Be sure to have a fast HTTP server, as the job will time out if it runs too long. You can go to the jobs tab to see the status. http://i.imgur.com/YHytl.jpg

Step 5
When the download is complete, you’ll have a new image in the list: http://i.imgur.com/Z8BsX.jpg. If you don’t see this, your download has failed for some reason.

Step 6
Make a new machine. Use the new image as the primary disk and add another 50GB or 100 GB disk if you need the extra space. I recommend at least 4 GB/ 2 vCPU if you plan on running Visual Studio 2010. http://i.imgur.com/jRpR0.jpg
Switch the primary and secondary disks: http://i.imgur.com/ht0gQ.jpg. Think of this as putting the harddisk as the primary and the uploaded iso image as the DVD-ROM. IF YOU FORGET THIS STEP, THE INSTALL WILL FAIL as it will be unable to partition correctly.
Start the server: http://i.imgur.com/6A921.jpg. Let the machine run for a couple of minutes and then start the console: http://i.imgur.com/oziFm.jpg
If you have java installed, it’ll start a program (webstart) that acts as a vnc console. You should see the windows install screen like this: http://i.imgur.com/p9Lrp.jpg

Step 7
Install windows as you normally would.

Step 8
Enable Remote Desktop in windows 7
Close the console
Login with remote desktop :)
Your Win 7 should be ready for you to setup as you like.
My install (from boot to remote desktop login) took around 12 minutes! That’s fast! And that time even included waiting for the human (me) to react

Step 9
Shutdown the machine. If you logged on with remote desktop you can shutdown with this command:
shutdown -s -f -t 3
After that, you wait for the VM to be completely off. When it’s off, remove the ISO image from the server: http://i.imgur.com/8W6KM.jpg
After that, delete the disk image. http://i.imgur.com/cn77v.jpg. It’s a copy of the uploaded image anyway, so no need to waste cloud storage on it. You can still make new machines with the uploaded image.

Step 10
That’s it. No more required steps. I do have a few suggestions for activities though:
- Get all windows updates
- Set up the cloud.dk firewall. RDP uses port 3389
- Enable power management and set to hibernate after 1 hour without use. Execute the command “powercfg -H ON” in an elevated prompt to enable hibernation feature of of Win7 if it’s not enabled already.
- Figure out how to start and stop your machine from the commandline API
- Disable the pesky UAC feature.

Oh, I almost forgot I promised some benchmarks. Remember this is the 4 GB / 2 vCPU machine configuration.

  • Geekbench: 4580 – A decent score, as expected.
  • Crystal Disk Mark 4K QD32: 43.77 MB/s read and 11.84 MB/s write. An impressive score for a cloud machine. They’re using a TSM system, where their SAN has a mix og ssd’s, harddrives, large ram caches and migrates automatically. Seems to work out nicely for them
  • Speedtest.net: Ping 5ms, download 186.64 Mbps, uploda 180.86 Mbps
  • Pingtest.net: Packet loss 0%, PIng 4 ms, jitter 1 ms.
  • Details here: http://i.imgur.com/qb9Jr.jpg

So: in summary, a decent RAM/CPU score, a good network score and a disk score that’s similar to a low end SSD. That’s just numbers, and good ones too, but…
What’s my “feel” for it? Well, it feels very snappy and fast. Complete windows install in 12 minutes. Windows updates download and install quickly. Any sort of manipulation of the user interface feels almost as if it was a local machine. Everything loads quickly and programs start up fast. It feels almost like it’s a SSD :)

Enjoy your new workstation in the cloud!

Advertisement

Written by Sebastian Vilstrup

October 18, 2011 at 15:24

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.