Skip to content

Instantly share code, notes, and snippets.

@Jire
Last active September 29, 2025 09:11
Show Gist options
  • Save Jire/6b56bc7862e68d263dfc9e699a068385 to your computer and use it in GitHub Desktop.
Save Jire/6b56bc7862e68d263dfc9e699a068385 to your computer and use it in GitHub Desktop.
Optimized Jetbrains IDE JVM options
### PLEASE READ ###
# These settings were tuned for my system, but they should work for most systems well.
# IMPORTANT: If you're not using Linux, remove the "Linux Only" flags.
#
# CPU: i7 14700K, P-cores locked to 5.5GHz, E-cores locked to 4.3GHz
# RAM: 128GB DDR4 3200MHz CL-11 (4x 32GB DIMMs)
# Drive: Samsung 990 Pro 2TB
# File system: XFS with swap disabled
# OS: Arch Linux x86_64
# Kernel: Linux 6.16.8-zen3-1-zen (Linux Zen)
# DE: GNOME 49.0
# WM: Mutter (Wayland)
### Memory ###
# I have 128GB RAM, divide these respectively based on your RAM vs mine.
# e.g. if you have 32GB RAM, divide these values by 4.
-Xms4096m
-Xmx24576m
-XX:ReservedCodeCacheSize=2048m
-XX:+AlwaysPreTouch
### Garbage Collector ###
-XX:+UseZGC
-XX:+ZGenerational
-XX:+UseDynamicNumberOfGCThreads
-XX:+UseStringDeduplication
### File Watcher / File System Optimizations ###
-Didea.fs.trust.use.native=true
-Didea.io.use.nio2=true
### Disable Attaching ###
# Don't use this if you need to debug/profile IntelliJ IDE itself.
-XX:+DisableAttachMechanism
### Prefer IPv6 ###
# Don't use these if your connection isn't IPv6-capable.
-Djava.net.preferIPv4Stack=false
-Djava.net.preferIPv6Addresses=true
### Native Wayland on Linux ### (Linux only)
# Don't use these if you're not using Wayland compositor on Linux.
-Dawt.toolkit.name=WLToolkit
-Dsun.java2d.opengl=true
-Dsun.java2d.vsync=false
### Large Pages ### (Linux only)
-XX:+UseLargePages
# PLEASE NOTE: You MUST configure your system to use this effectively:
#
# `ulimit -l` needs to be unlimited
#
# And you should disable THP (transparent huge pages) with the kernel options:
# `transparent_hugepage=never`
# `transparent_hugepage=defrag=never`
#
# And enable pre-allocated large pages with the kernel options:
# `default_hugepagesz=2M`
# `hugepagesz=2M`
# (divide the hugepages value by the same ratio for RAM, e.g. if 32GB RAM use 4096 instead)
# `hugepages=16384`
#
# And allow your user/process to lock pages, which can be done
# by creating a file `/etc/security/limits.d/99-memlock.conf` with contents:
# * soft memlock unlimited
# * hard memlock unlimited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment