This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in
Off-Topic Discussion.
LaraCroft
Posts: 360 Joined: Sat Aug 08, 2009 1:37 am
Post
by LaraCroft » Fri Jan 15, 2010 11:24 am
Hi guys....
One question...
What is the better config for file GameServer_loop.sh??
Im using default config:
Code: Select all
#!/bin/bash # exit codes of GameServer:# 0 normal shutdown# 2 reboot attempt while :; do [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log" [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 [ $? -ne 2 ] && break# /etc/init.d/mysql restart sleep 10done
My test server is a Quad Core Xeon 2,5 Gh whit 4GB DDR2...
Is better to use all memory on -Xms1024m -Xmx1024m options??
Or i use only memory needs to run the server??
Thxxx and respect
!!!knowledge and intelligence must be shared!!!
takhs7
Posts: 110 Joined: Sun Aug 31, 2008 7:16 am
Post
by takhs7 » Sat Jan 16, 2010 7:46 pm
im not any super expert.. but i have read that adding -server parameter speed things up a bit.. here is what i use ( i have 8gb ram tho..)
#!/bin/bash
# exit codes of GameServer:
# 0 normal shutdown
# 2 reboot attempt
while :; do
[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
java -server -Djava.util.logging.manager=net.sf.l2j.util.L2LogManager -Xmn1024m -Xms2048m -Xmx4096m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar net.sf.l2j.gameserver.GameServer > log/stdout.log 2>&1
[ $? -ne 2 ] && break
# /etc/init.d/mysql restart
sleep 10
done
i also have some other parameters in there.. not sure if they help tho.. anyone with some good expirience on these?
btw my file is for final.. dont c/p and try on epilogue.. just add the parameters in red or something..
achilless
Posts: 153 Joined: Thu Oct 02, 2008 7:40 pm
Location: Russia & Ukraine
Post
by achilless » Sun Sep 19, 2010 3:00 pm
_DS_ wrote: I use all "static" (e.g. weapons, armors) tables in MyISAM and several large tables (characters, items) in InnoDB, due to several problems.
nice idea
sps
achilless
Posts: 153 Joined: Thu Oct 02, 2008 7:40 pm
Location: Russia & Ukraine
Post
by achilless » Sat Sep 25, 2010 11:38 pm
my GameServer_loop.sh
Code: Select all
#!/bin/bash # exit codes of GameServer:# 0 normal shutdown# 2 reboot attempt while :; do [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log" [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" [ -f log/chat.log ] && mv log/chat.log "log/`date +%Y-%m-%d_%H-%M-%S`_chat.log" [ -f log/item.log ] && mv log/item.log "log/`date +%Y-%m-%d_%H-%M-%S`_item.log" [ -f log/enchantitem.log ] && mv log/enchantitem.log "log/`date +%Y-%m-%d_%H-%M-%S`_enchantitem.log" [ -f log/accounting.log ] && mv log/accounting.log "log/`date +%Y-%m-%d_%H-%M-%S`_accounting.log"# mv ./log/stdout.log "./log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" # mv ./log/chat.log "./log/`date +%Y-%m-%d_%H:%M:%S`-chat.log"# # mv ./usr/src/l2/gameserver/log/stdout.log "./usr/src/l2/gameserver/log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" # mv ./usr/src/l2/gameserver/log/chat.log "./usr/src/l2/gameserver/log/`date +%Y-%m-%d_%H:%M:%S`-chat.log"# # java -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms850m -Xmx850m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -XX:+UseParallelGC -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+UseParallelGC -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+UseParallelGC -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx3072m -Xmn512m -Xss128k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx5000m -Xmn512m -Xss128k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1152m -Xmx1152m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+UseParallelGC -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1# java -server -Xmx4096m -Xms2048m -Xmn1024m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts# java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts# java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms700m -Xmx700m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 [ $? -ne 2 ] && break# /etc/init.d/mysql restart sleep 10done
week tried, the best
java -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx4096m -Xmn512m -Xss128k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
Stake
Posts: 383 Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:
Post
by Stake » Sun Sep 26, 2010 1:01 am
Xss (thread stack size) set to 128k is at the lowest bound. It's not recommended to set it smaller, so 256k stack is enough for an L2j server program. ParallelGCThreads should be left on the default value. It's not recommended to set it higher than the number of cpu cores. Not everyone has 6-core cpu in their machine. Anyways, everyone should do their own tests to get the best options for performance. But you know, performance in some cases is like the principle of "quantity over quality". So, some performance-like options may cause server crashes and a lot of errors in the gameserver.
achilless
Posts: 153 Joined: Thu Oct 02, 2008 7:40 pm
Location: Russia & Ukraine
Post
by achilless » Sun Sep 26, 2010 12:46 pm
would add, with a -XX:+AggressiveOpts I strongly jumped CPU usage,