Finding out the memory block size

7.1 LPAR mode z/VM guest

On an IBM Z® mainframe, memory is provided to Linux® as memory blocks of equal size.

Procedure

  • Use the lsmem command to find out the size of your memory blocks.
    For example:
    # lsmem
    RANGE                                  SIZE   STATE REMOVABLE BLOCK
    0x0000000000000000-0x000000006fffffff  1.8G  online       yes  0-13
    0x0000000070000000-0x00000000ffffffff  2.3G offline           14-31
    
    Memory block size:                128M
    Total online memory:              1.8G
    Total offline memory:             2.3G
    Memmap on memory parameter:        yes
    
    In the example, the block size is 128 MB.
  • Alternatively, you can read /sys/devices/system/memory/block_size_bytes. This sysfs attribute contains the block size in byte in hexadecimal notation.
    For example:
    # cat /sys/devices/system/memory/block_size_bytes
    8000000

    This hexadecimal value corresponds to 128 MB.