Archive for virtualization

.NET Development Perf Testing in a Cloud VM (EC2)

If you haven’t heard, Amazon’s EC2 service provides cloud-hosted virtual machines. Initially, they just supported Linux machine images, but recently have allowed Windows machine images. This means that you can create on-demand hosted virtual machines accessible from anywhere.

image

I decided to do some simple, informal performance testing. To do development performance testing, I like to run a build process and time it, since compiling is typically the bottleneck on a development machine (other than the IDE and the developer).

I downloaded the source code for SharpDevelop, since I knew it would be a fairly large, yet automated build process. The only thing I needed to install was .NET 3.5 SP1. As a baseline, I ran the build on my personal laptop, with these specs: 2.0GHz Core 2 Duo, 3GB RAM, 250GB 5400RPM hard drive. To test the performance of the build, I ran it once, ran a “clean” operation, then ran the build a second time, timing it only on the second run.

  • My laptop:  1 minute, 37 seconds
  • EC2 Small Instance: 2 minutes
  • EC2 Medium Instance: 41 seconds

As you can see, the EC2 “medium” instance, was over twice as fast as my local machine.

To continue my testing, I installed Visual Studio 2008 Professional, ReSharper, TortoiseSVN, and the Silverlight toolkit. My initial impression was very positive, and I could certainly see myself using it on a regular basis. From a professional standpoint, I would probably prefer a dedicated development machine. However, for an occasional hobby development environment, this might be a viable alternative.

EC2 has many advantages over running VMware or Virtual PC on your own computer:

  • Can take snapshots of drives
  • Doesn’t use resources from your computer
  • CPU can be upgraded/downgraded as needed
  • Theoretically ultra-stable host
  • Very fast Internet connection (I downloaded 800mb in less than 30s!)
  • Theoretically updated virtual hardware as time goes on
  • Potentially faster (especially if you use a laptop)

However, there are a few obvious disadvantages:

  • Pay-per-hour can get expensive if you use it full-time
  • Can’t drag and drop in and out of the VM like desktop virtualization can
  • Need to remote connect using something like remote desktop so graphics performance isn’t the best
  • Only available when you have access to the Internet
  • Not necessarily great multi-monitor support
  • Virtual machines take a while to start and snapshot

Pricing

Right now, Windows based machines are priced starting at $.15/hr (medium for $.30/hr). For a machine that runs 24/7, this can get expensive compared to dedicated hosting. However, for a machine that’s used for only a couple of hours each day, the pricing is very reasonable.

As an example, if you run a medium instance machine for 8 hours/day, 20 business days/month, you’ll end up paying $48/month.

Conclusion

Having virtual, dedicated computers available on-demand for pennies per hour is very exciting. This is half of the cloud computing equation, and I believe it’s going to be an important part of the future of the web.

Cloud Computing (and Azure) – Right for your site?

Everyone seems to be getting excited lately about the prospect of cloud computing. Just like many others, I get excited by the idea that I wouldn’t have to worry about adding servers to scale up. Theoretically, a guy (or girl) could make the next YouTube, in his basement, for free. However, there is one huge advantage that most people ignore, and that’s the fact that’s also perfect for a small scale website.

iStock_000004135866XSmall

I’ve tried or considered many different ways of hosting my content:

  • Shared hosting – Cheaply host your sites, but be at the mercy of their IT guy messing with your computer and rebooting it for automatic updates. Also, in my experience, the performance is terrible if your traffic spikes. They typically have hundreds of users on the same server as you, and you all get to compete for performance.
  • Dedicated hosting – This is what I use now, because it ensures that I get the full performance of a machine. The disadvantage is that I have a single point of failure, and I have to manage the machine myself.
  • Hosting from home – Yes, people actually do this. If you have a high enough upload speed it shouldn’t be too bad. The problem is that your connection typically won’t be able to handle traffic spikes. You’ll also potentially be a victim of power or Internet outages, where professional hosts would have redundant systems in place (in theory).

Now, let’s talk about cloud computing. That magical cloud that many don’t understand. There are two potentially viable cloud computing methods available right now:

  • Cloud virtual machines – Amazon’s EC2 solution is probably the most popular in this category. Basically, you can create, start, and stop virtual machines remotely. You just pay an hourly rate while the computer is running. You can even upgrade and downgrade the hardware as needed. The advantage is that you can treat the computer like a physical machine and configure and use it however you like. The disadvantage is that maintaining individual machines can be time consuming and is not necessarily part of your core business.
  • Cloud application server – Instead of creating virtual machines, a cloud application server runs your application directly. You no longer worry about the constraints of a physical machine. You application could potentially be run on dozens or hundreds of servers simultaneously. The major advantage is that there is little to no maintenance, because that is the job of the provider.

I see the cloud application server as having some of the greatest advantages. You’re free to write your application with a level of abstraction, which allows you to solve the problems you really want to solve.

