Bug #106907 Backup::get_total_memory returns incorrect result
Submitted: 4 Apr 2022 16:15 Modified: 23 Sep 2022 21:14
Reporter: Mikael Ronström Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:8.0.23 OS:Any
Assigned to: CPU Architecture:Any

[4 Apr 2022 16:15] Mikael Ronström
Description:
get_total_memory is used to calculate proposed disk write speed for
checkpoints. It assumes that the LDM threads has even usage of
DataMemory which is not necessarily true.

How to repeat:
Run write benchmark and see LCP times increase with ClassicFragmentation=0.

Suggested fix:
Use variable m_pages_allocated in DBTUP to calculate total DataMemory
used by the LDM thread multiplied by the page size.
[5 Apr 2022 6:04] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.

Sincerely,
Umesh
[23 Sep 2022 21:14] Jon Stephens
Documented fix as follows in the NDB 8.0.32 changelog:

    Backup::get_total_memory(), used to calculate proposed disk
    write speeds for checkpoints, wrongly considered DataMemory that
    may not have been used in the calculation of memory used by
    LDMs.

    We fix this by obtaining the total DataMemory used by
    the LDM threads instead. as reported by DBTUP.

Closed.