contributers
quick links
Running Game Servers in VMware
Posted 11:58:46 AM on Thu, 1st February 2007 by Dj-ZoRt! Image #31

This is such an obvious attempt to get hits from search engines that I'm almost ashamed of myself. Nevertheless when i googled trying to find anyones experiences running game servers in a virtualised host i came up with a grand nothing. So here are my experiences.

The scenario

Our LANparty event "SummerLAN" featured special guests from a local online gaming network to run both CounterStrike Source and Battlefield2 Tournaments.

I proposed that they build up the servers as vmware images then we would host them on server machines rather than their desktops on the day. This also meant that if the server died (we have had servers fry themselves in the past), then the server image is easily loaded elsewhere and the game goes on.

Things went largely to plan but with interesting results.

What we set up...

We attempted to run everyones favorite game "CounterStrike Source" on three different guest machines on three different host machines - one guest per host.

The guest operating system was windows xp sp2, the image was just copied to each host.
The guest was bridged out onto the real network and dhcp from our LAN, there was therefore very little changes once the image was copied.

Each host machine had different hardware, one machine was a 2.8ghz p4, 1gig ram and a sata hard disk. Other machines were similar, so they had plenty of cpu but they were hyperthreaded or single core. Yes thats really not that much memory, but we only ran one guest operating system, which we allocated 500mb ram and nothing else was running. Vmware never used host virtual memory as fake real memory for the guest - we never saw 100% ram usage in either the host or client.

Host operating systems were Windows Server 2003 and one host machine was running XP.

CSS was installed and updated using the command line windows steam for dedicated servers.

The tournament consisted of 5 on 5, so 10 people with a variety of hardware configurations connected and played.

How things went

Initially quite well. There was a slightly higher ping but it wasn't noticeable in game play.
When things went crazy, the server got a little choppy and people weren't happy. This is a LAN after all!

What we tried

In the host, go into task manager, go to the processes tab and click the cpu heading to order by cpu usage. The vmware process will most likely be using enough cpu to rank highly. Its name is vmware-vmx (something like that). right click on it, then click set priority, we pushed it up to 'High'.

How did that go?

It seemed to make some improvement but the server was still choppy when things got busy. We also tried setting the affinity to one cpu to make sure the thread didnt swap between (virtual - this is hyperthreaded) cores. Didnt make an enormous impact.

In the end, we just copied the steam folder out onto the host, shut down the guest and ran on the bare host machine. All choppiness was now gone, without playing with priorities etc.

Discussion

I was actually surprised at the behavior as vmware is not true but only para-virtualisation. For cpu oriented tasks performance is usually near the host, so with only one guest and css is pretty light server wise, i didnt foresee the results. Its clear that with a real-time intensive application such as a game server, the extra layer of a virtual machine is not massive but noticeable.

As previously mentioned, RAM wasn't that huge and was fine for just one guest. The host didnt have to share with other guests so the only increase was the vm layer.

Conclusions

The reasoning for trying vmware with game servers were still sound. It gave the tournament admins ease of server set up (just run them on their desktop) then move them to big servers at the event. This meant they could tweak away and perfect their server image, then we the LAN admins could easily load them onto a bare installed server. Admin for the tournament admins was also convenient, just using the vmware client and not needing physical access to have 'physical' access to the server (yes rdp & ssh do exist)

In the end however, despite the benefits the solution made game play less than satisfactory. Throwing more hardware at the host may help, but in a LANparty setting, we don't have that sort of cash and frankly, the benefit wouldn't be worth it.

Graphs and stuff?

I havent got any for you, this was never an experiment. Im just sharing my observations.

Things to note with moving images around

Its handy to move images around, but sometimes i have found that images just magically hang when you try to start them on a new host. Its very bizarre, and seems to happen whenever i move from a linux host to a windows host. I have solved the problem using the Image converter program (free) from vmware, just run it through and it seems to come out perfectly afterward. Usually i need to convert from single file to split 2gig files anyway, so that seems to fix the problem on the way through.

Oh yeah, its a good idea to go with 2gig split file if you plan on moving the images around. Usually if you have weird copying problems, its that magic 2 gig file size limit laughing at you. Like i said, its a quick job to convert the image to split files and get on with it.

I also have found that vmware images zip up quite well, which with large images can save a lot of transfer time (pre-allocated images will most likely compress enormously)

comments

Thanks for doing this, it saved me alot of time.

Posted by User

Cheers for this mate. Very interesting read. I was considering doing an identical thing for our next LAN, but given the results you posted, I might hold off. We're expecting closer to 50-60 people, so server load could very well become a serious issue for us. Best we stick with the base hardware for now. Thanks again. ~Neowulf

Posted by Neowulf
post a new comment

Alias/Name
Email/Website
Validate
Comment
Rating 0 0.5 1 1.5 2 2.5 3 3.5 4