Avoiding server lag
#1

Hey,

I recently started to rescript my server because of server lag. I updated from MySQL R5 to MySQL R33. Is there a way to reduce or avoid server lag completely, and make it run smoothly. The Login/Register/Admin system will be included within the gamemode, not as a filterscript. I don't want to continue without knowing if there is any way I can avoid lag in the future.

Thanks
Reply
#2

With change from R5 to R33 (R39 is the latest just FYI) did you change your all queries from unthreaded to threaded? If not, do it, otherwise you will still experience lag with every query.
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
With change from R5 to R33 (R39 is the latest just FYI) did you change your all queries from unthreaded to threaded? If not, do it, otherwise you will still experience lag with every query.
Yep, I'm using threaded queries.
Reply
#4

Any other tips ?
Reply
#5

Avoid using the OnPlayerUpadte function, there are other better alternatives.
Reply
#6

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
Avoid using the OnPlayerUpadte function, there are other better alternatives.
Yeah, I use timers as an alternative to OnPlayerUpdate. Especially with my Anti-Cheat system.

Any other tips?
Reply
#7

Loop efficiency..For example using "foreach".

But you probably know that.
Reply
#8

Benchmark your script (or just parts of it) to find out what causes lag and you will know what to do...
Reply
#9

Yeah, use this plugin, and find your bottlenecks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)