Lag in VPS

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
FaithlessDbo
New to forums
New to forums
Posts: 12
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Apr 20, 2014 5:19 am

Lag in VPS

Post by FaithlessDbo »

Hello,

Since recently I got lag spikes in the server and I'm wondering if anyone knows how I can figure out what they come from and how I can fix them. I got a HLDS running

Code: Select all

top - 11:42:34 up 1 day, 20 min,  1 user,  load average: 0.18, 0.07, 0.06
Tasks: 120 total,   3 running, 117 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5.2 us,  1.0 sy,  0.0 ni, 93.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.7 st
KiB Mem:   1008456 total,   796992 used,   211464 free,    88348 buffers
KiB Swap:        0 total,        0 used,        0 free,   467500 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 7713 steam     20   0  119m  79m 9348 R  10.6  8.1   0:54.01 hlds_linux
   46 root      20   0     0    0    0 S   0.3  0.0   1:33.59 kworker/0:1
   79 root      20   0     0    0    0 S   0.3  0.0   0:36.47 scsi_eh_1
 7417 steam     20   0 99004 1972 1040 S   0.3  0.2   0:00.09 sshd
 7750 steam     20   0 20504 1460 1052 R   0.3  0.1   0:00.08 top
    1 root      20   0 26940 2684 1408 S   0.0  0.3   0:00.91 init
    2 root      20   0     0    0    0 S   0.0  0.0   0:00.01 kthreadd
I also got an FTP / MySQL / apache running, however it only started happening recently...

What are the most basic modules to run Apache and still be able to run HLstats:ce ? This would of course be to have less memory useage!

My screen startup line:

Code: Select all

screen -A -m -d -S diablomod ./hlds_run -console -game czero +maxplayers 24 +map de_dust2 -sport -secure -autoupdate -debug -verify_all -pingboost 2
User avatar
Edge100x
Founder
Founder
Posts: 13156
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Lag in VPS

Post by Edge100x »

Can you clarify on what you mean by "lag spikes"? What exact symptoms are you seeing?
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Lag in VPS

Post by soja »

How many cores does your VPS have? Loading the main hlstats.php page can use an entire core, and will use more resources the more servers you have in your hlstats:ce system.

I love and have used HLStatsX:CE for years, but i would really recommend GameME. GameME is fully managed for you, and you won't have to worry about using your VDS resources for stats.
Not a NFO employee
FaithlessDbo
New to forums
New to forums
Posts: 12
Joined: Sun Apr 20, 2014 5:19 am

Re: Lag in VPS

Post by FaithlessDbo »

@ Edge100x
Usually I have a ping of 25-30 and here I got a ping of 50-80. When I disable all the plugins I still have issues with this. I also have lag spikes when shooting, but I think this is related to a plugin (will not bother you with this for now ;)

@ soja
I got 1 GB RAM, however the apache is only appearing when somebody connects to the server, so I don't think it's something to take account for.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Lag in VPS

Post by soja »

FaithlessDbo wrote:@ Edge100x
Usually I have a ping of 25-30 and here I got a ping of 50-80. When I disable all the plugins I still have issues with this. I also have lag spikes when shooting, but I think this is related to a plugin (will not bother you with this for now ;)

@ soja
I got 1 GB RAM, however the apache is only appearing when somebody connects to the server, so I don't think it's something to take account for.
Apache doesn't use many server resources(regarding RAM/CPU), mysql will be the resource hog for hlstats.
Not a NFO employee
FaithlessDbo
New to forums
New to forums
Posts: 12
Joined: Sun Apr 20, 2014 5:19 am

Re: Lag in VPS

Post by FaithlessDbo »

@ Soja

The plugin (Mod) is also using the MySQL for the game itself, sooo before this the server didn't lag either. Maybe the HLstats did the last bit to make it lag though. I could try this.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Lag in VPS

Post by soja »

Keep an eye on top(or htop, which I prefer) when the server lag spikes, you *might* be able to catch a glimpse of the process causing the lag spikes.
Not a NFO employee
FaithlessDbo
New to forums
New to forums
Posts: 12
Joined: Sun Apr 20, 2014 5:19 am

Re: Lag in VPS

Post by FaithlessDbo »

I've played around a bit with the server rates and everything. It seemed to have improved a bit :)
Post Reply