mySQL Online Map laggs the server
#1

Hi!
I made an online map for my own server. This script saves player's positions in every 5 sec, but sometimes my server laggs with 1 online player. It has a 'onlinemap' table and the table has 200 records/rows. I'm just using 1 of them if a player is online. I don't know how can I fix it. I'm using Adrenaline's mySQL plugin(0.14). And my memory usage growing too with 4-12 kbytes and it doesn't want to stop. :S

Thanx!
Sorry for my bad english!
Reply
#2

First, use HEAP table, which is stored in RAM. It disappears when you turn off the computer, but is much faster than tables stored on a hard drive. Simply use MEMORY engine instead of MyISAM, InnoDB or whatever you do currently. Just remember, that you have to use Create table if not exists in OnGameModeInit.

Second, Adrenaline's plugin is buggy and leads to many memory leaks so i wouldn't recommend it. Even if the newest version is said to have them fixed. Try the other plugin instead.
Reply
#3

I tried it, but it crashed my server :S(G-stylezz's plugin)
Reply
#4

anyone else?
Reply
#5

Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Reply
#6

u should use a file to save the positions. and then use as ftp or php ftp and connect and grab it.
Reply
#7

Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?
Reply
#8

Quote:
Originally Posted by [HUN
Peti ]
Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?
nop, instead saving each 5 seconds the position of the player try once per minute...
Reply
#9

Peti lйcci нrd le magyarul mer egyaltaan nem ertettem XD
Reply
#10

Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
Quote:
Originally Posted by [RAZ
ADreNaLiNe-DJ ]
Quote:
Originally Posted by [HUN
Peti ]
anyone else?
First of all, why don't you save player position each 5 seconds ?
Why not once per minute, it will take less cpu...

Secondly, memory leaks will be fixed in the next few days (v0.15).
Hmm
So U say I save one player's position and 5 seconds later another player's?
nop, instead saving each 5 seconds the position of the player try once per minute...
Ok understood
But I think the first post about HEAP is my friend to make it faster. I'll try it in the weekend and I'll post is it work or not.

Thanks for All!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)