Heap analysis for gzip compressed files

Updated at:

Introduction

ATP supports heap dump files in gzip compression format in addition to binary heap dump files. The gzip format results in smaller files and faster uploads, although the analysis process is slightly slower.

Procedure

1. Generate a heap dump file in gzip compression format

  • Method 1:

    In JDK 16 and later, you can use jmap to directly generate a heap dump file in gzip compression format. For more information, see https://bugs.openjdk.org/browse/JDK-8256451. Use the following command:

    $ jmap -dump:live,format=b,file=heap.bin,gz=9 <pid>
  • Method 2:

    You can generate a heap dump file using a standard method. For more information, see Preparations. Then, compress the file using the gzip command:

    $ gzip -c heapdump.bin > heapdump.bin.gz

2. Upload to ATP and analyze

You can upload the gzip-compressed heap dump file to ATP for analysis from a source such as a URL or OSS.