Jump to content

mtmaps (OpenMP)


Recommended Posts

Got crash:

#0 Group::EndRoll (this=0x8c7a88500) at stl_list.h:223

#1 0x000000000050c4dc in Creature::Update (this=0x8ce703000, diff=Variable "diff" is not available.

)

at ../../../src/game/Creature.cpp:407

#2 0x00000000005c9eb8 in VisitorHelper<MaNGOS::ObjectUpdater, Creature> (

v=@0x7ffffeff8e90) at GridNotifiersImpl.h:47

#3 0x00000000005dbab2 in Map::Update (this=0x8c9c80000, t_diff=Variable "t_diff" is not available.

)

at TypeContainerVisitor.h:70

#4 0x00000000005dd039 in InstanceMap::Update (this=0x8c9c80000,

t_diff=@0x8c7ca2210) at ../../../src/game/Map.cpp:2503

#5 0x00000000007c5a68 in MapInstanced::Update (this=0x839f90000,

t=@0x8c7ca2210) at ../../../src/game/MapInstanced.cpp:63

#6 0x00000000005ec082 in MapUpdateRequest::call (this=0x8c7ca21f0)

at ../../../src/game/MapUpdater.cpp:47

#7 0x000000000081fefb in DelayExecutor::svc (this=0x813c64e18)

at ../../../src/shared/DelayExecutor.cpp:60

#8 0x0000000800c52117 in ACE_Task_Base::svc_run ()

from /usr/local/lib/libACE-5.7.5.so #9 0x0000000800c52431 in ACE_Thread_Adapter::invoke ()

from /usr/local/lib/libACE-5.7.5.so #10 0x000000080194f4d1 in pthread_getprio () from /lib/libthr.so.3

Link to comment
Share on other sites

  • Replies 319
  • Created
  • Last Reply

Top Posters In This Topic

Yesterday we had 2700+ player online 6H uptime (yes soo bad... but good with 3.2.2a :P and these population) and no lag... with ACE MTMaps + gcc 4.4.2 + ACE 5.7.2, rates 60% sometimes in some core. In me experience with mangos, the secret of performance (if you have enouth CPU and RAM) are 2 important factor:

- 1) MySQL with INNODB Tunning Configuration: Without very very good config and tunnig... mangos =lag. 950+ needed

- 2) HDD IO: Without good rate IO in HDD of MySQL witn 1800+... mangos=lag

Yes.. if you have a good server and good configuration for DB. Lag is gone

Best Regards

Could you please add some hints about tweaking DB performance?

I've been playing around a bit, but I have the feeling, that there is still some tweak possible ; )

thanks,

Termitt

Link to comment
Share on other sites

  • 2 weeks later...

HI, I desperatly need help :<

http://www.pastebin.org/89133

this is crashlog from crash happening every few hours. I suspect that it is caused by mtmaps. first it was crashing on (target->processed) than I modified it to something like this http://www.pastebin.org/89134 to make sure that under target->targetGUID is accessable unit, before fourther processing. seems that any attempt to access "target" is crashing. I googled whole day for that bug and found some info that it is caused by any type of mtmaps, because multiple threads are destoying this argument for each other, particulary speaking of triggered spells link. I must confess that I now nothing about multithreading, how to properly lock variables using Mutex or any other method and where to find those critical. If someone could help or give a hint i would appreciate.

Link to comment
Share on other sites

Use tbb::concurrent_vector instead std::list in all cycles TargetInfo and GOTargetInfo(Spell.cpp, SpellEffects.cpp) after this changes, no more crash :)

Welcome again Infinity =), can you put any example of use of tbb::concurrent_vector? Im confused with intel documentation :S

Link to comment
Share on other sites

For example:

include tbb/concurrent_vector.h, <memory> in Spell.h and Makefile.am in line AM_CPPFLAGS add ../../dep/tbb/include

In Spell.cpp/SpellEffects.cpp replace std::list on tbb::concurrent_vector in all TargetInfo and GOTargetInfo cycles, example: for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) to for (tbb::concurrent_vector<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit).

And in Spell.h, std::list<GOTargetInfo> m_UniqueGOTargetInfo; and std::list<TargetInfo> m_UniqueTargetInfo; replace on tbb::concurrent_vector<GOTargetInfo> m_UniqueGOTargetInfo; and tbb::concurrent_vector<TargetInfo> m_UniqueTargetInfo;

Link to comment
Share on other sites

For example:

include tbb/concurrent_vector.h, <memory> in Spell.h and Makefile.am in line AM_CPPFLAGS add ../../dep/tbb/include

In Spell.cpp/SpellEffects.cpp replace std::list on tbb::concurrent_vector in all TargetInfo and GOTargetInfo cycles, example: for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) to for (tbb::concurrent_vector<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit).

And in Spell.h, std::list<GOTargetInfo> m_UniqueGOTargetInfo; and std::list<TargetInfo> m_UniqueTargetInfo; replace on tbb::concurrent_vector<GOTargetInfo> m_UniqueGOTargetInfo; and tbb::concurrent_vector<TargetInfo> m_UniqueTargetInfo;

Thankkkss!!! OMG, you made me happier than my wife!! :P

Link to comment
Share on other sites

Hi, finally i solved my problem implementing concurrent_vector.. here are the updated patches for 9366:

MTMaps: http://pastebin.com/f20f6500b

Concurrent_vector: http://pastebin.com/f66c0e16a

For Linux Environment you may need some global config:

cd /root
wget [url]http://www.threadingbuildingblocks.org/uploads/77/142/2.2/tbb22_20090809oss_src.tgz[/url]
tar xvfz tbb22_20090809oss_src.tgz
mv tbb22_20090809oss tbb
cd tbb/src
make
cd /root/tbb/build/linux*release
chmod 777  tbbvars.sh
./tbbvars.sh 

Best Regards

Link to comment
Share on other sites

Linked library problem, revise this line:

-MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LIBS $MANGOS_LIBS"
+MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LIBS $MANGOS_LIBS -ltbb"

You need -ltbb to say compiler that use TBB Library

Or Revise tbbvars.sh, in my environment:

#!/bin/bash
export TBB22_INSTALL_DIR="/root/tbb"   <--------------  Directory that was created when you unpacked your TBB download [/color]
tbb_bin="${TBB22_INSTALL_DIR}/build/linux_intel64_gcc_cc4.4.1_libc2.10.1_kernel2.6.32.2_release"  <--------------- Directory tree should be created automatically when you build TBB from source[/color]
if [ -z "$CPATH" ]; then #
   export CPATH="${TBB22_INSTALL_DIR}/include" #
else #
   export CPATH="${TBB22_INSTALL_DIR}/include:$CPATH" #
fi #
if [ -z "$LIBRARY_PATH" ]; then #
   export LIBRARY_PATH="${tbb_bin}" #
else #
   export LIBRARY_PATH="${tbb_bin}:$LIBRARY_PATH" #
fi #
if [ -z "$LD_LIBRARY_PATH" ]; then #
   export LD_LIBRARY_PATH="${tbb_bin}" #
else #
   export LD_LIBRARY_PATH="${tbb_bin}:$LD_LIBRARY_PATH" #
fi #
#
]

If file is ok, run it with ./tbbvars.sh and your system will find ok all tbb libraries

*NOTE: Remove objdir and do again:

autoreconf --install --force

automake --add-missing

automake src/bindings/ScriptDev2/Makefile

mkdir objdir

cd objdir

....

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use