Overview
ob_java_opts is used to set JVM startup parameters for Java execution.
Privilege requirements
Query parameters
The
SHOW PARAMETERSstatement or theGV$OB_PARAMETERSview can be used by both the sys tenant and all user tenants to query this parameter.Modify parameters
Only the sys tenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | STRING |
| Default Value | Empty string |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No. The setting takes effect immediately.
NoteJVM startup parameters are part of the basic runtime environment configuration, and their loading mechanism follows the Java Virtual Machine specification: |
| Required |
|
Configuration example
In the SYS tenant, use the following command to enable or configure it.
ALTER SYSTEM SET ob_java_opts="-Xmx2048m -Xmn2048m -XX:-CriticalJNINatives -Djdk.lang.processReaperUseDefaultStackSize=true -Xrs -XX:+HeapDumpOnOutOfMemoryError -Xloggc:/home/admin/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/admin/heapdumps/ -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+TieredCompilation -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses ";
Notice
Ensure that the /home/observer/heapdumps and /home/observer directories exist. If these directories do not exist, you must create them manually using the user that deploys OBServer. Note that the paths provided here are examples only; you can specify other paths based on your actual situation.