mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
Include MySQL Tuning
parent
be14568b48
commit
8f80983866
@ -1,19 +1,28 @@
|
|||||||
## Disclaimer
|
## MySQL Tuning
|
||||||
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.
|
The default MySQL configuration is not adequate for use with Playerbots, and will lead to increased disk activity and decreased performance.
|
||||||
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
|
|
||||||
|
|
||||||
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)
|
# * Fine Tuning
|
||||||
- 4000 bots: 25 MB/s (Smart scale active)
|
# Example with 64 GB RAM
|
||||||
- 8000 bots: 35 MB/s (Smart scale active) (72 MB/s with 100% activity)
|
|
||||||
|
|
||||||
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
|
## Bot activity profiles and performance
|
||||||
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
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user