Linux Kernel's Perf Now Supports Zstd-Compressed Trace Recording
Late updates to the Linux kernel's perf subsystem introduces support for compressed recording of traces, which can yield a three to five time reduction in file-size.
The run-time trace compression and auto-decompression is actually a very useful feature in the context of the Perf subsystem with those records easily hitting many GB in size if making a recording of the events for any real length of time.
Particularly on bigger systems this Zstd-compressed recording can be very valuable: "saves storage space on larger
server systems where perf.data size can easily reach several tens or even hundreds of GiBs, especially when profiling with DWARF-based stacks and tracing of context switches."
Compression is activated with the -z switch and there is also a --compression_level= flag supported. This streaming compression of perf ring buffers was sent in via the perf tooling updates and is marked as "RFC" since it's coming in late, so we're still waiting to see if Linus Torvalds decides to pull this support into the Linux 5.2 kernel or will have to wait for Linux 5.3.
The run-time trace compression and auto-decompression is actually a very useful feature in the context of the Perf subsystem with those records easily hitting many GB in size if making a recording of the events for any real length of time.
Particularly on bigger systems this Zstd-compressed recording can be very valuable: "saves storage space on larger
server systems where perf.data size can easily reach several tens or even hundreds of GiBs, especially when profiling with DWARF-based stacks and tracing of context switches."
Compression is activated with the -z switch and there is also a --compression_level= flag supported. This streaming compression of perf ring buffers was sent in via the perf tooling updates and is marked as "RFC" since it's coming in late, so we're still waiting to see if Linus Torvalds decides to pull this support into the Linux 5.2 kernel or will have to wait for Linux 5.3.
Add A Comment