Questions about optimizing game server performance on a VDS

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
Patriot
A regular
A regular
Posts: 40
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Jan 15, 2012 12:10 pm

Questions about optimizing game server performance on a VDS

Post by Patriot »

When to Increase the amount of Physical Memory?
My 3-core VDS currently has 3 Gb of RAM with 50% of that used by three L4D2 game servers and the OS (Win 2003 Server). Each game server currently uses close to or just over 300Mb or RAM. If memory use for each incremental L4D2 server is linear, I should be able to add another 5 servers before reaching 100% use of physical memory.

Other posts have talked about keeping CPU load below 50% on average. At what point will memory usage negatively affect game server performance, assuming a CPU load below 50%?

Dedicated IP or One IP with multiple Ports for a Game Server?
Is there any performance impact on a game server when using a dedicated IP versus sharing an IP and using different ports? How many ports can be used for game servers on a VDS? If using multiple ports, does it matter if the port numbers are in sequential order (i.e. 27015, 27016, 27017, etc.) or not?

Maximum FPS for L4D2 servers?
My three L4D2 servers all run at 400+ FPS on Windows 2003 Server. Given that L4D2 is somewhat unique, can the FPS be further increased with Windows 2008 and HPET as with other Source games?

Thank you,

Patriot
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Questions about optimizing game server performance on a

Post by Edge100x »

Patriot wrote:When to Increase the amount of Physical Memory?
Generally you should upgrade your memory when you have less than around 300 MB available. This minimum amount is needed for the disk cache to be effective and for Windows to be able to satisfy temporary memory requests.
At what point will memory usage negatively affect game server performance, assuming a CPU load below 50%?
The two are mostly independent.
Is there any performance impact on a game server when using a dedicated IP versus sharing an IP and using different ports?
No.
How many ports can be used for game servers on a VDS? If using multiple ports, does it matter if the port numbers are in sequential order (i.e. 27015, 27016, 27017, etc.) or not?
You can use as many ports as you'd like, but keep in mind that our default DDoS mitigation rules only cover common ones, like 27015 to 27030. If you use multiple ports, just make sure that your servers don't step on each other, because some games (like Orangebox) use multiple ports per instance. Check which ports each instance is using with "netstat -ano" output.
My three L4D2 servers all run at 400+ FPS on Windows 2003 Server. Given that L4D2 is somewhat unique, can the FPS be further increased with Windows 2008 and HPET as with other Source games?
Yes, I would expect it to be able to be increased to 1000 under Windows 2008, as with other Source-based games that use the older tickrate/FPS model. However, L4D2 has such a low and locked tickrate (30) that the FPS doesn't matter very much; you may actually have better results (lower CPU usage, for instance) from running at a lower one.
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

Edge100x,

Thank you for such a quick and thorough reply! The service at NFO is really outstanding.

Best regards,

Patriot
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

Edge100x,

I have a a followup question about memory resources and use after taking a closer look at Task Manager.

Attached is screen showing resource use on my 3-core VDS with 3 full L4D2 servers running. Can you explain how to interpret the page file use versus physical memory (total, available, and system cache) and offer guidance on how to optimize memory resource usage, such as with settings in the server OS or hardware upgrades (ssd, additional physical memory, etc.)?

Thank you,
Patriot
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: Questions about optimizing game server performance on a

Post by .=QUACK=.Major.Pain »

Your graphs look ok.

We run ours pretty hard and have no issues.

3 core VDS with 1gb upgraded memory.

Runs: 4 L4D2, 1 TS3, and 5 Procons.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

.=QUACK=.Major.Pain wrote:Your graphs look ok.

We run ours pretty hard and have no issues.

3 core VDS with 1gb upgraded memory.

Runs: 4 L4D2, 1 TS3, and 5 Procons.
Hi Major,

Thank you for the feedback. It's helpful to know what others are running on comparable servers.

Not to get off-topic here, but if you run L4D2 versus servers with SourceMod plugins, have you ever experienced an issue with missing health packs and ammo during the first round when joining from a lobby?

