Jump to content

how to increase ram usage on a modded server


Go to solution Solved by yolofrogs,

Recommended Posts

Posted

know its probably some simple thing but im currently hosting a modded VS server for me and mates on my pc, we have around 43 mods and the logs is constantly giving server overload pings every few minutes and there is a slight block lag of maybe half a second, doing /stats in the logs shows that the server is using 1407mb out of 2286MB of ram and cant for the life of me figure out how to give it more ram in hopes it runs better, any possible fixes?

 

Annotation 2025-07-11 161407.png

Posted

Hi and welcome to the forums!

Some more details would be great, like what OS are you using, processor and ram?

Hosting on the same computer you play on?

 

You could also create a  log that will show what is causing the server to hang, according to this guide: Performance Issues

Follow the guide as described, and post the log here.

 

Posted

thanks for the reply

im hosting on windows 10, my processor is  ryzen 9 3900x 12 core and 48gb of ram
yes im hosting on the same pc im playing on, will mention none of my components are maxing out in the performance tab whilst doing this
server-main.json

  • Like 1
Posted

Hey @yolofrogs, Welcome to the forums! It just so happens that I am versed in both Windows and Linux and .NET framework activities and I also host my own private server. Let me break down what is going on here:

8 hours ago, yolofrogs said:

logs is constantly giving server overload pings every few minutes and there is a slight block lag of maybe half a second, doing /stats in the logs shows that the server is using 1407mb out of 2286MB of ram and cant for the life of me figure out how to give it more ram in hopes it runs better, any possible fixes?

This sounds like your lag is aligning with the server's autosave feature if it happens every few minutes. This happens because of the disk input and output fighting with each other, especially if new chunks are being generated as players explore. There is no real way to give it more RAM. This will not fix your issue because it's highly likely caused by the harddrive fighting with itself. 

.NET employs a CLR (Common Language Runtime) system that is very lazy with allocating RAM. It will take what it needs when it needs it and hold onto it for the future. From the screenshot you showed us it looks like it peaked at around 2286 MB of RAM  and is keeping that in reserve in case it needs it again. This is great. This means everything is working correctly and according to plan!

Sorry if it's frustrating you. The only solution I can really offer is to move it to a faster drive and see if that helps. I get the same hiccups on my server when it autosaves. I just learned to deal with it I guess.

Posted

I had similar issues when hosting from my pc.

My solution was to start the server in its own powershell, and connect to it trough the Multiplayer tab, just like any other server.

 

Make a shortcut on your desktop, and name it whatever feels appropriate, then right-click at choose "Properties".

image.png.3346dae09fe921631d68a49448be6f01.png

"Start in:" should be as in the image above.

In the Target: field, paste this (we will create the start-server.ps1 file later):

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File C:\your-vs-install-dir\start-server.ps1

Edit the path accordingly.

 

Now go to your VS install dir, and create a new file named "start-server.ps1"

In this file, paste this:

Start-Process -NoNewWindow -FilePath "C:\your-vs-install\VintagestoryServer.exe" -Argumentlist '--dataPath="C:\Users\Dom\AppData\Roaming\VintagestoryData" --addModPath="C:\Users\Dom\AppData\Roaming\VintagestoryData\Mods"' -Wait

Same here, edit the paths to fit your install location.

Check your "serverconfig.json" file to make sure it has the correct ip and savegame that you want to host.

 

This worked well for my case, but I give no guarantee this will be your solution.

 

Posted
6 hours ago, traugdor said:

Hey @yolofrogs, Welcome to the forums! It just so happens that I am versed in both Windows and Linux and .NET framework activities and I also host my own private server. Let me break down what is going on here:

This sounds like your lag is aligning with the server's autosave feature if it happens every few minutes. This happens because of the disk input and output fighting with each other, especially if new chunks are being generated as players explore. There is no real way to give it more RAM. This will not fix your issue because it's highly likely caused by the harddrive fighting with itself. 

.NET employs a CLR (Common Language Runtime) system that is very lazy with allocating RAM. It will take what it needs when it needs it and hold onto it for the future. From the screenshot you showed us it looks like it peaked at around 2286 MB of RAM  and is keeping that in reserve in case it needs it again. This is great. This means everything is working correctly and according to plan!

Sorry if it's frustrating you. The only solution I can really offer is to move it to a faster drive and see if that helps. I get the same hiccups on my server when it autosaves. I just learned to deal with it I guess.

have done a tiny bit of MC hosting so knew the world save does pickup a little lag but its not that, i am running of a simcard based router so could a ping issue be causing a slight delay for everyone playing?
i have multiple SSD drives on this pc, would putting the server on its own drive help it?

Posted
6 hours ago, xXx_Ape_xXx said:

I had similar issues when hosting from my pc.

My solution was to start the server in its own powershell, and connect to it trough the Multiplayer tab, just like any other server.

 

Make a shortcut on your desktop, and name it whatever feels appropriate, then right-click at choose "Properties".

image.png.3346dae09fe921631d68a49448be6f01.png

"Start in:" should be as in the image above.

In the Target: field, paste this (we will create the start-server.ps1 file later):

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File C:\your-vs-install-dir\start-server.ps1

Edit the path accordingly.

 

Now go to your VS install dir, and create a new file named "start-server.ps1"

In this file, paste this:

Start-Process -NoNewWindow -FilePath "C:\your-vs-install\VintagestoryServer.exe" -Argumentlist '--dataPath="C:\Users\Dom\AppData\Roaming\VintagestoryData" --addModPath="C:\Users\Dom\AppData\Roaming\VintagestoryData\Mods"' -Wait

Same here, edit the paths to fit your install location.

Check your "serverconfig.json" file to make sure it has the correct ip and savegame that you want to host.

 

This worked well for my case, but I give no guarantee this will be your solution.

 

did all this, server is still launching so it isnt broken aleast, but what does this do, im very knew to powershell 

Posted
38 minutes ago, yolofrogs said:

i am running of a simcard based router so could a ping issue be causing a slight delay for everyone playing?

oh not on the server-side... the server doesn't care what router it's behind. I would try other suggestions if putting it on it's own drive doesn't help.

  • Solution
Posted
4 hours ago, traugdor said:

oh not on the server-side... the server doesn't care what router it's behind. I would try other suggestions if putting it on it's own drive doesn't help.

i was more thinking because the host is going through my internet a bad connection with everyone because my wifi was being slow could result in connection based lag for everyone hence why not much was shown on the server-main.json

had it running with 2 people and myself on it for maybe 5 hrs today, before starting i did the suggested powershell edit that "ape" gave and lowered the MaxChunkRadius to 10 and the DefaultEntityTrackingRange slightly which was suggested on the earlier "performance issues" link, so far its been good, block lag inworld and inventory lag has basically stopped, server is definitely throwing less overloaded messages since the changes,

  • Like 2
Posted
2 hours ago, yolofrogs said:

had it running with 2 people and myself on it for maybe 5 hrs today, before starting i did the suggested powershell edit that "ape" gave and lowered the MaxChunkRadius to 10 and the DefaultEntityTrackingRange slightly which was suggested on the earlier "performance issues" link, so far its been good, block lag inworld and inventory lag has basically stopped, server is definitely throwing less overloaded messages since the changes,

Yes, that tracks with what I was saying with it being a disk Input/Output issue. Sounds like you got a solution, even if it wasn't mine. :) 

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.