-
Notifications
You must be signed in to change notification settings - Fork 225
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
Auto adjust RAM #52
Comments
In all my reading I have been given the opposite impression: that "it is good practice to in fact set the min and max to be the same". I have thought on the matter of In my experience there are some reasons to advise against differing
Other comments:
I don't think MSM can take the RAM allocation responsibly away from the administrator, they will know their system best including what other servers are running utilising what RAM already, what each server requires resource-wise, and whether or not they expect/accept paging in operation. I have written, it suddenly occurs to me, enough for one comment. Let me know what you think. |
With worlds I mean separate JVM server instances, yes. Of course setting the max of one instance to 80% and then starting a second world is a problem. This problem goes away once you restart all the instances, I don't really know how this could be fixed otherwise With regard to taking the choice away from the admin: Pagefaults should not be avoided at all costs of course, it's an easy way to move an unused instance out of memory and allows used instances to utilize the RAM better. By the way: I have created a plugin for my ec2 bootstrapping script that installs msm. I have tested it on an ec2 micro instance with 650MB RAM, I set Xmx to 350M and the server runs just fine. Mind you, this was only with one client. |
Actually, what if Xms and Xmx were not set at all? Let java do the calculations: http://docs.oracle.com/javase/1.5.0/docs/guide/vm/gc-ergonomics.html |
I'm a believer in sensible defaults with easy overrides: so I think it would be a good idea to not set RAM at all like you suggest and allow admins to set hard values if they think it best. MSM could even check the instance RAM usage automatically after startup and suggest an With regard to the |
Also that plugin for ec2 looks good. I've never used EC2 myself but I read through it and I get the gist. |
An important consideration for implementing this will be a design decision of whether msm is going to assume that the primary purpose of a server it is installed on is minecraft. I dropped msm onto my mail/dns/LAMP server, and I took a careful look at the memory settings to make sure java wasn't going to starve the other services of RAM: if it had arbitrarily decided set Xms & Xmx to 2G, it would have made a bit of a mess of the mysql tuning. |
This is something I was wary of also, and a case for leaving all RAM settings up the admin. I think it MSM should probably have an over eager default for the common user, for have a strong note about it in setup urging experienced users to set there own RAM allocations. I know if I read that I would set RAM usage myself. |
Instead of hardcoding Xms and Xmx to 1024M you could do some autodetection like this
It's good practice not to set min and max to the same, this way more than one minecraft server can run. The can change their size in RAM depending on how many players there are in each world.
If only one world is played it can use all the RAM it wants.
The minimum should be adjusted to the number of worlds running. With 4 worlds for example, it should be 20% (=80% of RAM).
With 6 worlds and 20% the server would start to swap, so it should be 13%.
The text was updated successfully, but these errors were encountered: