diff --git a/Playerbot-Configuration.md b/Playerbot-Configuration.md index 13c083e..34a2e75 100644 --- a/Playerbot-Configuration.md +++ b/Playerbot-Configuration.md @@ -1,22 +1,31 @@ -## Disclaimer -It has been observed that having a lot of bots, or players for that matter, will put a strain on hard drives; even with a fairly low amount of bots or players. MySQL will continuously read and write to the disk and the amount quickly adds up. -Recommended configuration to extend lifespan of your hard drive: -- in mysql configuration file add line `skip-log-bin` which reduce ~75-90% of writes because skipping binary logging -- in playerbots configuration file enable `AiPlayerbot.DisabledWithoutRealPlayer` to make sure no bots are logged in while no players are -- use as few bots as possible or limit yourself to only using altbots to minimize the amount of writes +## MySQL Tuning +The default MySQL configuration is not adequate for use with Playerbots, and will lead to increased disk activity and decreased performance. -The following write speeds have been noted based on the number of bots logged in (without recommended configurations). +You should add/change the below config options, in your MySQL configuration where ```innodb_buffer_pool_size``` ideally should be 50% of your total RAM: -- 500 bots: 1-10 MB/s (100% activity) -- 1000 bots: 9 MB/s (Smart scale active) -- 2000 bots: 15 MB/s (Smart scale active) -- 4000 bots: 25 MB/s (Smart scale active) -- 8000 bots: 35 MB/s (Smart scale active) (72 MB/s with 100% activity) +``` +# +# * Fine Tuning +# Example with 64 GB RAM -With 8000 bots at 100% activity that equals about 178 **terabytes** every 30 days. +# INNODB +innodb_buffer_pool_size = 32G +innodb_redo_log_capacity = 8G +innodb_io_capacity = 500 +innodb_io_capacity_max = 2500 +innodb_use_fdatasync = ON +innodb_buffer_pool_instances = 12 +innodb_log_buffer_size = 32M + +# Prevent SQL Deadlocks as much as possible +transaction_isolation="READ-COMMITTED" + +# Max age of binary logs - 5 days to prevent binary log pileups +binlog_expire_logs_seconds = 432000 +``` ## Bot activity profiles and performance -Before going into the configuration options we need explain the logic abit. Every update tick of the server its calculated whether a bot can +Before going into the configuration options we need explain the logic a bit. Every update tick of the server its calculated whether a bot can or can't be active. An active bots takes and eats alot more resources then an idle bot. The following logic is applied to determine whether a bot is active or not, applied in the explained order.