Advertisement

Question about OS for server hosting

Started by January 31, 2014 06:12 AM
4 comments, last by pindrought 10 years, 9 months ago

Okay so i'm currently making a little game as a fun project. While working on the server/client, i've been using Winsock. I've been wondering if it'd make more sense to rewrite the server in linux so that i'd be able to run it on a linux server. Does anyone know an idea of the real performance difference i'd have between running a server on a linux server vs running it on a windows server for a game?

You can saturate your network bandwidth on either platform. You can also saturate your processor usage on either platform. The same with any other resource; memory, disk access, or any other resource can be the constraining factors for performance.

The resource that limits your performance first is going to depend on the design and implementation of the server's software and hardware rather than on the operating system.

For a little game as a fun project you will likely never saturate any resource, so just use whatever is easiest for you.

Advertisement

I pretty much agree with what frob said. However, one big plus regarding Linux is that getting your hands on a (virtual?) Linux-based server with a public static IP is usually a lot cheaper than the Windows counterpart. Winsock is largely compatible with the Berkeley sockets used in Unix, so that should not be a big issue.

If you are not using a lot of Windows-specific code in your server, and you are interested in porting to Linux, I'd say go for it!

The main consideration is cost. Commercial hosting costs less for Linux instances than for Window instances.

If you're hosting locally on a desktop machine, you can either spring for a Windows Server license and configure it to run headless or else use a desktop license and a good chunk of your resources go to running the GUI, so cost is still a factor. A Linux server instance can be free of cost and headless.

If you're considering running your server in the cloud, your best bet is Linux not only because of the lower cost, but because the vast majority of cloud services run on Linux so it's easier to find help online when you run into problems. Consider that even on Microsoft's Azure cloud service most instances run some kind of Linux.

I'd recommend using Linux for your server, and while you're developing and testing, run the server instance in a virtual machine on your Windows host until you hit a resource constraint.

Stephen M. Webb
Professional Free Software Developer

a good chunk of your resources go to running the GUI


That's not actually true, unless by "resources" you mean "power to run the GPU."

even on Microsoft's Azure cloud service most instances run some kind of Linux


I think that's a misleading statement. That's like saying that, just because Linux has WINE, most Linux installations run some form of Windows. True, you can run Linux as guests on Azure, but the implementation and management is based on Hyper-V and Windows Server.

There are a large number of systems that use all Windows servers, from original EverQuest to Xbox Live to Stack Overflow. It is totally possible to run a distributed, all-Windows server farm, and if you're much more familiar with Windows than with Linux, and people-time is more precious than server-licenses, then that's clearly a possible route.

Personally, I would never do it; each time I've been involved with using Windows for any kind of server for real, it's ended in frustration and a port to Linux. But it is absolutely doable and possibly the right choice for the right team.
enum Bool { True, False, FileNotFound };

Thanks for all the great answers you guys. :D

This topic is closed to new replies.

Advertisement