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:
parent
b50f2d5294
commit
3f5ce7c1d2
@ -239,7 +239,7 @@ public final class TestUtils {
|
|||||||
});
|
});
|
||||||
|
|
||||||
final byte[] buf = new byte[65536];
|
final byte[] buf = new byte[65536];
|
||||||
final LZMA2Options options = new LZMA2Options(9);
|
final LZMA2Options options = new LZMA2Options(LZMA2Options.PRESET_DEFAULT);
|
||||||
|
|
||||||
for (File file: files) {
|
for (File file: files) {
|
||||||
final String filename = file.toString();
|
final String filename = file.toString();
|
||||||
@ -277,8 +277,8 @@ public final class TestUtils {
|
|||||||
}
|
}
|
||||||
out.close();
|
out.close();
|
||||||
in.close();
|
in.close();
|
||||||
} catch (Exception e) {
|
} catch (Throwable t) {
|
||||||
logger.warn("Failed to compress the heap dump: {}", xzFilename, e);
|
logger.warn("Failed to compress the heap dump: {}", xzFilename, t);
|
||||||
} finally {
|
} finally {
|
||||||
if (in != null) {
|
if (in != null) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user