Hi!
I noticed that my Servuo CORE is not releasing memory, and continuos eat more and more RAM.

I searched in the code and found this lines:

Code:
			if (GCSettings.IsServerGC)
			{
				Utility.PushColor(ConsoleColor.DarkYellow);
				Console.WriteLine("Core: Server garbage collection mode enabled");
				Utility.PopColor();
			}


I understand that if garbage collector is enabled when i start my CORE i will see that words in the console line, but nothing is showing.
Is supposed that is normal?

I'm using Windows and .NET Framework: 4.0.30319.18408

Thanks in advance and sorry about my bad english :$
 
You need to add/edit ServUO.exe.config (In the same directory as ServUO.exe)

Code:
<?xml version="1.0"?>
<configuration>
	<startup>
		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
	</startup>
	<runtime>
		<gcServer enabled="true" />
	</runtime>
	<!--MONO/Linux users will need to uncomment and modify the following line:-->
	<!--<dllmap dll="libz" target="/lib/x86_64-linux-gnu/libz.so.1" />-->
</configuration>

If you renamed your ServUO.exe to anything like MyShard.exe, then you need to rename ServUO.exe.config to MyShard.exe.config too.
 
You need to add/edit ServUO.exe.config (In the same directory as ServUO.exe)

Code:
<?xml version="1.0"?>
<configuration>
	<startup>
		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
	</startup>
	<runtime>
		<gcServer enabled="true" />
	</runtime>
	<!--MONO/Linux users will need to uncomment and modify the following line:-->
	<!--<dllmap dll="libz" target="/lib/x86_64-linux-gnu/libz.so.1" />-->
</configuration>

If you renamed your ServUO.exe to anything like MyShard.exe, then you need to rename ServUO.exe.config to MyShard.exe.config too.

Hi Voxpire, thanks for reply.
It's working like you say.

I have another question If you do not mind, i made a GM Command for execute Garbage Collector with just this lines:

Code:
            GC.Collect();
            GC.WaitForPendingFinalizers();


I made it before you reply me , because i was trying to solve my problem.
At least when i execute the command is not crashing the Server but i wanna know if it's better to enable the Garbage Collector or just execute the command when my RAM is low.

What are the cons of the Garbage Collector? High CPU consume?
Thank for taking the time to answer :)
 
Back