Optimizing for GameServers
Hello,
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.
|
I'd build my system from scratch or use at least gentoo as a base but unSpawn is right that the first step is to find the bottleneck.
|
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.
|
Bump
|
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" 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 |
Quote:
|
All times are GMT -5. The time now is 03:54 AM. |