jtpio/jupyterlab-system-monitor

Memory units >MB ignored

jhgoebbert opened this issue · 2 comments

On a systems with large amount of memory (512-1024GB) we still see MB used as the memory unit.
I wonder if that could be the case because JavaScript cannot hold integers as large as

    TB: 1099511627776,
    PB: 1125899906842624,

used here https://github.com/jtpio/jupyterlab-system-monitor/blob/main/packages/system-monitor-base/src/model.ts#L246

No, the max. integer in JavaScript is by far larger: 9007199254740991 (which is larger than number of bytes in PB)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

This can not be the reason for MB showing up instead of GB, TB.

Ok, I realized that the unit is defined by the consumed memory and not by the total memory of the system.
182 / 515580 MB must therefore be of unit MB and not GB