LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-14-2011, 01:07 PM   #1
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Rep: Reputation: Disabled
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.
 
Old 10-14-2011, 06:48 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 10-14-2011, 08:09 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.

Last edited by jefro; 10-14-2011 at 08:10 PM.
 
Old 10-14-2011, 11:07 PM   #4
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-15-2011, 08:17 PM   #5
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
Bump
 
Old 10-16-2011, 04:12 AM   #6
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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

Last edited by sag47; 10-16-2011 at 04:18 AM.
 
Old 10-16-2011, 04:41 AM   #7
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing the Iptables Harish Meeran Linux - Networking 1 01-19-2010 06:39 AM
optimizing c andystanfordjason Programming 6 01-13-2007 08:38 PM
Uploading to Gameservers.net Diademed General 1 12-03-2004 01:12 AM
optimizing to Athlon XP sethgeekx86 Slackware 8 05-20-2004 03:28 PM
Gameservers and Distributions Jandar Linux - Distributions 1 09-22-2003 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration