Jump to content
Sign in to follow this  
Auntie Mangos

High Performance Tips

Recommended Posts

Please explain:

Not much to explain, sort_buffer_size and join_buffer_size is a buffer for Sort and Join SQL operations... Buffers rules:

- More buffers size, less performance

- Less buffers size, more performace

- Less than needed, more crashes :P

With some software you can tunning buffers for your application and in mangos case.. 4M is a good value

Share this post


Link to post
Share on other sites

Hello there!

What is the effect of

make -j xx

does it make mangos multi processed really or not ?

and i will soon have a x4 processor, and i usually run two realms, one for "production" and another for tests, have i got to "make -j 4" both or can i "make -j 2" each to share processor cores ?

Share this post


Link to post
Share on other sites

"maje -j xx" only defines how much CPU cores will be used to compile the core, it will not affect the performance of Mangos itself. As Kero99 said, you must use the multithreading patch. It is still not really good working but it decreases at least the load on the primary thread a bit.

So If you own a Quadcore server then use -j 4 to get the core compiled quickly, use something like -j 2 if you have a 2nd realm running while you compile. Take care with the priorities (nice), else the 2nd realm might lag while you compile.

Hello there!

What is the effect of

make -j xx

does it make mangos multi processed really or not ?

and i will soon have a x4 processor, and i usually run two realms, one for "production" and another for tests, have i got to "make -j 4" both or can i "make -j 2" each to share processor cores ?

Share this post


Link to post
Share on other sites

Hello, even if I've installed ACE in /usr/local, when I configure the compilation, it says :

checking for ACE... configure: error: You need to install ACE package or use built-in ACE sources

Share this post


Link to post
Share on other sites

I am for the moment on CentOS 32Bit. This is my my.cnf:

[mysqld]

key_buffer = 16M

max_allowed_packet = 8M

thread_stack = 192K

thread_cache_size = 8

max_connections = 16

table_cache = 256

table_open_cache = 128

table_definition_cache = 384

sort_buffer_size = 2M

join_buffer_size = 2M

thread_concurrency = 10

#

# * Query Cache Configuration

#

query_cache_limit = 1M

query_cache_size = 16M

This is my mangos.conf

UseProcessors = 0

ProcessPriority = 1

Compression = 1

PlayerLimit = 100

SaveRespawnTimeImmediately = 1

MaxOverspeedPings = 5

GridUnload = 1

SocketSelectTime = 10000

GridCleanUpDelay = 30000

MapUpdateInterval = 100

ChangeWeatherInterval = 600000

PlayerSaveInterval = 30000

vmap.enableLOS = 1

vmap.enableHeight = 1

vmap.ignoreMapIds = "369"

vmap.ignoreSpellIds = "7720"

DetectPosCollision = 0

TargetPosRecalculateRange = 5

UpdateUptimeInterval = 1

MaxCoreStuckTime = 0

AddonChannel = 1

LogSQL = 1

PidFile = ""

LogLevel = 1

LogTime = 0

LogFile = ""

LogTimestamp = 0

LogFileLevel = 0

LogFilter_AchievementUpdates = 1

LogFilter_CreatureMoves = 1

LogFilter_TransportMoves = 1

LogFilter_VisibilityChanges = 1

WorldLogFile = ""

DBErrorLogFile = "DB"

CharLogFile = ""

CharLogTimestamp = 0

CharLogDump = 0

GmLogFile = "GM"

GmLogTimestamp = 1

GmLogPerAccount = 1

RaLogFile = ""

LogColors = ""

Visibility.GroupMode = 0

Visibility.Distance.Continents = 120

Visibility.Distance.Instances = 120

Visibility.Distance.BGArenas = 120

Visibility.Distance.Object = 120

Visibility.Distance.InFlight = 10

Visibility.Distance.Grey.Unit = 1

Visibility.Distance.Grey.Object = 10

What can i do to have it optimized for the following:

1. Test server has MAX ram of 1GB. I need to lower the amount of memory Mangos uses.

2. Max amount of players connected will never pass 100.

