Page 5 of 5

Re: Killing CPU

Posted: Tue Oct 13, 2009 9:22 pm
by Danoontje
so java on 64 bit is slower then 32 ony at startup?! kinda unclear..., might that be the reason of fluctuation..
Does it matter its slower @ startup? Yes 64 needs some more memory for example if u got 2GB @ 32bit u need 4GB @ 64 bit. But this is worth it especially for something like Java. Start up is irrelevant when the server is more online then starting up ( atleast i hope for you ).

afaik adressing in 64bit memory is more effecient then in 32bit. But because it contains 64bit and 32bit information for adressing its abit bigger. Having all parts (cpu, os, software) 64bit should improve the usage of java i think.

Ill be confguring my server soon maybe ill do a small test 32bit versus 64 bit. Could be interesting.

As for the Thread pool values im very interested in. maybe nBd could explain or give us a source of your recommedation to make the values the same as core count?

Re: Killing CPU

Posted: Sun Oct 18, 2009 5:40 pm
by badboy29
Yes, NBD also must have a great boot parameter in JAVA, I just do not understand a thing. -xmx2g -xms2g mean total 4GB RAM or -xmx4g -xms4g = total 4GB Ram ? Building on the topic would like to clarify another doubt. On 1 server with 200 players or more this config should be greater than 100 or standard ? Mysql server have 600 connections :)

Code: Select all

# Default: 100MaximumDbConnections = 100 

Re: Killing CPU

Posted: Sun Oct 18, 2009 11:01 pm
by Danoontje
MySQL doenst have concurrent connections they open and close again. Limit too 100 will provide you use until some point. If the limit is reached ull notice it soon enough with lag when opening things that require SQL. With 200 players 100 connection limit should be fine.

Re: Killing CPU

Posted: Wed Oct 21, 2009 12:35 am
by badboy29
This initialization parameter is good for 1 Quad Core with 8GB Ram running Debian x64 ?

Code: Select all

java -server -Xmx3g -Xms3g -Xmn768m -Xss128k -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -cp ./../libs/*;l2jserver.jar net.sf.l2j.gameserver.GameServer

Re: Killing CPU

Posted: Fri Feb 12, 2010 5:04 pm
by mgbhard
nBd wrote:
migi-chan wrote:

Code: Select all

#============================================================##                   Thread Configuration                     ##============================================================## Extreme caution should be here, set to defaults if you do# not know what you are doing.# These could possibly hurt your servers performance, or improve # it drastically. ThreadPoolSizeEffects = 25ThreadPoolSizeGeneral = 32 #Default 2UrgentPacketThreadCoreSize = 5#Default 4GeneralPacketThreadCoreSize = 10#Default 4GeneralThreadCoreSize = 10 AiMaxThread = 10 #Packet LifeTime in milliseconds, 0 - disabled featurePacketLifeTime = 0 #Dead Lock Detector (a separate thread for detecting deadlocks)#For improved crash logs and automatic restart in deadlock case if enabled#Check interval is in secondsDeadLockDetector = FalseDeadLockCheckInterval = 20RestartOnDeadlock = False 
;S

Just a small suggestion:

Use for all ThreadPools your Core Size. If you have 4 CPU Core's, proper config looks like this:

Code: Select all

ThreadPoolSizeEffects = 4ThreadPoolSizeGeneral = 4 #Default 2UrgentPacketThreadCoreSize = 4#Default 4GeneralPacketThreadCoreSize = 4#Default 4GeneralThreadCoreSize = 4 AiMaxThread = 4
More is useless. On 8 CPU Core's its 8 for all Values. Min is 2. ;)

I Want to ask if this is right, i have a 4 core CPU, should i set this values on 4?.
If it's correct, why then default values are:
# Default: 10
ThreadPoolSizeEffects = 10
# Default: 13
ThreadPoolSizeGeneral = 13

Thx
Marcelo

Re: Killing CPU

Posted: Fri Feb 12, 2010 5:07 pm
by BiggBoss

Re: Killing CPU

Posted: Fri Feb 12, 2010 5:12 pm
by mgbhard
Chapter 2 is missing :P

Re: Killing CPU

Posted: Sun Dec 11, 2011 9:37 am
by Szponiasty
mgbhard wrote:
Chapter 2 is missing :P
How to determine what causes gameserver to lag:
http://www.youtube.com/watch?v=tT3TXlN_ ... e=youtu.be

PS. add "-XX:+UseCompressedOops" JVM switch. It will tell JVM to use 32 bit, compressed pointers, instead of 64 bit. That improves performance of 64 bit JVM in some areas where 32bit JVM is faster than 64bit version (dont use if u want to allocate more than 32GB RAM for gameserver).