Page 1 of 1

Unevenly distributed hashcode

Posted: Wed Aug 26, 2009 2:22 pm
by janiii
the "Unevenly distributed hash code - Degraded Preformance" appears again. probably mainly on more populated servers, where the maps are bigger then on low populated servers.

i found some info on it: http://markmail.org/thread/xsfq6bev46oe ... te:results

the problem comes from an growing FastMap. we don't know which one, there are sooo many in the code :shock:

i checked what objects are used as keys. mostly an Integer, then L2PcInstance and also L2Character. the last two miss the hashcode and equals methods, so maybe adding them to L2Object would solve the problem with unevenly distributed hashcode?
http://www.pastebin.cz/22234

Re: Unevenly distributed hashcode

Posted: Wed Aug 26, 2009 8:45 pm
by _DS_
Maybe compile "debug" version of the javolution with stacktrace print in this place ?

Re: Unevenly distributed hashcode

Posted: Thu Aug 27, 2009 9:22 am
by janiii
added a Thread.dumpStack(); under the warning message in Javolution.

javolution 5.3.1 with a dumpStack compiled. copy into libs folder of gameserver and then check console output when having Unevenly distributed hashcode.

Re: Unevenly distributed hashcode

Posted: Sun Aug 30, 2009 8:38 pm
by janiii
some reports?

Re: Unevenly distributed hashcode

Posted: Mon Aug 31, 2009 5:12 am
by _DS_
Already several days not a single message on my live (with normal lib)... Problem is gone somehow ? :shock:

Re: Unevenly distributed hashcode

Posted: Mon Aug 31, 2009 6:56 pm
by gigiikun
This is what we get:

Code: Select all

Unevenly distributed hash code - Degraded Performancejava.lang.Exception: Stack trace        at java.lang.Thread.dumpStack(Thread.java:1206)        at javolution.util.FastMap$3.run(FastMap.java:573)        at javax.realtime.MemoryArea.executeInArea(MemoryArea.java:27)        at javolution.util.FastMap.resizeTable(FastMap.java:523)        at javolution.util.FastMap.put(FastMap.java:501)        at javolution.util.FastMap.put(FastMap.java:484)        at javolution.util.FastMap.put(FastMap.java:453)        at net.sf.l2j.gameserver.model.actor.knownlist.ObjectKnownList.addKnownObject(ObjectKnownList.java:64)        at net.sf.l2j.gameserver.model.actor.knownlist.CharKnownList.addKnownObject(CharKnownList.java:50)        at net.sf.l2j.gameserver.model.actor.knownlist.PcKnownList.addKnownObject(PcKnownList.java:69)        at net.sf.l2j.gameserver.model.L2World.addVisibleObject(L2World.java:372)        at net.sf.l2j.gameserver.model.L2Object.spawnMe(L2Object.java:293)        at net.sf.l2j.gameserver.model.actor.L2Character.onTeleported(L2Character.java:449)        at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.onTeleported(L2PcInstance.java:10798)        at net.sf.l2j.gameserver.network.clientpackets.Appearing.runImpl(Appearing.java:44)        at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:76)        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)        at java.lang.Thread.run(Thread.java:619)