2.3 lagg spikes

Akuma

xDEATHx FTW
Golden Oldie
Dec 6, 2006
694
1
25
115
kept getting an error with my dbserver then the m2server said runtime error to the dbserver, sorted this coz was using to much cpu, so was running near 100% at all times

neways... got my server running at the moment and every 50 seconds the cpu jumps from 4% right up to 100% then right bak down to normal, any ideas why its doin this

thanx

VirUs
 

Akuma

xDEATHx FTW
Golden Oldie
Dec 6, 2006
694
1
25
115
just noticed that on the m2server just below the control button it says

Run:17/17 Soc: etc

Run goes from 17/1 right after the spike to 17/17 sits for few seconds, when there is a spike ig goes 2/2 the 17/1 and counts bak up.... whats this:?
 
Upvote 0

Tasha

LOMCN Veteran
Veteran
Loyal Member
May 13, 2003
498
0
93
hope someone can find out what this problem is as quite a few are having it. :(
 
Upvote 0

thedeath

LOMCN Developer
Developer
Mar 26, 2003
1,389
123
289
the reason why the run thing goes from 17/17 to 1/1 or 2/2 and then counts again is cause whoever made this original system kinda got confused with his own variables :p
it's suposed to cound from 1/17 to 17/17 then rest to 1/17 (i think)
but now what it does is really stupid and confusing
it's a mixed counter that counts both the runtimer and the main exe timer
however from what i could see it's not directly linked to the actual system (aka there's nothing that says 'if timer = 17/17 then run ....'
the only thing is: this timer goes up ever 250 ms (i hope) and well maybe that just happens to coincide with something else

oh i forgot to mention: i have been checking and found one process which ocasionaly takes about half a second to finish, but my cpu never goes over 40% so :p (then again i have a 3.5G so)
 
Upvote 0

Akuma

xDEATHx FTW
Golden Oldie
Dec 6, 2006
694
1
25
115
ah right ok well is it a problem needing fixed or is it ok, my cpu is naff just using it till i get server going so probs y mine goes 100%..

does it need fixing though?
 
Upvote 0

thedeath

LOMCN Developer
Developer
Mar 26, 2003
1,389
123
289
k just did alot of testing (nearly 2hrs lol) and turns out the lag spikes come from the lottery npc
it restocks 10000 lotery tickets every X seconds just edit the goods list of the npc file to say 100 and your 'lag spike' should be gone (it was for me :p)
 
Upvote 0

LegendOfMir

LOMCN N00B +1
Veteran
:) The lag on server and CPU occupied resurses, are doing it only if u have to much mobs in Mongen.txt and they are in here setup incorectly, here u have an good eg:

;For map BichonProvince
;Map Coordonates Mobs dispersal amount time
0 333 270 ViolentHen 50 50 100
0 333 270 Hen 50 50 100
.
.
.

So be carefully with number of mobs, and u need to have an good CPU(700-4000Mhz),and RAM (min256-2000Mb) for XP. Is very indicated to have minimum RAM:512Mb, to dont have problems. Try this, and me i have the same problems, in the past but i setup corectly mongen.txt and now works corectly. I have now 4600 mobs on my server, and in time i dont have lag,after 1-2 weeks. :D



 
Upvote 0

Robert

Actual Jesus
VIP
Jan 1, 1970
4,652
97
104
Yes.
k just did alot of testing (nearly 2hrs lol) and turns out the lag spikes come from the lottery npc
it restocks 10000 lotery tickets every X seconds just edit the goods list of the npc file to say 100 and your 'lag spike' should be gone (it was for me :p)

Qft!

I dont know who made that elementary mistake lol..
Someone should edit the npc on the svn.
 
Upvote 0

Akuma

xDEATHx FTW
Golden Oldie
Dec 6, 2006
694
1
25
115
ill try that now td thanx m8 again , i thought it was the monegn that was givine me jip and eating my resources so all i have in my mongen at the monent are the archerguards around the maps only about 20 of them, ill see how this goes tbh

Cheers

VirUs
 
Upvote 0

Akuma

xDEATHx FTW
Golden Oldie
Dec 6, 2006
694
1
25
115
just edited all my npc scripts, no need to have 200 of each armour to spawn every time so changed them all and now wont go above 15% cpu, in middle of editing the mongen file so when done will try that, see what it does

Cheers againd td

VirUs
 
Upvote 0