Skip to content

Commit b8e8cbb

Browse files
committed
Fix default memory calculation to binary Megabytes.
For RAM sizes of 64 GB the previous calculation was hitting the range just above 32 GB, which is unfortunate due to uncompressed object pointers being inefficient in the range from 32 GB to around 40-50 GB compared to compressed OOP in the range below 32 GB. Also, JVM errors have been observed for those values.
1 parent 0274209 commit b8e8cbb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

BimServerJar/src/org/bimserver/starter/JarSettingsProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class JarSettingsProperties {
2929
public JarSettingsProperties() {
3030
com.sun.management.OperatingSystemMXBean os = (com.sun.management.OperatingSystemMXBean) java.lang.management.ManagementFactory.getOperatingSystemMXBean();
3131
long physicalMemorySize = os.getTotalPhysicalMemorySize();
32-
heapsize = Math.min(1024 * 1024 * 1024, physicalMemorySize / 2000000) + "m";
32+
heapsize = Math.min(1024 * 1024 * 1024, physicalMemorySize / 2 / 1024 / 1024) + "m";
3333
}
3434

3535
public static JarSettingsProperties readFromFile() {

0 commit comments

Comments
 (0)