Jump to content

MTA Server Dropframes


oVVen

Recommended Posts

I'm having a Multi Theft Auto server, installed on my Virtual Private Server. After 40-50 players, I'm experiencing some drop frames (all the players are getting it). As specifications I'm using an i7 6700K (2 cores) and 12 GB Ram.

 

Can anyone explain to me from what can I get drop frames? Server has 500+ FPS, sometimes are 550 and may decrease to 520.

Edited by oVVen
Link to comment
  • Scripting Moderators
8 hours ago, oVVen said:

I'm having a Multi Theft Auto server, installed on my Virtual Private Server. After 40-50 players, I'm experiencing some drop frames (all the players are getting it). As specifications I'm using an i7 6700K (2 cores) and 12 GB Ram.

 

Can anyone explain to me from what can I get drop frames? Server has 500+ FPS, sometimes are 550 and may decrease to 520.

Most likely it's fault of scripts, thanks to IIYAMA i got some information about that.

There can be plenty of reasons:

- badly optimized scripts

- too much elementData's (if you don't turn off synchronization, it synchronize with every player and also server), more players = more server resources usage.

- high-res models/a lot of objects, or players in one place.

- weapon sounds.

- things which are drawing frequently on player screen (OnClientRender)

 

I suggest you to check which resource, and what exactly is making big traffic/takes a lot of % of CPU. You will need a resource called 'ipb' which you should have within base server resources.

Type start ipb in console, and then, once again type ipb. After that you will have possibility to check which resources are using a lot of CPU/server resources.

If i am wrong, i bet IIYAMA, or someone else will correct me.

Edited by majqq
  • Like 3
Link to comment
  • Scripting Moderators
9 minutes ago, oVVen said:

Can I use something else instead of elementData's? And disabling synchronisation can harm the other scripts (where can I disable it).

You can use tables as fast-temporary-storage, i will test soon custom temporary data system, thanks to help from MTA forums. (Check topics which i have created, related to them.)

You can read about it here, it's simple, i already learned how to use it. Of course you don't need to use tables everywhere, you can setElementData, only when is important and needed, that's what i learned. 

 

Edited by majqq
  • Like 1
Link to comment
  • Scripting Moderators
4 minutes ago, oVVen said:

Disabling the synchronisation is a mtaserver.conf setting or can I disable it from the function?

No, you can disable synchronization whenever you setElementData. Anyway i had bad experience with elementData's, with same count of players. That's why i'm gonna test custom system for it. I don't think so that disabling fourth argument will help so much.

https://wiki.multitheftauto.com/wiki/SetElementData

bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] )

 

Edited by majqq
  • Thanks 1
Link to comment

Is there a limit of a resource consumption? I'm having resources with 1, 2 or even 5%. Also, the drop frames are adding resources with high usage, and then it's coming back to normal state.

 

Example: The server uses 1~2% of CPU, and jumps to even 10% (on ipb). On the VPS using the "htop" it shows me that is using 5%, and when the drop frames are coming, jumps to 70%.

 

 

I've been struggling to solve this problem for a long time

Link to comment
  • Moderators
40 minutes ago, oVVen said:

Is there a limit of a resource consumption? I'm having resources with 1, 2 or even 5%. Also, the drop frames are adding resources with high usage, and then it's coming back to normal state.

 

Example: The server uses 1~2% of CPU, and jumps to even 10% (on ipb). On the VPS using the "htop" it shows me that is using 5%, and when the drop frames are coming, jumps to 70%.

 

 

I've been struggling to solve this problem for a long time

Use the ipb on yourself instead of your server.

The server can indeed have influence on the client his FPS, but clientside has far more direct influence on the FPS.

Link to comment

On myself? How? I have a single option, and that's "server". That's showing my CPU consumption. I still haven't realized from what comes the dropframes. There are some resources which consumes 0.1% CPU and jumps to 1, maybe 2-3% CPU consumption (I saw that this jump caused the drop frames).

 

Could be from the host? Idk. Probably because the processor has only two cores? 

 

EqBGahN.png

 

Edited by oVVen
Link to comment
  • Moderators
2 hours ago, oVVen said:

On myself? How? I have a single option, and that's "server". That's showing my CPU consumption. I still haven't realized from what comes the dropframes. There are some resources which consumes 0.1% CPU and jumps to 1, maybe 2-3% CPU consumption (I saw that this jump caused the drop frames).

 

Could be from the host? Idk. Probably because the processor has only two cores? 

 

EqBGahN.png

 

 

There should be a checkbox with the label: "Include clients" (on the top part you just cut off)
Not sure if they disabled or removed it.

 


 

Another way to view this information can be accessed with the browser:

http://127.0.0.1:22005/resourcebrowser/

There you can do the same thing.

 

 

 

Edited by IIYAMA
Link to comment
  • Discord Moderators

He's talking about server framerate, not client framerate, so, what @majqq said:

Quote

- high-res models/a lot of objects, or players in one place.

- weapon sounds.

- things which are drawing frequently on player screen (OnClientRender)

Isn't correct, the mentioned things only affect client FPS, but not server.

Link to comment
  • Moderators
10 minutes ago, Pirulax said:

He's talking about server framerate, not client framerate, so, what @majqq said:

Isn't correct, the mentioned things only affect client FPS, but not server.

 

He said two things:

 

On 20/02/2019 at 21:17, oVVen said:

Server has 500+ FPS, sometimes are 550 and may decrease to 520.

This doesn't sounds like server that can't handle things any more.

 

On 20/02/2019 at 21:17, oVVen said:

I'm experiencing some drop frames (all the players are getting it)

This sounds like a clientside issue to me.

But if the serverside also plays a role in it, that really depends on the resources.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...