NPCs vs Memory

Join Discord

JSB123

LOMCN Veteran
Veteran
Aug 7, 2004
370
0
63
S.Yorkshire
Can anyone give me any conclusive evidence to support my theory that NPCs drain on the servers memory. For example.. NPCs in the Merchant file, generally take more memory than NPCs in the NPC_Def folder, due to their extra abilitys and because their information is availible through the M2.

And BREAKS and CLOSES.. Does a peice of script without a BREAK still reside in the servers memory, even after the player has exited the script box? I'm sure i have tons of script without appropriate BREAKS created years ago when Massacre was young, and i was inexperienced.. If i added the appropriate BREAKS would i reduce my memory usage? Hmm..

My sever runs at a healthy 200-250MB usage at the start of the week, even at peak times it does not go up past 280MB usage. However as the week goes on the usage creeps up and up, and by the time im ready for my weekly reboot, its at 300-330MB usage, regardless of my usercount.

Any constructiveand infomative comments are apreciated.
 
Last edited:

MiloFoxburr

LOMCN VIP
VIP
Mar 23, 2003
7,276
199
370
Dublin, Ireland
Depends on the files you're using, a lot of the Chinese files we use are unoptimised. The Source Code is based on very old unoptimised code and I don't think anyone bothered to optimise it.

There are sets out there that use 50mb ram on a full server with no people and 200mb with 300-400 players online
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
umm... as far as i can see a script always resides in the memory due to its preloading... but our memory usage stays static at a lot higher than yours

they really arent optimised at all
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
The Most is coded in Delphi 3 - 5 and with very bad Memory Managemend.
Creating and Destroyng Objects and Lists don't give Memory back (Memory Leak). So Milo have right, very old not optimize Code is here the Problem ^^
(On D2k7 CodeGear use the function from FastCode Team ^^ I believe this say all lol)
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
question from a stupid one with no knowledge about coding(lol sure me!)

i know form webdisgn tools and other that much of them have function to optimise what the coder did (example dreamweaver or borlandc++builder is there no possibility to read that codes with a newer version of delphi and optimice it by clicking a button ?? lol much will laughing now iam sure but im really didn know it *hehe

lg

ameno
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
question from a stupid one with no knowledge about coding(lol sure me!)

i know form webdisgn tools and other that much of them have function to optimise what the coder did (example dreamweaver or borlandc++builder is there no possibility to read that codes with a newer version of delphi and optimice it by clicking a button ?? lol much will laughing now iam sure but im really didn know it *hehe

lg

ameno

Yes with some Version you can easy Update to the New Version.


@JSB123 Yes if you remove Maps on Mir Server you reduce the Memory, ^^ is normaly, the Base is the Map and the Env hold all information on the Map Object.

with my first Post I mean, the Application has order Memory and use it and latter it hold the Memory for latter and give it back to the System if the EXE Close. This is the normaly Borland Memory Manager way. As a Coder you can optimize it with order Memory self without the MemManager from Borland over WinAPI Function and you can it give free to the System as not used more.
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
do you have some large complicated scripts? or just an awful lot of npcs?
 
Upvote 0

JSB123

LOMCN Veteran
Veteran
Aug 7, 2004
370
0
63
S.Yorkshire
I have around 470 NPCs. I need to audit them and remove the ones not needed. However i have at least 3 HUGE scripts. My Tokens system, MY DailyQuests System and my NPC to spend QuestPoints. My NPC's are to blame im sure. I read through my Token system and added the appropriate BREAKS, but its a drop in the ocean really, i have so many original NPCs that have not been touched for over a year and a half.. Ill get back to you when i audit the lot.
 
Upvote 0