3. Amount of memory usage by MySQL and Mangos together needs to be lower.

So what kind of changes do you recommend to optimize the Memory part (which is the most important for me right now while i gather money to buy more memory.)

Share this post


Link to post
Share on other sites
I am for the moment on CentOS 32Bit. This is my my.cnf:

[mysqld]

key_buffer = 16M

max_allowed_packet = 8M

thread_stack = 192K

thread_cache_size = 8

max_connections = 16

table_cache = 256

table_open_cache = 128

table_definition_cache = 384

sort_buffer_size = 2M

join_buffer_size = 2M

thread_concurrency = 10

#

# * Query Cache Configuration

#

query_cache_limit = 1M

query_cache_size = 16M

This is my mangos.conf

UseProcessors = 0

ProcessPriority = 1

Compression = 1

PlayerLimit = 100

SaveRespawnTimeImmediately = 1

MaxOverspeedPings = 5

GridUnload = 1

SocketSelectTime = 10000

GridCleanUpDelay = 30000

MapUpdateInterval = 100

ChangeWeatherInterval = 600000

PlayerSaveInterval = 30000

vmap.enableLOS = 1

vmap.enableHeight = 1

vmap.ignoreMapIds = "369"

vmap.ignoreSpellIds = "7720"

DetectPosCollision = 0

TargetPosRecalculateRange = 5

UpdateUptimeInterval = 1

MaxCoreStuckTime = 0

AddonChannel = 1

LogSQL = 1

PidFile = ""

LogLevel = 1

LogTime = 0

LogFile = ""

LogTimestamp = 0

LogFileLevel = 0

LogFilter_AchievementUpdates = 1

LogFilter_CreatureMoves = 1

LogFilter_TransportMoves = 1

LogFilter_VisibilityChanges = 1

WorldLogFile = ""

DBErrorLogFile = "DB"

CharLogFile = ""

CharLogTimestamp = 0

CharLogDump = 0

GmLogFile = "GM"

GmLogTimestamp = 1

GmLogPerAccount = 1

RaLogFile = ""

LogColors = ""

Visibility.GroupMode = 0

Visibility.Distance.Continents = 120

Visibility.Distance.Instances = 120

Visibility.Distance.BGArenas = 120

Visibility.Distance.Object = 120

Visibility.Distance.InFlight = 10

Visibility.Distance.Grey.Unit = 1

Visibility.Distance.Grey.Object = 10

What can i do to have it optimized for the following:

1. Test server has MAX ram of 1GB. I need to lower the amount of memory Mangos uses.

2. Max amount of players connected will never pass 100.

3. Amount of memory usage by MySQL and Mangos together needs to be lower.

So what kind of changes do you recommend to optimize the Memory part (which is the most important for me right now while i gather money to buy more memory.)

Maybe you need use less VMAPS:

vmap.ignoreMapIds = "369, 0, 1, 571, 530"

or

vmap.ignoreMapIds = "0,1,13,37,169,369,449,450,530,571,582,584,586,587,588,589,590,591,592,593,594,596,597,598,606,610,612,613,614,620,621,622,623,624"

Share this post


Link to post
Share on other sites

To tune up your MySQL config I highly suggest using "tuningprimer.sh" -> http://www.day32.com/MySQL/tuning-primer.sh // http://www.day32.com/MySQL/

It produces output like:

TEMP TABLES

Current max_heap_table_size = 16 M

Current tmp_table_size = 32 M

Of 1091 temp tables, 84% were created on disk

Effective in-memory tmp_table_size is limited to max_heap_table_size.

Perhaps you should increase your max_heap_table_size and/or tmp_table_size.

to reduce the number of disk-based temporary tables

KEY BUFFER

Current MyISAM index space = 1 M

Current key_buffer_size = 1 M

Key cache miss rate is 1 : 190

Key buffer fill ratio = 6.00 %

Your key_buffer_size seems to be too high.

Perhaps you can use these resources elsewhere

and many more...

Run it on your linux machine and find resources and missconfigurations. It helped us a lot!

Share this post


Link to post
Share on other sites

Yeah i used tuning primer. awesome tool.

