Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5217,6 +5217,7 @@ a|One or more jvm arguments.
m|
|===

For details about the default values of `server.jvm.additional`, see xref:configuration/neo4j-conf.adoc#default-values-server.jvm.additional[The _neo4j.conf_ file -> Default values of `server.jvm.additional`].

[role=label--enterprise-edition]
[[config_server.panic.shutdown_on_panic]]
Expand Down
76 changes: 76 additions & 0 deletions modules/ROOT/pages/configuration/neo4j-conf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,82 @@ The options are set as a string and can vary depending on JVM implementation.
If you want to have good control of the system behavior, it is recommended to set the heap size parameters to the same value to avoid unwanted full garbage collection pauses.
====

Neo4j comes with several pre-defined values of the `server.jvm.additional` setting.
You can find them in the _neo4j.conf_ file.
The table below lists them and explains their roles.

[[default-values-server.jvm.additional]]
.Pre-defined values of `server.jvm.additional`
[cols="1a,1", options="header"]
|===
|Default value
|Note

|`server.jvm.additional=-XX:+UseG1GC`
|G1GC (Garbage-First Garbage Collector) provides a good balance between throughput and tail latency with minimal tuning requirements.

|`server.jvm.additional=-XX:-OmitStackTraceInFastThrow`
|Ensures that common exceptions always have stack traces, allowing effective debugging regardless of logs rotation frequency.

|`server.jvm.additional=-XX:+AlwaysPreTouch`
|Ensures that `initmemory` is not only allocated but also committed to the process before the database starts.
It is recommended to reduce the heap memory if this flag degrades performance.

|`server.jvm.additional=-XX:+UnlockExperimentalVMOptions`
.2+|Trusts that non-static final fields are really final. This allows more optimizations and improves overall performance.
Disable this flag if you use embedded mode or have extensions or dependencies that may use reflection or serialization to change the value of final fields.

|`server.jvm.additional=-XX:+TrustFinalNonStaticFields`

|`server.jvm.additional=-XX:+DisableExplicitGC`
|Disables explicit garbage collection, which is occasionally invoked by the JDK itself.

|`server.jvm.additional=-XX:-RestrictContended`
|Allows Neo4j to use `@Contended` annotation.

|`server.jvm.additional=-Djdk.nio.maxCachedBufferSize=1024`
|Restricts size of cached JDK buffers to 1 KB.

|`server.jvm.additional=-Dio.netty.tryReflectionSetAccessible=true`
|Enables Netty to allocate direct buffers more efficiently by allowing reflection-based access to internal JVM APIs. This bypasses the standard JVM cleanup mechanism.

|`server.jvm.additional=-Dio.netty.leakDetection.level=DISABLED`
|Netty resources leak detection. Possible values are `DISABLED`, `SIMPLE`, `ADVANCED`, and `PARANOID`. Ignores case. For more details refer to the Netty documentation.

|`server.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048`
|Expands Diffie Hellman (DH) key size from default 1024 to 2048 for DH-RSA cipher suites used in server TLS handshakes. This is to protect the server from any potential passive eavesdropping.

|`server.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true`
|Mitigates a DDoS vector.

|`server.jvm.additional=-XX:FlightRecorderOptions=stackdepth=256`
|Increases the default flight recorder stack sampling depth from 64 to 256, to avoid truncating frames when profiling.

|`server.jvm.additional=-XX:+UnlockDiagnosticVMOptions`
.2+|Allows profilers to sample between safepoints. Without this, sampling profilers may produce less accurate results.

|`server.jvm.additional=-XX:+DebugNonSafepoints`

|`server.jvm.additional=--add-opens=java.base/java.nio=ALL-UNNAMED`
.4+|Opens modules for Neo4j to allow internal access.

|`server.jvm.additional=--add-opens=java.base/java.io=ALL-UNNAMED`

|`server.jvm.additional=--add-opens=java.base/sun.nio.ch=ALL-UNNAMED`

|`server.jvm.additional=--add-opens=java.base/java.util.concurrent=ALL-UNNAMED`

|`server.jvm.additional=--enable-native-access=ALL-UNNAMED`
|Enables native memory access.

|`server.jvm.additional=-Dlog4j2.disable.jmx=true`
|Disables logging JMX endpoint.

|`server.jvm.additional=-Dlog4j.layout.jsonTemplate.maxStringLength=32768`
|Increases the JSON log string maximum length.
|===


[[neo4j-conf-current-settings]]
=== List currently active settings

Expand Down