Keywords: OpenJDK | MaxPermSize | Java 8 | IntelliJ IDEA | VM Options
Abstract: This article provides an in-depth analysis of the OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m, commonly encountered when launching IDEs like IntelliJ IDEA. It explains the cause, noting that the MaxPermSize parameter was removed in Java 8, leading the JVM to ignore this setting. The solution involves editing the IDE's VM options configuration file to remove the parameter, thereby eliminating the warning. The article also assesses the impact, emphasizing that this is merely an informational message with no functional issues. Step-by-step instructions for Linux and Windows systems are included, along with best practices for optimizing Java application configurations.
Background and Cause Analysis
When launching integrated development environments (IDEs) such as IntelliJ IDEA, Android Studio, or PHPStorm, developers may encounter the warning: OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0. This warning indicates that the Java Virtual Machine (JVM) is ignoring the MaxPermSize parameter because it was officially removed starting with Java 8. In earlier Java versions, MaxPermSize was used to set the maximum memory size for the Permanent Generation, which stored static data like class metadata and constant pools. However, with the release of Java 8, the Permanent Generation was replaced by Metaspace, which uses native memory management for improved flexibility and performance. Consequently, any attempt to set MaxPermSize is ignored by the JVM, triggering this warning.
Solution and Operational Steps
To resolve this warning, remove the MaxPermSize parameter from the IDE's VM options configuration file. For IntelliJ IDEA, this file is typically located at {IntelliJ installation directory}/bin/idea64.exe.vmoptions (on Windows) or a similar path (on Linux, such as in files related to ./phpstorm.sh). Developers should edit this file, locate the line containing -XX:MaxPermSize=350m, and delete or comment it out. For example, on Linux, use a text editor like nano or vim to open the file:
sudo nano /opt/idea/bin/idea64.vmoptions
Then, remove or comment the relevant line:
# -XX:MaxPermSize=350m
After saving the file, restart the IDE, and the warning should no longer appear. Note that this action only removes an invalid parameter and does not affect the IDE's functionality or performance, as MaxPermSize has no effect in Java 8 and later versions.
Impact Assessment and Best Practices
This warning is informational, indicating that the JVM is ignoring a deprecated parameter, and it does not cause application crashes or functional issues. In terms of performance, since Metaspace replaces the Permanent Generation, developers do not need to manually set MaxPermSize; the JVM automatically manages Metaspace memory. However, if memory issues arise, consider adjusting parameters like -XX:MetaspaceSize and -XX:MaxMetaspaceSize to optimize Metaspace configuration. For example, add the following to the vmoptions file:
-XX:MetaspaceSize=256m
-XX:MaxMetaspaceSize=512m
Additionally, it is recommended to regularly update Java versions and IDEs to benefit from the latest performance improvements and security patches. For novice developers, understanding the evolution of JVM memory management mechanisms aids in better debugging and optimization of Java applications.