My server lag with 40 Players + -
Kyra - 13.07.2013
Hi i search a solution for adjust my problem.
I have an dedicated server,
- CPU: i3 2130
- RAM: 8 Go
- 100 Mbps
When my server lag the CPU use 7% or less, RAM used less to 1 go and 5mbps or less. I understand how my server can LAG with this dedicated server.
I try to use "profiler plugin" for watch if its my script i see this exemply:
Quote:
Type Name Calls Self Time Total Time
|
PHP код:
WriteFile 7864 0.05 0.62
operator>(Float:,Float:) 1641876 2.19 0.93
toupper 15174904 2.45 0.87
GetPlayerSpecialAction 3429910 0.92 0.33
S@@_OnPlayerUpdate 3255137 31.37 16.11
IsPlayerInArea 1615032 2.16 1.76
Text_FixString 131317 13.26 5.56
OnPlayerUpdate 3255137 8.17 19.00
S@@_OnPlayerKeyStateChange 261531 2.14 2.04
gettime 4599918 8.97 3.17
And other...
I hope you can help me with this, what is S@@_OnPlayerUpdate and S@@_OnPlayerKeyStateChange?
I have this include:
Quote:
#include <a_samp>
#include <utils>
#include <a_mysql>
#include <streamer>
#include <a_http>
#include <foreach>
#include <sscanf2>
#include <YSI\y_va>
#include <YSI\y_commands>
|
Debian 5 64 it's bad for SAMP? 32 it's better?
Re: My server lag with 40 Players + -
thimo - 13.07.2013
I had alot of lag produced by my objects. I had 16 k objects. Now i started with 500 objects and it went from 2,20 % per player to 0.70% percent per player!
Re: My server lag with 40 Players + -
Kyra - 13.07.2013
I have just 50 objects and 200 vehicles i think
I look this code:
PHP код:
#pragma dynamic 140000
For the distance stream i use for tag player...
PHP код:
SetNameTagDrawDistance(35.0);
And i use text label for the player for watch the 'ping' and other text
Re: My server lag with 40 Players + -
Kyra - 13.07.2013
It's strange i have 2 call OnPlayerUpdate, and OnPlayerStateChange and other callback...
I see this with profiler
PHP код:
Name Calls Self Time Total Time
S@@_OnPlayerUpdate 3255137 31.37 16.11
OnPlayerUpdate 3255137 8.17 19.00
I don't use hooks, he call 2x OnPlayerUpdate? The time it's different for this ****** said it's y_commands.
And apparently "toupper" use lot of resource
PHP код:
Text_FixString(string[])
{
new chr;
for (new i = 0, j = strlen(string); i < j; i++)
{
chr = toupper(string[i]);
switch (chr)
{
case 'а' : chr = 151;
case 'в' : chr = 153;
case 'и' : chr = 157;
case 'й' : chr = 158;
case 'к' : chr = 159;
case 'о' : chr = 163;
case 'ы' : chr = 171;
default : chr = string[i];
}
string[i] = chr;
}
return string;
}
Re: My server lag with 40 Players + -
[UG]Daniel - 14.07.2013
Well if you want, I have a friend who has a VPS. he hosts mine and it doesnt lag. if you want PM me.
Re: My server lag with 40 Players + -
Kyra - 14.07.2013
You think the problem is my host?
Re: My server lag with 40 Players + -
Aerotactics - 14.07.2013
Quote:
Originally Posted by Kyra
You think the problem is my host?
|
Yes, and I think you should just have a limit of 40 players. That's more tahn enough at a time.
Re: My server lag with 40 Players + -
Kyra - 14.07.2013
Okay, but it's an dedicated server with this config how my server can lag?
PHP код:
- CPU: i3 2130
- RAM: 8 Go
- 100 Mbps
Debian 64 bits it's not good for SAMP? I optimised my script with profiler plugin but it's same
Re: My server lag with 40 Players + -
SwisherSweet - 14.07.2013
It can be your host... It can also be alot of plugins and includes..
Re: My server lag with 40 Players + -
Kyra - 15.07.2013
I don't think it's my plugin, i use ssanf streamer and mysql and the include it's on my top message
Look my consumption CPU/Other when my server lag
http://image.noelshack.com/fichiers/...ns-titre-3.jpg
http://www.noelshack.com/2013-29-137...ns-titre-4.jpg
I understand why my server lag... i think to change my host but it's really this?