Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Currently I am hosting a game that requires a lot of RAM (hosted on CentOS 5.x x = latest), I am currently hosting on Xeons X3*** w/ 32GB of RAM, 1GBit uplink port. Placing around 30-60 servers on once box and still giving it 7-10GB's of room to breathe using around 50% avenged CPU usage. I am having little reports of lag with one player connected to their server, I was wondering how I would go about to optimize the kernal, if possible to enable the servers to run at a high priory, due to that is the only thing the server is actually hosting.
If it's more players experiencing problems then optimization may be in order. If it's just one best determine first if the source of latency is beyond your control or not IMHO.
The thing is, I am using 32GB ECC DDR3, (BTW, gamservers are coded in Java). When running a server using the Xmx and Xms values, If a 1024MB server is created, it will use to 1024MB and allow no room for the players, or only allow around 4-5 connections before lag, yet with another host they allow 512MB's of RAM and it lets them connect with up to 10 players, thus I am using/have better server specifications.
The lag may come from the program having to reallocate more memory every time it reaches a certain number of connections. You can increase allocated memory of the program with some JAVA_OPTS. The options you'd probably want are -Xms and -Xmx.
Just edit the JAVA_OPTS in the bash script for launching the game server.
Code:
JAVA_OPTS="$JAVA_OPTS -Xms3G -Xmx10G"
To preallocate 3GB of RAM and allow a max of 10GB to allocate. Make them whatever you want.
Maybe consider monitoring your machine with something like Icinga with PNP4Nagios or munin for historical data so that you can get a performance profile over time to see if the problem is a regular hick-up.
You should also consider using sun java instead of openjdk as it generally has better performance and more reliable at properly running Java programs.
The lag may come from the program having to reallocate more memory every time it reaches a certain number of connections. You can increase allocated memory of the program with some JAVA_OPTS. The options you'd probably want are -Xms and -Xmx.
Just edit the JAVA_OPTS in the bash script for launching the game server.
Code:
JAVA_OPTS="$JAVA_OPTS -Xms3G -Xmx10G"
To preallocate 3GB of RAM and allow a max of 10GB to allocate. Make them whatever you want.
Maybe consider monitoring your machine with something like Icinga with PNP4Nagios or munin for historical data so that you can get a performance profile over time to see if the problem is a regular hick-up.
You should also consider using sun java instead of openjdk as it generally has better performance and more reliable at properly running Java programs.
SAM
The thing is I am selling the RAM, that's how the gameservers are sold, so allowing more RAM for the server would defeat the purpose in having the fixed prices. The problem is when allocating say 1024MB linux will use all of it and allow no room, but with windows it will only use what it needs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.