The recommended amount of allocated heap-size for the HiveMQ process is 50% of the available memory up to a maximum of 31GB.
See the HiveMQ User Guide for details.
We recommend allocating identical values for initial (-Xms) and maximum (-Xmx) heap allocation.