Jump to content

[patch][8735] Intel Memory Allocator


Auntie Mangos

Recommended Posts

  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

  • 39 years later...

Hi, boyz and girlz :) Today I want to preset another performance optimization patch. I want to thank freghar for his huge help with changes for *nix systems :) We will use an opensource version of Intel Threading Building Blocks library, version 2.2 :rolleyes:

We need custom memory management, especially on Windows systems, since OS specific ones sometimes:

1) have low performance;

2) doesn't scale in multi-threaded environments.

For example, why Windows server performance can be sooo bad? Because Windows Server 2003 has ~2.5 mln memory ops/sec and Windows Server 2008 ~9.5 mln ops/sec. This is no match to Intel Memory Allocator with performance about 31(!) mln ops/sec. Each user on MaNGOS each second spawns 2500 memory ops so you can guess the maximum online on Windows Server 2003 :D

Performance gains can differ greately through platforms used: experience from minimum +10% of performance gains on some FreeBSD platforms to +30% on Windows ones.

P.S. You should copy into your MaNGOS server binary directories 2 dlls: tbb(_debug).dll and tbbmalloc(_debug).dll under Windoz. Under *nix just copy tbb.so and tbbmalloc.so

Repo on github: http://github.com/Ambal/mangos

Branch for 3.1.3 server: master

Branch for 3.2.2 server: rebase_branch

Link to comment
Share on other sites

1>Microsoft (R) Macro Assembler (x64) Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>generating tbb.def file
1>win64-tbb-export.def
1>Compiling...
1>cl : Command line warning D9025 : overriding '/W3' with '/W4'
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>tbb_thread.cpp
4>inftrees.c

6>Exception.cpp
1>concurrent_hash_map.cpp
1>cache_aligned_allocator.cpp
6>Creating library...
1>Compiling...
1>cl : Command line warning D9025 : overriding '/W3' with '/W4'
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>itt_notify_proxy.c

7>MemoryAllocator.cpp
2>SV_Message_Queue.cpp
2>SV_Message.cpp
2>SUN_Proactor.cpp
7>..\\..\\dep\\tbb\\src\\tbbmalloc\\MemoryAllocator.cpp(1322) : warning C4018: '>' : signed/unsigned mismatch
7>..\\..\\dep\\tbb\\src\\tbbmalloc\\MemoryAllocator.cpp(1325) : warning C4018: '>' : signed/unsigned mismatch
7>..\\..\\dep\\tbb\\src\\tbbmalloc\\MemoryAllocator.cpp(1328) : warning C4018: '>' : signed/unsigned mismatch
7>dynamic_link.cpp
2>String_Base_Const.cpp

2>SOCK_Dgram_Bcast.cpp
8>..\\..\\src\\framework\\Policies\\MemoryManagement.cpp(25) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
8>..\\..\\src\\framework\\Policies\\MemoryManagement.cpp(32) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
2>SOCK_Dgram.cpp
2>SOCK_Connector.cpp

Compiler: VC++ 2008 64bit

Link to comment
Share on other sites

Ambal, my good friend, you know i'm so bad with github.. i cant find the patch.. :'( can you post in a simple .patch please please please xD

git remote add ambal git://github.com/Ambal/mangos.git # add ambal's repo to the remotes
git checkout ambal/master # checkout ambal's master branch
git diff HEAD 633fb8b109a13b5e9f7e932c9a101fec5af21e20 > ambal.diff # create a diff to the last mangos commit in ambal's repository (check this hash again, maybe he merged again after i wrote that)
git checkout master # and we're back on our master branch, but now we have the file ambal.diff 

(as a note for those who don't know it: everything after '#' is a comment, you don't need to type that into your console ;))

this code *should* work, but it is not tested (sorry, no git here)

however, i'd suggest you to simply merge his branch into yours.

Link to comment
Share on other sites

git remote add ambal git://github.com/Ambal/mangos.git # add ambal's repo to the remotes
git checkout ambal/master # checkout ambal's master branch
git diff HEAD 633fb8b109a13b5e9f7e932c9a101fec5af21e20 > ambal.diff # create a diff to the last mangos commit in ambal's repository (check this hash again, maybe he merged again after i wrote that)
git checkout master # and we're back on our master branch, but now we have the file ambal.diff 

(as a note for those who don't know it: everything after '#' is a comment, you don't need to type that into your console ;))

this code *should* work, but it is not tested (sorry, no git here)

however, i'd suggest you to simply merge his branch into yours.

thank you very much, but dont work :'(

Link to comment
Share on other sites

Boost is huge lib plus it contains only STL-containers memory allocator as far as I know. So no chance for it, sry :huh:

ok i will investigate by test implementation if there are any performance improvements and send you pm if necessary

@thyros you can create patchfile by yourself with git diff ...but i do not think this is 100% trinity compatible ;)

if you want to leak this patch you should be able to do this yourself.... tsts :huh: :D

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