Killing CPU

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Danoontje
Posts: 34
Joined: Tue Sep 08, 2009 9:15 am

Re: Killing CPU

Post 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?
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: Killing CPU

Post 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 
Aka UnHoly
Danoontje
Posts: 34
Joined: Tue Sep 08, 2009 9:15 am

Re: Killing CPU

Post 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.
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: Killing CPU

Post 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
Aka UnHoly
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Killing CPU

Post 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
Image
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Killing CPU

Post by BiggBoss »

Image
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Killing CPU

Post by mgbhard »

Chapter 2 is missing :P
Image
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: Killing CPU

Post 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).
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
Post Reply