Jump to content

Lag issues


ciclano

Recommended Posts

2 minutes ago, IIYAMA said:

You could check if there is a player who thinks it is funny to spam a command, so that your server starts to lag (no joke, when no limit is applied, it is an absolute vulnerability.):

https://wiki.multitheftauto.com/wiki/OnPlayerCommand

 


 

You could rent another VPS and see if that one performs better. Since it is a VPS and not a dedicated server, you will not be able to monitor the global statistics. If your neighbour uses a lot of data,CPU etc., you might not be able to notice that through your own server statistics, while still receiving bad performance.

 

 

 

 

 

 

How can I know what exactly is causing the high CPU usage?

Regarding the commands, I have logs of everything that is typed. I took a look at them and there's nothing weird

Apparently the MTA is not using all the cores I have.

Edited by ciclano
Link to comment
  • Moderators
1 hour ago, ciclano said:

Apparently the MTA is not using all the cores I have.

That was already a given, all Lua executions are on a single core afaik.

 

 

1 hour ago, ciclano said:

How can I know what exactly is causing the high CPU usage?

If you know which resource is responsible, then through manually debugging:

- Enable/disable code

- Tracing chains of function calls

- Measuring execution times = getTickCount()

- Check meta-tables, that have functions attached to them.

- Check for functions that are suppose to be a-sync.

- Check the amount of timers (they are CPU hungry), if you use too many, stack them. And use passive timers where possible.

 

 

You can also measure function executions, maybe you find something there:

addDebugHook( "preFunction", onPreFunction)

https://wiki.multitheftauto.com/wiki/AddDebugHook

 

 

 

 

Edited by IIYAMA
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...