RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Memory leak info

Erevan

Sorceror
I know enough about what they are to know if I have one, which I do. Up until just a few days ago my server was fine but now it goes from 100megs to 500 megs in about five minutes and climbs slowly after that.

Is there a way to find what is causing the memory leak? i'm not the brightest of peeps but I can make an effort to learn if someone can offer advice. ty!
 

_Epila_

Sorceror
Check your recent script changes, saves, trace internals, trace timers and etc...
RunUO have a script to force garbage collection every minute or something like that (MemHelper.cs)
If the garbage ins not being collected, it does not seems to be garbage, most probably a recent script change
 

Erevan

Sorceror
i have only made a few basic changes i think. i added a couple of items to a craft menu and a quest. not educated enough to know the rest.
 

Erevan

Sorceror
i dumped the last few folders of stuff i added to my server. i even went back to an older save from like 2 weeks ago before this all started. no difference. we have about 350,000 items and 45,000 mobs.. the avg memory is something like 500 megs. maybe i'm nuts but that seems high. our save times dont seem any worse for wear. its about the same give or take a second.
 

Vorspire

Knight
That memory usage sounds about right.
The shard I work on has almost 8 million items, 150,000 mobiles and uses around 7-8 GB of memory.
 

Erevan

Sorceror
it seems to still be climbing regardless of items or how many people are logged in. it climbed to 559 megs from the 480 it was at earlier this morning.
 

Erevan

Sorceror
also, i dunno if this is of any help but i use a program called advanced system care 6. it works great for other games i play (like wow) and when i run their smart ram cleanup the server goes from 500 megs down to 30 or 40 megs and then spends an hour climbing back up. i havent found any threads that talk about clean programs that can check for memory leaks. most of the ones i google and find have viruses.
 

Soteric

Knight
If it goes up to 500MB and no more then it's fine. That's how .NET works. Your RunUO process is granted some amount of RAM by default. WIthin that amount you have some useful data like current items and mobiles, and some buffer for so called 'garbage', i.e. objects created, used and deleted. When grabage amount becomes close to granted RAM the Garbage Collector stops your application and removes the garbage, i.e. marks that memory as free. But it's hidden for Windows Process Explorer. It still reports that application uses those 500MB. If you have Windows7/Vista you can use Performance Monitor counters to see what really happens inside RunUO process.

In case of memory usage spikes, for example large event on your shard which requires a lot of RAM, RunUO requests more memory from OS and memory usage jumps to 1024MB or whatever it needs. I'm not sure if the memory will be returned to OS after event, so using your system care tool can be nice here.

If you see that you have 500MB RAM consumption in an hour, 1000 in two and 2000 in four then it's definitely memory leak. But 500MB in an hour and then nothing - it's okay. That's what you pay to avoid manual memory management like in C, C++, Delphi and so on.
 

Erevan

Sorceror
couldn't have asked for a better explanation. I've read about "calling" the garbage collector in scripts so I'll have to read up on that just in case. so much info in this thread. ty!
 

Vorspire

Knight
Has anyone else noticed the memory usage reported by Task Manager will be refreshed if you minimize the open console application?
 
Top