HOME — MySQL — MySQL Cluster Overview
MySQL Cluster Overview
This is a chaotic collection of my MySQL Cluster experience...
Table of Contents
config.ini template
A generic config.ini to start with. It is pretty much what MySQL Cluster experts recommend right now...
my.cnf template
A generic my.cnf to start with MySQL Cluster.
Genral rules and/or experience
MySQL Cluster v5.0
- Avoid ALTER TABLE in MySQL Cluster.
It needs 2 x the RAM of a table (memory is reclaimed only after a node restart).
Do ALTER TABLE <table> ENGINE=MyISAM; instead, then the changes and then alter back to the cluster.
- DROP/TRUCATE reclaims pages.
- UPDATE/INSERT/DELETE causes memory de-fragmentation (same symptoms like a memory leak) ⇒ requires a node restart from time to time.
- For production use is still and only v5.0 (exception CGE)!
MySQL Cluster v5.1
- On disk table ⇒ is stable now.
- Parallel node recovery is not yet implemented in v5.1 ⇒ maybe 5.2/6.0?
- Partitioning does not work from the SQL interface (mysqld) but from the NDB-API.
- No more memory de-fragmentation is done (see above).
- Cluster to MySQL replication is still buggy! But should work.
- Cluster to Cluster replication is stable.
- In Cluster replication:
binlog_cache_size = TimeBetweenGlobalCheckpoints/1000 (default 2000)
(default 32 kbyte) * total traffic (Mbyte/s) (for example 5 Mbyte/s)
= 2000 ms / 1000 ms/s * 5 Mbyte/s
≌ 10 Mybte
|
- pdflush(kswapd) flushes every 5 seconds pages to disk ⇒ Causes troubles with cluster.
The kernel parameters vm.page-cluster and vm.lower-zone-protection (later one does not exist on my maybe non-NUMA system) can help:
# cat /proc/sys/vm/lower_zone_protection
# cat /proc/meminfo
# sysctl vm | egrep 'page-cluster|lower-zone-protection'
|
- For MySQL Cluster on AMD Hardware set NUMA to OFF in BIOS! ⇒ Preferred hardware: Intel!
- File system: Use ext3 or XFS.
Literature
HOME