Regards,
Patriot
User avatar
TimeX
Staff
Staff
Posts: 1796
Joined: Thu Jul 22, 2004 12:24 am
Location: Big Bear, CA

Re: Questions about optimizing game server performance on a

Post by TimeX »

Not too long ago I talked to a customer at great length trying to troubleshoot that very problem, but I don't recall the outcome. I'm not sure if that was you perhaps, but I can spend some time later tracking it down again if it will help.
TimeX
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Questions about optimizing game server performance on a

Post by Edge100x »

In terms of your resource usage, I agree that you appeared to be doing very well at the time that screenie was taken. Your overall CPU usage and CPU usage per-core both appear to have been low, and you had ~1.2 GB of available memory. Your peak commit charge number tells us that at one time your servers had requested ~2.61 GB of memory, which got close to your 3 GB limit (if all of it was in physical memory), but it did leave some buffer.
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: Questions about optimizing game server performance on a

Post by .=QUACK=.Major.Pain »

We run Win2008 compared to your Win2003, and we don't run any plugins on our L4D2 servers. We found people just prefer to play the custom maps and the plugins just cause extra load.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

.=QUACK=.Major.Pain wrote:We run Win2008 compared to your Win2003, and we don't run any plugins on our L4D2 servers. We found people just prefer to play the custom maps and the plugins just cause extra load.
Major,

Thank you for the additional details about your servers and OS.

Patriot
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

TimeX wrote:Not too long ago I talked to a customer at great length trying to troubleshoot that very problem, but I don't recall the outcome. I'm not sure if that was you perhaps, but I can spend some time later tracking it down again if it will help.
TimeX,

Thank you for your offer to track down the issue. I don't think it is necessary at this point, however.

Patriot
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

1. How are you assessing per-core CPU usage from the screen shot?

2. Could you please comment on Page File usage and how it should be interpreted?
Patriot
A regular
A regular
Posts: 40
Joined: Sun Jan 15, 2012 12:10 pm

Re: Questions about optimizing game server performance on a

Post by Patriot »

Edge100X,
Edge100X wrote: On Windows 2003, what it's calling "PF Usage" is mislabeled; it's actually the commit charge, which is the total amount of space that all processes on the server have requested. Not all of this memory will actually be used by the processes after they request it, so you may not need as much memory as the commit charge would seem to indicate.
Thank you so much for the clarification. I was thinking "PF Usage" represented the virtual memory paging file, which is hard disk access and much slower than physical memory access. Hence my mentioning an SSD, thinking if the server is using virtual memory better to have it on an SSD.

Patriot
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Questions about optimizing game server performance on a

Post by Edge100x »

I accidentally edited your post instead of replying before, it seems! I was likely trying to edit my own, right after posting it.

I'll edit yours back. Here's what I said in my accidental edit, that you just referenced:
1. How are you assessing per-core CPU usage from the screen shot?
Windows breaks it out per-core there. If you don't have processes assigned to specific cores, we may be seeing some of the usage of a particular process assigned to multiple cores and mis-represented low numbers as a result, but your overall usage is lower than a single fully-utilized core would represent (33%) as well.
2. Could you please comment on Page File usage and how it should be interpreted?
On Windows 2003, what it's calling "PF Usage" is mislabeled; it's actually the commit charge, which is the total amount of space that all processes on the server have requested. Not all of this memory will actually be used by the processes after they request it, so you may not need as much memory as the commit charge would seem to indicate.
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Questions about optimizing game server performance on a

Post by Edge100x »

Patriot wrote:Thank you so much for the clarification. I was thinking "PF Usage" represented the virtual memory paging file, which is hard disk access and much slower than physical memory access. Hence my mentioning an SSD, thinking if the server is using virtual memory better to have it on an SSD.
Nod, it is confusing that they refer to it like this.

You are right that "hard faults" (when the OS has to retrieve a page that was previously pushed to disk) do cause a serious performance hit. It's more difficult to see the count of these on Windows 2003 than in Windows 2008+ because there's no easy system counter for them, but you can tell approximately when they start because you will see available RAM drop to under 200-300 MB, simultaneous with a high commit charge (higher than the total RAM in the system) and heavy disk access.
Post Reply