Jump to content
HEL City Survivor

41.65 Dedicated MP: probable server memory leak, dangling references to per-player information?

Recommended Posts

I'm running a 41.65 dedicated server (cloud provider, Linux platform). Problem is, the memory usage goes up in proportion to player count and never comes down in the same proportion, when players leave. This would IMO point to something in per-player bookkeeping not being freed properly. Dangling references preventing garbage collector from reclaiming memory?

 

Server memory consumption starts around 3 to 3,5 GB, going up to 4-5 GB with a couple of players and from there steadily increases to 6,5 or 7 GB with only 4 concurrent players. Some of the players utilize multiple username/password combos to have several characters to switch between and occasionally log out and back in with different ones - this seems to be coincide with high memory consumption.

 

(EDIT: 4 or 5 concurrent players -> 4 concurrent players; I don't think we've ever had more than 4 at the same time on the server)

Edited by HEL City Survivor

Share this post


Link to post
Share on other sites

Oh. It just occurred to me that this could also have to do with:

SaveWorldEveryMinutes=0

This could cause the server to accumulate unsaved world changes in memory? Still, going from just over 3 GB to well over 7 GB (I think last night it went all the way to 7.6GB before the hosting provider pulled the plug) sounds quite... steep.

 

I'll try and see if changing the setting helps.

Share this post


Link to post
Share on other sites

More likely the host service is using shared processors, which zgc won’t run on in java15. The alt gc consumes considerably more ram and resources.

 

Or they’re doing what another server host seemed to be concerned about and incorrectly calcing ram based on the complete working set, which inflates how much ram the process needs by roughly 3x. But it doesn’t actually need that. It’s just the way windows displays shared memory (memory that can be used by other processes).

 

Saving has no effect on game memory. All that is going on is that roughly 300 mb of map data is added when the number of concurrent players increases to a new maximum. These are reused.

 

I simply added an additional 1.3 gb for server startup and 200 mb per player in the recommendation as a safety and incase of using mods. It should use less if properly set up, running zgc, and vanilla, not more.

 

tl;dr: this might just be down to however the host tracks ram or the way they configured pz based on their server setup. Saving should have no effect.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...