@Kero99 - You are right. I should add more vmaps ignore. But am afraid of blink, charge and similar spells.

Share this post


Link to post
Share on other sites
i'm using debian too and lately i'm having a lot of crashes.

since 3.2.2 it's crashing all the time, anyone with the same problems?

Get some full stacktraces and create a thread, or reply to one if your trace seems similar

Share this post


Link to post
Share on other sites

Hey , what do you mean with reloc patch from silver? Explain please :)

I think, for stable servers, dont put mtmaps like tip, becouse with the visibility and reloc patch from silver, is not necessary mtmaps.

With the correct configuration in my.cnf and mangosd.conf is possible allocate more than 3000.

I recommend use SAS 15K or SSD Extreme "-E", tune for high workload in mysql, remember that the SSD Disk, in some cases, change the latency from 0.5 to 0.1.

in limits, you can tune too MySQL.

Chears!

My status: 1 day ON with 3500+

TCP Stack: Linux systems have a automatic system to configure self TCP stack but when you have more of 1000k players if posible that you need tunning some TCP and kernel config for better system performance and responses. This is my sysctl.conf for example i use:

http://pastebin.ca/1776268

Could you also post the link again , it is dead now , and i really want to know :P:rolleyes:

Share this post


Link to post
Share on other sites

I'm using right now, 4 threads in ace mtmaps becouse i have 3500+ but is necessary hack a lot the core! to bad!

Anycase, for XtraDB, this options can increase the performance:

innodb_checksums = 0

innodb_support_xa = 0

innodb_extra_rsegments = 64

innodb_stats_update_need_lock = 0

innodb_io_capacity = 2000 # or 4000

Share this post


Link to post
Share on other sites

Hey i have a small problem , my mysql jumps often to 49% memory usage , i have 4gb memory.

This is my config

#
# * Fine Tuning
#
key_buffer        = 100M
max_allowed_packet    = 128M
thread_stack        = 50M
thread_cache_size       = 8
sort_buffer_size = 4M
join_buffer_size = 4M
innodb_additional_mem_pool_size = 50M # Values beetween 20M and 50M are enough for character tables and for every innodb database.
innodb_thread_concurrency = 1 # 1 To Processors of 1 or 2 cores. 2 for Quad CoRe.  4 for i7 / Xeon and 8 for Bi-XEON (2 processors).
innodb_flush_log_at_trx_commit = 0 # 0 to reduce the I / O of HD, but in case of a fall is to lose data from the last transaction. 1 recommended for losing nothing. (More I/O) 2 Mix beetween one and two.
innodb_buffer_pool_size = 7G # The size of the table of characters plus a margin. ¡¡¡¡ATTENTION THIS IS SPACE FOR MYSQL RAM!!!! which is reserved!
innodb_file_per_table = 1 # Recomended for reduce file access.
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
default-storage-engine = INNODB
skip-external-locking
max_connections        = 20
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit    = 50M
query_cache_size        = 512M

Have i done something wrong , i have duel core(3.0ghz) and 4GB memory, i also host mangos on it

Share this post


Link to post
Share on other sites
Hey i have a small problem , my mysql jumps often to 49% memory usage , i have 4gb memory.

query_cache_size        = 512M
thread_stack        = 50M
sort_buffer_size = 4M
join_buffer_size = 4M
innodb_buffer_pool_size = 7G # The size of the table of characters plus a margin. ¡¡¡¡ATTENTION THIS IS SPACE FOR MYSQL RAM!!!! which is reserved!

Have i done something wrong , i have duel core(3.0ghz) and 4GB memory, i also host mangos on it

You have your answer!

Share this post


Link to post
Share on other sites
default-storage-engine = INNODB # For characters DB tables (dont forgot change your tables to INNODB)

Should i also change world tables and realmd tables to INNODB or only char?

Share this post


Link to post
Share on other sites

Kero99 , haveyou grinunload = 0 or = 1 ? Could you post your mangosd.conf file for you high popu server?

Share this post


Link to post
Share on other sites
Sign in to follow this  

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • 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