Page MenuHomeFreeBSD

Add an option to create XZ-compressed cores
AcceptedPublic

Authored by jtl on Apr 13 2017, 6:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 8:06 AM
Unknown Object (File)
Dec 20 2023, 8:05 AM
Unknown Object (File)
Nov 20 2023, 7:15 PM
Unknown Object (File)
Nov 14 2023, 6:24 PM
Unknown Object (File)
Aug 9 2023, 2:42 AM
Unknown Object (File)
Jul 19 2023, 1:47 AM
Unknown Object (File)
May 29 2023, 11:26 AM
Unknown Object (File)
Dec 5 2022, 11:15 PM
Subscribers

Details

Reviewers
glebius
emaste
delphij
bcr
Group Reviewers
manpages
Summary

Add an option to use multi-threaded XZ compression on kernel cores. On a
machine with a large amount of memory and a large number of CPUs or CPU
cores, this can significantly reduce the amount of time it takes to
create a kernel core.

Obtained from: Netflix

Test Plan

This has already been in use at Netflix for a while. It seems to perform reliably there.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8720
Build 9059: arc lint + arc unit

Event Timeline

Looks good to me (in general).

Have you considered piping the data to a separate xz(1) process (probably also other compressors) instead of incorporating a wrapper around the library though? Or is this intentional for e.g. performance reasons?

sbin/savecore/savecore_xz.c
802

Personally I'd prefer calloc(1, sizeof(struct xz_cookie)).

bcr added a subscriber: bcr.

OK from manpages. Don't forget to bump the document date when you're committing it.

This revision is now accepted and ready to land.Apr 15 2017, 5:42 PM

After the latest core-compression patches (which actually can compress the core dump prior to writing it to swap), is there still a need for this patch? I seem to recall that someone said "yes", but I'd like to have confirmation before adding yet another way to save coredumps.

In D10390#310378, @jtl wrote:

After the latest core-compression patches (which actually can compress the core dump prior to writing it to swap), is there still a need for this patch? I seem to recall that someone said "yes", but I'd like to have confirmation before adding yet another way to save coredumps.

I suspect not - the kernel can write out zstd-compressed vmcores now. That's much faster than gzip and also speeds up recovery since savecore has to do less I/O to read the vmcore out of the dump device.