Random Lag Spikes on server, opinion needed
#1

Hello there

We are running our server on a 100mbit connection and this host is used by other servers as well some i'm sure the problem doesn't rely on host side.

To be sure, i've also checked and pinged my server ip in cmd using ping IP -t for hours and hours and in about 18 hours only 1 packet was lost and ping is flawless with max 59, min 38 and average 45.

The server runs on mysql also so i am wondering if the problem can be from here and game mode.

The scenario is like this.

Every x minutes, randomly like 3-5-10 minutes or so there is a small lag spike of 2-5 seconds so there is no constant lag or so just a lag spike for 2-5 seconds. Except these moments everything works like a charm


Can someone help me with a suggestion of what could cause this? Thank you
Reply
#2

It could be with the SQL on the server.
Reply
#3

it also could be timer collision.
Do you use allot of timers and have you done anything to ensure they are not
running at the same time?


more info about it here
https://sampforum.blast.hk/showthread.php?tid=61322
Reply
#4

Thanks guys.

I have checked that thread jonny5 before opening this one

@iGetty, can you be more specific what could be the problem with mysql ?

@Jonny5, wouldn't this mean a constant log and not just random spikes?

Average is 20-30 players for now but this may happen on 8-11 as well
Reply
#5

well depending on your setup

Id say no, the lag may seam random but might in fact not be.
if you have a timer every 100 ms
and one every 1000ms then they MAY have a collision 1 out of 10 times the 1000ms is ran
or once every 10 seconds.

now try 1000ms and 999ms,
im not sure when they will have a collision but at some point it will happen,
my guess is after 999 seconds.
and as they run it will happen at different times due to the offsets from one to the other.

not think about more timers and how they might have a collision with
others, maybe with more than 1, it could be the case where more than 2 are trying to run at the same time,
if all the timers have different intervals then this will happen and seam (random)



so really it would depend on how you have your timers coded,
Also im not saying this is the problem but just one thing that may cause lag.

hope this helps

~j5
Reply
#6

indeed the problem could be from timers even though i didn't thought it could be the reason in the first place. I ll change them so they won't sincronize

Thank you for the advice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)