apache/cassandra · warning
32bit JVM detected. It is recommended to run Cassandra on a
Error message
32bit JVM detected. It is recommended to run Cassandra on a 64bit JVM for better performance.
What it means
At startup, Cassandra's checkJVMArchitecture startup check warns when the JVM does not have a large address space, i.e. a 32-bit JVM is running. Cassandra relies on memory-mapped SSTables (mmap), which a 32-bit address space severely limits, so 64-bit is strongly recommended. This is a logged warning, not a thrown exception; startup continues.
Source
Thrown at src/java/org/apache/cassandra/service/StartupChecks.java:599
}
};
public static final StartupCheck inspectJvmOptions = new StartupCheck()
{
@Override
public String name()
{
return "jvm_options";
}
@Override
public void execute(StartupChecksConfiguration configuration)
{
if (configuration.isDisabled(name()))
return;
// log warnings for different kinds of sub-optimal JVMs. tldr use 64-bit Oracle >= 1.6u32
if (!DatabaseDescriptor.hasLargeAddressSpace())
logger.warn("32bit JVM detected. It is recommended to run Cassandra on a 64bit JVM for better performance.");
String javaVmName = JAVA_VM_NAME.getString();
if (!(javaVmName.contains("HotSpot") || javaVmName.contains("OpenJDK")))
{
logger.warn("Non-Oracle JVM detected. Some features, such as immediate unmap of compacted SSTables, may not work as intended");
}
else
{
checkOutOfMemoryHandling();
}
}
/**
* Checks that the JVM is configured to handle OutOfMemoryError
*/
private void checkOutOfMemoryHandling()
{
if (JavaUtils.supportExitOnOutOfMemory(JAVA_VERSION.getString()))View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Install and run a 64-bit JVM (verify with `java -version` showing 64-Bit Server VM).
- Reinstall the OS/JRE as amd64/x86_64 if the OS itself is 32-bit.
- Set JAVA_HOME to the 64-bit JDK used by the Cassandra startup scripts.
- Acknowledge and ignore the warning only for throwaway/test environments.
Example fix
// before (32-bit JVM) java version "1.8.0_392" Java HotSpot(TM) Client VM // after java version "1.8.0_392" Java HotSpot(TM) 64-Bit Server VM
Defensive patterns
Strategy: validation
Validate before calling
String arch = System.getProperty("os.arch");
String vmBits = System.getProperty("sun.arch.data.model", System.getProperty("com.ibm.vm.bitmode", ""));
if (!"64".equals(vmBits) || arch.contains("86") && !arch.contains("64")) {
System.out.println("32-bit JVM detected; install a 64-bit JDK before starting Cassandra.");
} Prevention
- Always provision 64-bit OS + JDK images for Cassandra nodes.
- Add a pre-start script asserting `java -version` output contains '64-Bit'.
- Pin JAVA_HOME in cassandra-env.sh to the 64-bit JDK path.
- Check sun.arch.data.model in CI before deployment.
When it happens
Trigger: Running Cassandra on a 32-bit JVM so that DatabaseDescriptor.hasLargeAddressSpace() returns false during the startup checks phase (StartupChecks.execute).
Common situations: Deploying on old 32-bit OS/JVM images, embedded or minimal containers built with 32-bit Java, or accidentally installing the i386 JRE on a 64-bit host.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- <garbage collection summary>
- Non-Oracle JVM detected. Some features, such as immediate u
- The JVM is not configured to stop on OutOfMemoryError which
- The JVM is not configured to stop on OutOfMemoryError which
- Cassandra server running in degraded mode.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/b7ebe512b17ed0a8.
Report an issue: GitHub.