MySQL Cluster Local Checkpoint (LCP) and Global Checkpoint (GCP)
Thu, 2010-07-29 16:29 —
Shinguz
MySQL Cluster is mainly an in-memory database. Nevertheless it requires a good I/O system for writing various different information to disk.
The information MySQL Cluster writes to disk are the:
- Global Checkpoints (GCP) which are the transactions.
- Local Checkpoints (LCP) which is a dirty image of the data.
- Backup.
In the following schema (a 2-node Cluster) you can see what is related to each other:

Please find here the meaning of each parameter:


Comments
1. Why shall 2 LCPs be kept?
Why shall 2 LCPs be kept?
Hi Baomin Wang,
I come back with an answer later…
MySQL Cluster is mainly an In-Memory-Database. In a typical set-up we do not have such things like tablespaces or data files as in other MySQL Storage engines. Just the LCP- and GCP-files (and some others files related to the MySQL Cluster). MySQL Cluster also knows disk based data (which is a less common set-up). There you have indeed such tablespace and UNDO log files. But I did not consider it in this picture because it is a less often used set-up.
As written above, an LCP is a dirty image of the data. So it is not a backup at all. But it writes continuously the whole image of your data to disk.
I hope, this helps?
Regards, Oli
Why shall 2 LCPs be kept?
Hi Baomin Wang,
After some thinking an talking to some colleagues I found the answer:
When MySQL Cluster writes LCP’s it first writes LCP 1, then LCP 2. After LCP 2 it OVERwrites the LCP 1 again and then overwrites LCP 2 again and so on…
This assures that we have always ONE complete and good LCP from where we can recover in case of a complete Cluster crash.
When we would have only 1 LCP file this cannot be assured.
Regards, Oli