PrizmDoc Viewer v13.22 Release - Updated
Troubleshooting / Memory Consumption Issues
In This Topic
    Memory Consumption Issues
    In This Topic

    Introduction

    This section outlines how to troubleshoot memory consumption issues that may occur with the PrizmDoc Server.

    Java Services use an Unexpected Amount of Memory

    When PrizmDoc Server is under a heavy processing load (specifically when performing redaction and burn-in operations with the documents being processed), it is possible for the PrizmDoc Java backend services to unexpectedly grow memory usage constantly. When this type of unexpected memory consumption occurs, the OOM Killer on Linux could kill the Java backend service (or it could cause Windows to run out of memory).

    There is a dedicated JVM option, "-XX:MaxRAM", to limit the memory usage by the whole Java process. Using this option helps to avoid situations when the Java process grows more and more. It limits unmanaged and managed heaps very effectively for Linux and Windows platforms. This option is especially applicable to applications running in Linux containers.

    Note, if you start using the option "-XX:MaxRAM", the default value for the managed heap size will likely be smaller than recommended. To get the maximum effectiveness and performance for PrizmDoc we recommend setting the Java heap size explicitly. There is the option "-XX:MaxRAMPercentage" to set a relative Java heap size and the parameter "-Xmx" or "-XX:MaxHeapSize". All can be used to limit the managed heap size. For more information read the Java article here.

    Currently there are two settings in the central configuration file, one per Java service: PDF Processing (PDFPS) and Email Processing (EPS) services - "pdfps.jvm.opts" and "eps.jvm.opts" (see Central Configuration. It can be used to tune the default behavior of Java services.

    For the PDF Processing service you can set the following options for JVM to prevent memory consumption issues:

    pdfps.jvm.opts: "-XX:MaxRAM=<value1> -XX:MaxRAMPercentage=<value2> "
    
    

    or

    pdfps.jvm.opts: "-XX:MaxRAM=<value1> -Xmx<value2> "
    
    

    Where the "value1" is the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics. The default value is the maximum amount of available memory to the JVM process. The "value2" in percent (or byte size for Xmx) is the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the -XX:MaxRAM option.

    For example, to reliably limit the PDF Processing service maximal memory usage to 25% of available memory on the instance with 32 GB RAM, you could use:

    pdfps.jvm.opts: "-XX:MaxRAM=8G -XX:MaxRAMPercentage=75.0"
    
    

    or

    pdfps.jvm.opts: "-XX:MaxRAM=8G -Xmx6G"
    
    

    For this case, the whole Java heap will be limited by 8 GB. The managed heap size will be limited to 75% of all available heap size of 8G. In testing, we found that relations of 75% for managed heap and 25 % for unmanaged show a good balance between performance and stability for PrizmDoc Viewer.

    This is not a strict recommendation though; you should determine the exact value by experimenting and observing the impact of PrizmDoc on your environment. Note that this value impacts product performance. A higher value means better performance in the case of intensive operations with PDF files because it allows you to put more documents in memory, work with them at the same time, and not call the garbage collector frequently.