My server lag with 40 Players +
#1

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?
Reply
#2

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!
Reply
#3

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
Reply
#4

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 
0strlen(string); ji++)
    {
        
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;

Reply
#5

Well if you want, I have a friend who has a VPS. he hosts mine and it doesnt lag. if you want PM me.
Reply
#6

You think the problem is my host?
Reply
#7

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.
Reply
#8

Okay, but it's an dedicated server with this config how my server can lag?

PHP код:
CPUi3 2130
RAM8 Go
100 Mbps 
Debian 64 bits it's not good for SAMP? I optimised my script with profiler plugin but it's same
Reply
#9

It can be your host... It can also be alot of plugins and includes..
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)