Bug #102505 hw_memory in kBytes instead of in bytes on Linux
Submitted: 6 Feb 2021 18:23 Modified: 17 Feb 2021 17:39
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:Ubuntu
Assigned to: CPU Architecture:Any

[6 Feb 2021 18:23] Mikael Ronström
Description:
The NdbHW.cpp calculates the available memory on Linux
using /proc/meminfo. /proc/meminfo reports memory size
in kBytes, however NdbHW.cpp wants the memory size in
bytes.

How to repeat:
Read code

Suggested fix:
Multiply hw_memory_size on Linux by 1024.
[7 Feb 2021 6:47] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.

Sincerely,
Umesh
[17 Feb 2021 17:39] Jon Stephens
Documented fix as follows in the NDB 8.0.24 changelog:

    On Linux systems, NDB interpreted memory sizes obtained from
    /proc/meminfo as being supplied in bytes rather than in 
    kilobytes.

Closed.

Tack för hjälpen!