Increasing performance of a Garry's Mod Dedicated Server on a 2-core 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
Adversarius
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Mar 23, 2025 1:29 pm

Increasing performance of a Garry's Mod Dedicated Server on a 2-core VDS

Post by Adversarius »

I am currently looking for ways to increase the performance (particularly under stress) of my Garry's Mod Dedicated Server. As mentioned in the title, I am running it on a 2-core VDS. Upgrading to use more cores would change very little since Garry's Mod runs almost entirely in a single thread.

One thing I have recently noticed is that it appears that the main thread for the server does not go above ~80% usage, even when the server begins lagging very badly. Perhaps I misunderstand how the hardware works, but I would like the server to use all of what is currently available to it before performance really tanks. If anyone has ideas as to the cause of this, or what I can do to try and change it, those are welcome.

Other ideas to improve performance are also welcome. Currently, I am running the server with fewer physics iterations to see if that helps.
User avatar
TimeX
Staff
Staff
Posts: 1786
Joined: Thu Jul 22, 2004 12:24 am
Location: Big Bear, CA

Re: Increasing performance of a Garry's Mod Dedicated Server on a 2-core VDS

Post by TimeX »

The closer you are to 100% the more likely you are to have tiny momentary spikes hit max usage. This will show up as a stutter or maybe a jumpy ping, getting worse as you get closer to maximum usage. Is this what you are seeing happen, or does it show different symptoms?
TimeX
Adversarius
New to forums
New to forums
Posts: 2
Joined: Sun Mar 23, 2025 1:29 pm

Re: Increasing performance of a Garry's Mod Dedicated Server on a 2-core VDS

Post by Adversarius »

It might depend on your precise meaning, but those sound correct. People's pings are often double what they are naturally, and "stuttering" is a good word to describe the experience. The only thing I can think to remark is that, if this is due to momentary spikes hitting the maximum usage, it must be every second or less. Too bad the graphs on the control panel don't all display a peak CPU usage.
User avatar
TimeX
Staff
Staff
Posts: 1786
Joined: Thu Jul 22, 2004 12:24 am
Location: Big Bear, CA

Re: Increasing performance of a Garry's Mod Dedicated Server on a 2-core VDS

Post by TimeX »

A second or less would be the sort of spikes I mean. If this is what you are running into overall, then lowering your overall CPU usage would be what is needed. That ideally means going through and optimizing all of your custom content or even re-writing the code/scripts. Faster, but less ideal solutions would be lowering the tickrate or number of players.

If you think the hardware is holding you back, we can see about moving your VDS to a different, potentially faster machine. You would just need to open a help request with us from the "Help" page in your control panel for that.
TimeX
Post Reply