Continual momentary lag & VPS
#1

Hi,

I got a OpenVZ Ubuntu 14.04.3 LTS VPS with the following configuration:

4GB RAM
5 CPU core
200GB HDD space
5000GB traffic
1Gbps uplink

I'm just running a forum (phpbb) & a SA-MP server on it. However, there seems to be a lot of momentary lags. Its as if you lost connection for a second, and got back on it. And this momentary lag occurs almost every minute. I've checked with the CPU usage, and its about 10-12%, mainly the SA-MP server. Why do you think this momentary lag occurs?

Kindly put up your opinions.
Reply
#2

Definitely not the VPS. The problem is in your script, use the profiler plugin to give you a hint where the problem is at.
Reply
#3

Hey! Thanks for the reply. Well, I agree with you upto an extent, but I've noticed that the rate of momentary lags decreases as well. Like it happens every minute for sometime, then every 4 minutes for some time, like that. Its random, but does exist all the time.
I suspected some DoS/DDoS or excessively stressed node, but nothing of that sort seems such.

I'll try with the profiler you saying, but just doubting if such a randomly timed rate of momentary lags could occur with a buggy script.
Reply
#4

Quote:
Originally Posted by donB
Посмотреть сообщение
Hey! Thanks for the reply. Well, I agree with you upto an extent, but I've noticed that the rate of momentary lags decreases as well. Like it happens every minute for sometime, then every 4 minutes for some time, like that.
I suspected some DoS/DDoS or excessively stressed node, but nothing of that sort seems such.

I'll try with the profiler you saying, but just doubting if such a randomly timed rate of momentary lags could occur with a buggy script.
Some players could be doing something specific causing it?

For example if they're in a car, and there's some extensive looping, when they exit it stops, it could be numerous things.
Reply
#5

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Some players could be doing something specific causing it?

For example if they're in a car, and there's some extensive looping, when they exit it stops, it could be numerous things.
So in short, you're saying that it could be a script issue. Hmmm.
Reply
#6

Quote:
Originally Posted by donB
Посмотреть сообщение
So in short, you're saying that it could be a script issue. Hmmm.
Yes, I'm just explaining as to why how the 'momentary lag' could be working.
Reply
#7

Could it be this as well? I mean is it advisable to make this SLEEP parameter 1, for eg.?

Quote:

Server.cfg parameter: Sleep
Default Value: 5
Description: Time in milliseconds for which the main sa-mp and raknet networking thread will "sleep" idly during each sync cycle. Using a higher value, the server will require fewer CPU, but the quality of sync will suffer greatly. By using a lower value, the server will consume more cpu resources but will improve server sync performance - at cost of cpu power. It is not advisable to change this value ever unless your player count is very high and you have server fps stability issues.

Quoted from https://sampwiki.blast.hk/wiki/Server.cfg
Reply
#8

Is it you specifically, or everybody?
Reply
#9

Almost everyone, ofcourse.
Reply
#10

Quote:
Originally Posted by donB
Посмотреть сообщение
Hey! Thanks for the reply. Well, I agree with you upto an extent, but I've noticed that the rate of momentary lags decreases as well. Like it happens every minute for sometime, then every 4 minutes for some time, like that. Its random, but does exist all the time.
I suspected some DoS/DDoS or excessively stressed node, but nothing of that sort seems such.

I'll try with the profiler you saying, but just doubting if such a randomly timed rate of momentary lags could occur with a buggy script.
Hey, It could be anything! I had this problem in a 100k lines gamemode and it took me weeks of debugging to solve the issue. The problem is definitely at your player timers, OnPlayerUpdate or any loop. The profiler plugin can help you with this, it will NOT solve it for you but give you a hint so you can fix it.

Start by debugging your timers and remove any line of code you suspect, even a little, that could be the cause. Meanwhile, keep testing until the problem disappears. I can't tell how much time it will take, depends of how big is your script and how much you know about it. Also, luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)