- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Running applications with the profiler
- Local profiling
- Remote profiling
- Startup options
- Attaching profiler agent to a running JVM
- Profiling overhead: how to reduce or avoid
- Enabling profiling manually
- About JVMTI
- Connect to profiled application
- Troubleshoot connection problems
- Solving performance problems
- CPU profiling
- Threads
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- IDE integration
- Time measurement (CPU time, wall time)
- Filters
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler Java API
- Profiler HTTP API
- Command line tool to control profiling
- Settings
- FAQ: How to profile in my scenario?
Startup options
What are the startup options?
The startup options allow to customize some aspects of profiling. These options can be configured when you start the profiled application.
When should I specify the startup options?
In most cases, you do not have to specify any of these options, because default behavior suits fine in most cases.
How can I specify the startup options?
These options can be configured when you start the profiled application:
- from the IDE plug-in UI, if you start the profiled application from IDE
- local or remote Java EE server integration wizard, if you profile a stand-alone Java EE server
- with the help of agent command line parameter.
The options are comma-separated if you specify more than one option.
Environment variable substitution
It is possible to use environment variables in the startup options
with the ${VARIABLE}
syntax.
Substitutions are helpful for options which are not known until execution time.
If an environment variable is not set, it will be replaced with an empty string.
For example, if environment variable SNAPSHOT_DIR
is set to /tmp/snapshots
,
then startup option dir=${SNAPSHOT_DIR}
evaluates to
dir=/tmp/snapshots
.
Description of the startup options
Networking options |
|
or
|
Specify the port that the profiler agent listens on for communication with the Profiler. By default, the port is chosen automatically: if port 10001 is free, it is used; otherwise, if port 10002 is free, it is used etc. If no port in the range 10001..10010 is free, an arbitrary free port is used. If port range is specified, profiler will choose first free port in the range. |
listen= <option>
|
Specify the profiler agent connectivity option.
|
ssl_certificate= <path to SSL certificate>
|
File with the SSL certificate in the PEM format. If intermediate certificates should be specified in addition to a primary certificate, they should be specified in the same file in the following order: the primary certificate comes first, then the intermediate certificates.
If the |
ssl_certificate_key= <path to secret key>
|
File with the secret key in the PEM format. |
ssl_password_file= <path to password file>
|
If the secret key |
Main optionsThese options can be switched on startup only, i.e. corresponding behavior cannot be altered during runtime. |
|
delay= <milliseconds>
|
Postpone start of telemetry collection. This option is mostly intended to prevent startup issues of some Java EE servers. By default, lightweight telemetry is collected right from the start of the profiled application. The telemetry is collected via so called platform MBeans ("managed beans") - the components for monitoring and managing the JVM. Some Java EE servers install their own implementations of standard MBeans. In earliest stages of the server startup the MBeans can not be functional because they depend on other components of the server (such as custom logging) which have not initialized so far. Accessing such MBeans in earliest stages can cause the server startup failure (e.g. with ClassNotFoundException).
The
The Java EE integration wizard by default uses If the 10 seconds delay is not enough in your particular case, try a bigger value. |
telemetrylimit= <hours> |
The telemetry information is remembered in a circular buffer in the profiler agent memory. This allows you to connect to a profiled application on demand and discover how the application behaved in the past. By default, the telemetry buffer is limited to store approximately 1 hour of recent telemetry data.
With the help of the Do not use unnecessarily long buffers Extending the telemetry buffer will allocate additional amount of memory in the profiled application's address space. That is especially important for 32-bit processes because their address space is limited. Also, the longer the buffer, the more time it takes to retrieve the telemetry information from the profiler agent when you connect to a long running profiled application. |
telemetryperiod= <milliseconds> |
Specify how often telemetry information is obtained. By default, the period is 1 second (1000 milliseconds). Note that setting smaller period can add overhead. |
probetablelengthlimit= <rows> |
Probes: limit the number of rows to be stored by the profiler agent per table. Read more... |
deadthreadlimit= <threads> |
Specify the number of recently finished threads for which
profiling results are kept. The default value is 50.
Profiling results for the finished threads beyond this limit are merged to
|
onexit=memory |
Always capture a memory snapshot on profiled application exit. If this option is not specified, the memory snapshot will be captured on exit if object allocation recording in classic or heap sampling modes is running at that moment. |
onexit=snapshot |
Always capture a performance snapshot on profiled application exit. If this option is not specified, the performance snapshot will be captured on exit if CPU profiling, monitor profiling or object allocation recording in object counting mode is running at that moment. This option is automatically added when the profiled application is started from the IDE. |
onexit=hprof |
Capture a HPROF memory snapshot on profiled application exit. |
dir= <directory for snapshots>
|
Specify custom snapshot directory for the particular profiled application |
logdir= <directory> |
By default, the profiler agent log file is Use this option to create logs in different directory.
For example, it can be useful when profiling applications running as a Windows service.
They usually run under special user,
thus the logs are located in that special user's home directory.
For example, it can be
Instead, make the logs created in an arbitrary easily accessible directory,
e.g. |
tmpdir= <directory> |
Specify alternate directory for temporary files created by the profiler agent:
By default, the profiler agent creates the temporary files in the default temporary directory. |
united_log |
Store logs from several runs of the same application
as a series of log files named This mode may simplify log maintenance and cleanup when profiling applications such as servers.
Session name is the presentable name of the application;
see the startup option
Running number starts with 1.
If the first log file <session name> Note: the oldest log files are not automatically removed. If you need to clean them up, do it manually or write a script. |
sessionname= <name> |
Specify alternate presentable name of the profiled application used in:
If this option is not specified, the session name is automatically chosen for particular application basing on its main jar file name, or its main class name, or the custom executable name, or on the run configuration name when profiling from within IDE.
The default, automatically generated session name can be specified via
For example, to append the host name to the default session name, use
|
snapshot_name_format= <format> |
Specify alternate rule to compose snapshot file names. Available macros:
The default format is Characters not allowed in file names, if specified, will be replaced with '-'. |
sampling_settings_path= <file path> |
Specify a custom location of the CPU sampling settings configuration file.
If this option is not specified,
the settings are read from
|
tracing_settings_path= <file path> |
Specify a custom location of the CPU tracing settings configuration file.
If this option is not specified,
the settings are read from
|
Control which profiling modes are turned on right from the startNote that you do not have to perform measuring right from the start. Instead, in many cases it's better to start or stop measuring at a later moment - from the UI or by using the Profiler API. |
|
sampling |
Immediately start CPU profiling in the sampling mode. Note that you do not have to profile CPU right from the start; instead, in many cases it's better to start or stop measuring at a later moment - from the UI or by using the Profiler API. |
async_sampling_cpu |
Immediately start CPU profiling in the asynchronous CPU sampling mode.
Note that you do not have to profile CPU right from the start;
instead, in many cases it's better to start or stop measuring at a later moment -
from the UI or by using the Profiler API.
This option cannot be used in combination with |
async_sampling_periodic |
Immediately start CPU profiling in the asynchronous periodic sampling mode.
Note that you do not have to profile CPU right from the start;
instead, in many cases it's better to start or stop measuring at a later moment -
from the UI or by using the Profiler API.
This option cannot be used in combination with |
tracing |
Immediately start CPU profiling in the tracing mode.
Note that you do not have to profile CPU right from the start;
instead, in many cases it's better to start or stop measuring at a later moment -
from the UI or by using the Profiler API.
This option cannot be used in combination with |
call_counting |
Immediately start CPU profiling in the call counting mode.
Note that you do not have to profile CPU right from the start;
instead, in many cases it's better to start or stop measuring at a later moment -
from the UI or by using the Profiler API.
This option cannot be used in combination with |
alloceach= <N> |
Immediately start object allocation recording, recording each N-th allocation.
This option can be used in combination with
(Since 2016.02) To record only those objects whose size exceeds the threshold set with Note that you do not have to record allocations right from the start; instead, you can start or stop recording later from the profiler UI or using Profiler API. |
allocsizelimit= <size in bytes> |
Immediately start object allocation recording, recording allocation of all objects with size bigger than or equal to the specified value.
This option can be used in combination with Note that you do not have to record allocations right from the start; instead, you can start or stop recording later from the profiler UI or using Profiler API. |
allocsampled |
Use sampled object allocation recording.
This option influences only object allocation recording started
|
alloc_object_counting |
Immediately start object allocation recording in the object counting mode.
This option is mutually exclusive with Note that you do not have to record allocations right from the start; instead, you can start or stop recording later from the profiler UI or using Profiler API. |
monitors |
Immediately start monitor profiling. Note that you do not have to profile monitor usage right from the start; instead, you can start or stop recording later from the profiler UI or using Profiler API. |
usedmem= <percent> |
Automatically capture a memory snapshot when used heap memory reaches the threshold. Note: this option just adds corresponding trigger on startup. Use triggers directly for a more sophisticated functionality. |
usedmemhprof= <percent> |
Automatically capture a HPROF snapshot when used heap memory reaches the threshold. Note: this option just adds corresponding trigger on startup. Use triggers directly for a more sophisticated functionality. |
periodicperf= <period in seconds> |
Periodically capture performance snapshots. Note: this option just adds corresponding trigger on startup. Use triggers directly for a more sophisticated functionality. |
periodicmem= <period in seconds> |
Periodically capture memory snapshots in the profiler's format (*.snapshot). Note: this option just adds corresponding trigger on startup. Use triggers directly for a more sophisticated functionality. |
periodichprof= <period in seconds> |
Periodically capture HPROF snapshots. Note: this option just adds corresponding trigger on startup. Use triggers directly for a more sophisticated functionality. |
disablestacktelemetry |
Do not collect thread stack and status information shown in Thread view as well as in other telemetry views. This information can be very useful because it allows you to connect to the profiled application on demand and discover how the application behaved in the past. In most cases, there is no significant overhead of collecting this information. However, it makes sense to stop it in production Java EE servers in order to ensure minimum profiling overhead. See also: Profiling overhead: how to reduce or avoid. |
exceptions=on |
Enable exception events in the JVM and immediately start the exception profiling. This is the default mode on Oracle JDK and OpenJDK HotSpot, i.e. non-IBM JVMs. See also: Profiling overhead: how to reduce or avoid. |
exceptions=off |
Enable exception events in the JVM but do not immediately start the exception profiling that can instead be started later in runtime. See also: Profiling overhead: how to reduce or avoid. |
exceptions=disable |
Fully disable exception events in the JVM to totally eliminate corresponding overhead. The exception profiling will not be available. This is the default mode on IBM JVMs because the overhead is significant. See also: Profiling overhead: how to reduce or avoid. |
disableoomedumper |
Disable on OutOfMemoryError snapshots. Note that enabling on OutOfMemoryError snapshots adds absolutely no overhead. If OutOfMemoryError happens, memory snapshot is written to disk for further analysis. You may want to disable the snapshots in some very special situations, e.g. if you profile an application with a huge heap, for which capturing the snapshot may take significant resources (time and/or disk space), but do not plan to perform its memory analysis. |
|
Specify which probes should be registered on startup. Read more... |
probeclasspath= <classpath> |
Specify where to find probe class(es) which are registered by class name. Read more... |
probebootclasspath= <classpath> |
Specify where to find probe class(es) which are registered by class name. Read more... |
triggers= <file path> |
Specify the file with description of the triggers to be applied from startup.
If this option is not specified, the trigger description is read from
By default, that file does not exist, thus no triggers are applied. |
Optimization and troubleshooting optionsReduce profiling overhead or troubleshoot stability issues by disabling some profiling capabilities. These options can be switched on startup only, i.e. corresponding behavior cannot be altered during runtime. See also: Profiling overhead: how to reduce or avoid. |
|
disablealloc |
Do not instrument bytecode with instructions needed for object allocation recording.
See also: Profiling overhead: how to reduce or avoid. |
disable_heap_sampling |
Use bytecode instrumentation for object allocation recording
instead of the heap sampling event introduced in Java 11.
If |
disabletracing |
Do not instrument bytecode with instructions needed for CPU tracing. Both CPU tracing and call counting will not be available. See also: Profiling overhead: how to reduce or avoid. |
disable_async_sampling |
Disables asynchronous sampling capabilities. |
disablenatives |
Do not wrap native methods for bytecode instrumentation. When this option is specified, native methods will not be shown in CPU tracing results and in events recorded with probes if they depend on native method invocations. Try this option as a workaround if you experience crashes of an IBM JVM. |
disableall |
Disable several capabilities at once:
|
Miscellaneous |
|
help |
Print brief description of startup options. |