Reduce the memory requirement of heap dump compression

Motivation:

The current heap dump compression preset (9) requires way too much
memory (768 MiB at maximum for dictionary), resulting in OOME in many
cases.

Modifications:

- Use the default preset (6) which uses 8 MiB dictionary.
- Do not fail abruptly even when OOME has been raised.

Result:

More stable heap dump acquisition
This commit is contained in:
Trustin Lee 2015-05-01 11:55:06 +09:00
parent 518119d7c0
commit abaaa75ddc

View File

@ -239,7 +239,7 @@ public final class TestUtils {
});
final byte[] buf = new byte[65536];
final LZMA2Options options = new LZMA2Options(9);
final LZMA2Options options = new LZMA2Options(LZMA2Options.PRESET_DEFAULT);
for (File file: files) {
final String filename = file.toString();
@ -277,8 +277,8 @@ public final class TestUtils {
}
out.close();
in.close();
} catch (Exception e) {
logger.warn("Failed to compress the heap dump: {}", xzFilename, e);
} catch (Throwable t) {
logger.warn("Failed to compress the heap dump: {}", xzFilename, t);
} finally {
if (in != null) {
try {