Documentation and discussion
Tuning analysis software
- Use circular replication.
- Choose a fail-over strategy:
- Master server VIP must only connect to a single MySQL instance.
- Fail-over generally requires Apache and PHP on the MySQL server to allow the load balancer to indirectly monitor MySQL status.
- APC7920 or WTI
- iLO, DRAC, IBM RSAII
- Plan for likely failure:
- Plan for possible failure:
Any memory specified below is allocated once for each MySQL instance, regardless of the number of connections.
- Recommended: Cap at 128M, maybe 256M.
1 (enables cache by default)
- Consider turning the default caching off and using
SQL_CACHE in specific queries accessing tables with less
- Slightly more than maxclients (in apache) to prevent "db offline" errors
- Recommended: As large as possible while accommodating connection memory without swapping.
- Recommended: Just make consistent across all servers and clients to avoid "packet too large" errors.
- Recommended: Set to
1 if the disk controller has a battery-backed cache.
- Recommended: Up to 4G, but start with 1G
- Recommended: 0 (may mean less than 100% acid-compliance)
- Recommended: O_DIRECT (linux only)
- Recommended: 1 to allow us to reclaim space on disk
- Recommended: tune to be larger than your number of tables
- Recommended: 20M (we still build temp tables in myISAM)
Any memory specified below is allocated per-connection. The maximum number of concurrent connections is
max_connections. The MySQL server should not have to swap even if it reaches
max_connections and MySQL uses all globally available memory. If a particular session or connection would benefit from increases in any of the buffers marked with , these buffers can be increased on a session-by-session basis.