One of the most well known cloud application services is the Google App Engine, which currently supports Python applications. Microsoft joined the game recently with Azure for ASP.NET.

As I mentioned, not only do application servers let your applications scale up, they let you pay only for what you use. This is great for the small to medium website’s that are stuck with bad shared hosting or difficult-to-manage dedicated hosting. The fact is that most sites get a few hundred visitors daily or less. If you start to think about how often a page is actually requested, you’ll realize that it’s not very much. Even with 500 users requesting 5 pages each in a 12 hour period can easily be handled with a very low end server from years ago.

The reason that application servers are so much more efficient than shared hosting is because they’re built from the ground up to spread the load around. This results in higher utilization, but more headroom for any single application. Shared hosting providers can move users between servers, but it’s usually a manual, and often difficult process. You’re bound to a specific physical machine (unless it’s VPS hosting), and if it goes down, so does your site.

Cloud computing is also a great way to handle traffic spikes such as the Digg effect. Let’s say that you only have 500 visitors today, but might get 10, 100, or 1000 times more in a single day. It happened to FaceStat. They went from 10,000 page views per day to almost a million because of a story on the front page of Yahoo. They had to scramble to add application servers and develop a scaling strategy immediately.

Conclusion – Cloud Application Server Benefits

Cloud computing has tremendous benefits. You no longer have to worry about scaling the underlying hardware, you simply pay as you go, and you can handle traffic spikes with ease. Once cloud computing becomes mainstream and absolutely reliable, there will be few reasons to not use it.

Consolidating – Subversion virtual machine moved

As I mentioned before, I’m trying to consolidate the number of websites that I have to maintain. My young-technologies.com domain was badly out of date, and didn’t really have any useful information. I decided to redirect all of it’s pages to this site.

Moving Boxes

The only page that was getting real traffic on that site was the Subversion virtual machine appliance, which I created a long time ago. I decided to move that page to this domain. That means that I have only one page to manage instead of an entire domain.

If you haven’t seen that virtual appliance, it’s worth checking out. It’s basically a fully functional Subversion install on Ubuntu linux, with WebSVN installed to view it in a web browser. It’s been downloaded over a thousand times, and it’s now being hosted using Amazon’s S3 service.

While the appliance has found a new home, I’m not sure if an when it’s going to be updated. If there are any future announcements about it, they’ll be made on this blog.

Intel Core 2 Quad Price Cuts

Two days ago Intel dropped the price on the Q6700 (2.66Ghz) processor in half. Newegg currently has this processor for $299, and you get Unreal Tournament 3 for free.

Core 2 Quad Processor

Before the price drop, I was recommending the Q6600 (2.4Ghz) because of its low price. Right now, it’s going for $229.99.

If you’re not going to overclock, and you don’t plan to take advantage of all of the cores, then the Q6700 is probably a safe bet because of the slightly higher clock speed (10% higher).

If you’re trying to save money at all, or you plan to overclock, the Q6600 is still an amazing processor. It’s easy to overclock to 3Ghz, while still running extremely cool.

Both of these processors would be great for a VMware server. Paired with some fast hard drives, and a couple gigs of memory, you could easily run 4-8 virtual machines (depending on what they’re doing of course).

It’s amazing how cheap it is to build what I would consider a fairly top of the line machine.

What it would take for me to switch to a Macintosh

Apple could come out with a killer technology that would increase their sales like nobody’s business.

VIRTUALIZATION

I know what you’re thinking. Everyone has virtualization products for the Mac. VMware, VirtualBox, and Parallels to name a few.

Here is the problem, virtualization is a pain in the ass. The average person would have no idea how to do it. You have to:

  1. Create a virtual machine and know what hardware specifications to assign it.
  2. Have access to an OS CD to install Windows, Linux, or another OS. If it’s Windows, you’ll need a retail or volume license copy.
  3. Install the OS in the virtual machine.
  4. Configure the OS, and install the software you want to use.

If you get to that point, you still have to start up the virtual machine every time you want to run a Windows program. Parallels has really made progress due to the fact that they create coherence mode, which allows you to use your Windows applications seamlessly in OSX.

Electronic CPU

Now we’re do the biggest problem. You have to decide how to allocate your resources. Let’s say you have a Macbook Pro with 1GB of RAM. If you give the virtual machine 512MB of RAM, that may be too little, or it may be more than you have to sacrifice. You shouldn’t have to make that decision.

Step 1 to solving this problem is somehow sharing the memory. The OS should be smart enough to evaluate what is running, and fit it all in.

Step 2. Now, lets take it a step further. Why should I even have to configure a virtual machine? I don’t want two file systems, just show me one. I don’t want to have to start, suspend, or stop the virtual machine.

So now imagine with me for a moment. This means that you could use your Mac to run Windows programs. I’m not claiming that it’s easy, but imagine if Apple could say that they can run all of their software AND 99% of the Windows software that is available. The productivity and beauty of a Mac, and the support of the Windows software industry.

Would you switch if it were possible?