Will a Virtual Machine home web server be noticeably slower? Why or why not?

5,030

Solution 1

There are some things in your question that have me concerned and confused about what you have and what you hope to accomplish.

First, you mention not needing linux any more. If you're running a web server, that usually means either IIS or Apache. While you could run apache on Windows, if you're hoping to get by without linux that probably means IIS, which means a Windows-based web server. But if you already have a Windows Server, then why did you ever need linux?

This tells me you're probably dealing with a linux web server after all, and you're just hoping to avoid using it as the base operating system. In that case, I still advise against using a client version of Windows as your server. But if you persist, I have two additional pieces of advice to make the best of that situation.

The first is that a home-based server is unlikely to require 2GB of RAM from your base system. Start with something smaller like 512Mb, and add more to the machine configuration only when actual performance data shows you need it.

Secondly, you're likely using PHP and Apache. PHP runs just fine on IIS. If you're not using PHP or your really need Apache, it turns out that Apache runs just fine on Windows. In either case, there's no need to build a Virtual Machine for this: you can run your site directly from the base system.

Of course, there are other good reasons to use a virtual machine: application isolation, the learning experience, high availability, etc. Any of those might be a valid reason to at least continue on this path. In that case, modern virtualization techniques are quite effective, and I think you'll find the performance quite satisfactory.

Solution 2

Moving your server to a virtual machine has nothing to do with using or not using Linux. You can run either Windows or Linux in a Virtual machine hosted by either Windows or Linux. Choice of O/S for your server should be based on what is best for your server.

For server which isn't heavily loaded, a virtual machine works well. N DMZ with e-mail and web servers runs on a virtual machine. The same hardware runs my desktop, and another virtual machine. In my case all servers are currently running Ubuntu. The quad cores are kept busy by running projects from BOINC. This uses the vast majority of my CPU cycles.

My current contract is a production modernization effort. This involves moving the application to a farm of virtual servers.

Solution 3

With a home server, your bottleneck, and main point of headaches will be your internet connection. You might have blocked ports, some things not working, and speeds that would be unacceptable for most 'proper' hosting.

Windows client builds have limits to the number of simultaneous connections, but you arn't expecting over a hundred simultaneous users are you?

OTOH, virtualised servers are common - i use a VPS for my server, on just 256mb of ram (with some tweaks, you can run a LAMP stack on 128 even) - and it outperforms my home server (atom, 2gb of ram), and they perform pretty well in general. There's little subjective difference between a physical server, and a VM (running on the same server) in a lan, with low load.

So, yeah, it would probably make sense to move your server to a VM, since processor power and ram are not your bottlenecks, its the internet connection. Backup the old setup first in case (and so you can restore it to the VM) and give it a shot.

Solution 4

This depends. if you got a plenty of ram and a cpu that supports direct virtualization the only noticeable speeddown will be the move from 5 GB ram to 2 GB ram. what OS are you going to put on the virtual machine? linux with specific guest additions will work almost as fast as a real machine. that is all of course if the windows is idle. if you doing something on windows the whole virtual machine will be considered one process and cpu time management will fail - windows will seem to be running fast and linux slow.

Solution 5

Based on all of the questions you have recently asked. I would suggest reading this article. It takes you from the basics of installing a Ubuntu server with screenshots along the way. It's very easy to follow and will take about 30 minutes. You can even try this inside of a VirtualBox VM for testing and if you're not expecting much traffic run it in a VM. I currently run a few web heads in virtual environments and they do just fine. They hit about 400 users at any given moment and have 2 CPUs/4GB RAM. Low traffic web servers do not require that much power. Hell you could even host it on a netbook and simple websites/end users wouldn't suffer at all.

http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-10.10-lamp

Share:
5,030

Related videos on Youtube

Qasim
Author by

Qasim

Software developer working on Outlook for iOS. Student at University of Toronto. 20 years old.

Updated on September 18, 2022

Comments

  • Qasim
    Qasim over 1 year

    I am thinking about moving my server to a virtual machine on my Windows 7, so I dont have to use Linux. IS this a good idea? Why or why not? My major concern is that speeds will slow down. I have 5GB of RAM, and if I do make a VM to do the job, I would probably assign up to 2GB to it.

    • Joe Internet
      Joe Internet almost 13 years
      What operating system will you run in the vm? What VM manager are you planning to use?
    • surfasb
      surfasb almost 13 years
      A conversation about performance is useless without a baseline. What kind of "speed" do you require? What are your minimum acceptable criteria? Just wanting to avoid "slowing down" is the IT equivalent of window shopping. You can dream but you can't decide. A better question is, "This is kind of applications I'm going to run on my server and I'm expecting X amount of traffic a week."
  • x20
    x20 almost 13 years
    php has so many special cases on windows thats its not same as linux php. most complex application will just fail
  • Joel Coehoorn
    Joel Coehoorn almost 13 years
    @Dani - that's much less true than it used to be. FastCGI on Server 2008 R2 usually works very well.