Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updat memory reservations #355

Closed

Conversation

DenuxPlays
Copy link
Contributor

I recently noticed that my satisactory server only uses 2GB so reserving 4GB is too much imo.
The RAM usage does shoot up when a few players join (in my case up to 5.4GB with 3 players and a late game world).
But I do think that this is some kind of bug as after a restart the server only uses 2 GB even with a players.

TLDR:

  • Server uses only 2GB so 4GB is too much
  • Server still can shot up to 6GB so that is not getting touched (for now as this may be a memory issue)

@wolveix
Copy link
Owner

wolveix commented Oct 7, 2024

How far into the game are you? 12GB even is still common in kater game I believe

@DenuxPlays
Copy link
Contributor Author

How far into the game are you? 12GB even is still common in kater game I believe

We are close to the last space elevator Phase.
But the current Limit is 6GB so it this would be the limiting factor.
Reserving 4gb at all times is too much as the Server will still take more when he needs it.

@gotanks0407
Copy link

gotanks0407 commented Oct 8, 2024

Just finished Phase 5, but still lots of building we want to do. We had to bump the memory limit for late game back to the older values.

image

Running 8GB/12GB

image

@DenuxPlays
Copy link
Contributor Author

Just finished Phase 5, but still lots of building we want to do. We had to bump the memory limit for late game back to the older values.

image

Running 8GB/12GB

image

Thats interesting.
However this would Point to upping the Limit not the reservation.

I am not quite sure why they are there in the First Place?
Maybe @wolveix can Tell?

I will Update the pr in the evening.

@wolveix
Copy link
Owner

wolveix commented Oct 8, 2024

An important consideration is whether you're using asset streaming or not (the SERVERSTREAMING variable from memory). It has a significant impact on memory utilization.

The reservations are there in the first place to deter people from attempting to run the server in non-ideal environments, and then coming back to complain that it doesn't work and that they're experiencing issues that don't appear to be caused by low memory (despite the fact that they are in fact).

The default values are already low, so I don't think there is any reason to drop them further :)

@wolveix wolveix closed this Oct 8, 2024
@DenuxPlays
Copy link
Contributor Author

But why cant we Remove them?
Docker will use as many ram has it needs.
No Need to set a limitation or reserving anything or am I mistaken?

@gotanks0407
Copy link

Coffee Stain studio has made recommendations about RAM typically used. In a server environment you should be settings limits or reservations on what you expect. I have two satisfactory containers, 3 ark ascended containers, an enshrouded container, Minecraft container, and more. I have restrictions set on every one of them incase a bug has them trying to run away with memory so if one gets buggy it doesn't take them all down. Containers by practice are meant to be limiting so they don't use a whole host's resources. If you intend to only use your server for just one satisfactory instance maybe setting up containers to do so isn't the right path.

@DenuxPlays
Copy link
Contributor Author

Okay
I have a round 60 Containers Running on my Server and only the satisfactory one has Memory Limits.
Never had any Problems.

@gotanks0407
Copy link

Okay I have a round 60 Containers Running on my Server and only the satisfactory one has Memory Limits. Never had any Problems.

So, remove the limits on your docker-compose.yml and continue to throw caution to the wind? The docker-compose is just a template. You can change it, without changing it for everyone.

@DenuxPlays
Copy link
Contributor Author

I know
I just like to Push improvements back to the original Repo.

I just wanted to improve the compose file

wolveix added a commit that referenced this pull request Oct 8, 2024
@wolveix
Copy link
Owner

wolveix commented Oct 8, 2024

@DenuxPlays to quote my own reply above:

The reservations are there in the first place to deter people from attempting to run the server in non-ideal environments, and then coming back to complain that it doesn't work and that they're experiencing issues that don't appear to be caused by low memory (despite the fact that they are in fact).

As @gotanks0407 rightfully pointed out, if you'd rather they weren't there, just remove them from your own file. Docker Compose files are intended as templates, allowing you to customize as you see fit. From my perspective, a maintainer's priority should be minimising the potential for unnecessary mistakes, while ensuring that a project remains simple to use with adequate documentation. Removing this guideline would not improve the Compose file in my opinion :)

Many Docker images do not specify resource reservations as they generally cannot realistically predict the resource requirements due to the flexibility of the application (e.g. an NGINX web server could use next-to-nothing, or it could use the entirety of a dedicated server). In this case, we do have a decent enough idea, where even the shell scripts that run directly call out your low RAM allocation if it's below 8GB (just reduced from the very old requirement of 12GB).

I've just updated the documentation to clarify the RAM requirements further.

@DenuxPlays
Copy link
Contributor Author

DenuxPlays commented Oct 9, 2024

Ahh okay now I understand.

Btw sorry I Must have missed your First reply to explaining why Memory Limits etc are used.

Thank You for your second explenation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants