-
-
Notifications
You must be signed in to change notification settings - Fork 179
JVM Options
On Unix machines JVM options are set via the BOOT_JVM_OPTIONS
environment variable:
export BOOT_JVM_OPTIONS='-Xmx2g -client'
If you're using the boot.exe
executable for Windows you must create a boot.l4j.ini
file
containing your desired options as described in the launch4j documentation.
You can cut down the initial startup time with these options:
-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none
If you're running out of heap space you can add an option to increase the maximum heap space for the JVM:
-Xmx2g
Boot will start multiple Clojure runtimes in Pods. Each one will create a lot of classes, each of which will occupy space in the PermGen (Permanent Generation) of the JVM garbage collector. This means that this space will never be reclaimed when the pod falls out of scope. If you're getting PermGen allocation errors you can try adding these options:
-XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
The
-XX:MaxPermSize
option was removed in Java 1.8, along with PermGen itself.
This is how I have my system configured.
$ uname -mrsv
Darwin 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
$ java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
$ echo $BOOT_JVM_OPTIONS
-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx2g -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none
$ uname -msrv
Linux 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64
$ java -version
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)
$ echo $BOOT_JVM_OPTIONS
-Xmx2g -client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none
You can find other developers and users in the #hoplon
channel on freenode IRC or the boot slack channel.
If you have questions or need help, please visit the Discourse site.
- Environments
- Boot environment
- Java environment
- Tasks
- Built-ins
- Third-party
- Tasks Options
- Filesets
- Target Directory
- Pods
- Boot Exceptions
- Configuring Boot
- Updating Boot
- Setting Clojure version
- JVM Options
- S3 Repositories
- Scripts
- Task Writer's Guide
- Require inside Tasks
- Boot for Leiningen Users
- Boot in Leiningen Projects
- Repl reloading
- Repository Credentials and Deploying
- Snippets
- Troubleshooting
- FAQ
- API docs
- Core
- Pod
- Util