Atomic-Pipe

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

  Practical guidance

      * If your messages are routinely larger than PIPE_BUF (~4 KB),
      enabling compression is almost always a throughput win, not just a
      bandwidth win.

      * For mixed JSON-like payloads, level 1 or the default level 3 are
      good starting points. Level -3 is the throughput champion when CPU is
      precious and some ratio can be sacrificed.

      * Levels above ~7 buy single-digit-percent ratio gains for multi-x
      CPU cost; in an IPC path they are rarely worth it.

      * A custom dictionary ("Custom dictionary") helps most when payloads
      are small and share structure -- e.g. identical JSON keys across
      every message.

    These results depend heavily on payload entropy and CPU. Re-run
    bench/zstd_compression.pl against a representative slice of your own
    data before committing to a level.

README.md  view on Meta::CPAN

    calling ["resize"](#resize) with a larger size will not rescue an uncompressed
    large-message workload.

### Practical guidance

- If your messages are routinely larger than `PIPE_BUF` (~4 KB), enabling
compression is almost always a throughput win, not just a bandwidth win.
- For mixed JSON-like payloads, **level 1** or the default **level 3** are good
starting points. Level -3 is the throughput champion when CPU is precious and
some ratio can be sacrificed.
- Levels above ~7 buy single-digit-percent ratio gains for multi-x CPU cost; in
an IPC path they are rarely worth it.
- A custom dictionary (["Custom dictionary"](#custom-dictionary)) helps most when payloads are
small and share structure -- e.g. identical JSON keys across every message.

These results depend heavily on payload entropy and CPU. Re-run
`bench/zstd_compression.pl` against a representative slice of your own data
before committing to a level.

# METHODS

lib/Atomic/Pipe.pm  view on Meta::CPAN

compression is almost always a throughput win, not just a bandwidth win.

=item *

For mixed JSON-like payloads, B<level 1> or the default B<level 3> are good
starting points. Level -3 is the throughput champion when CPU is precious and
some ratio can be sacrificed.

=item *

Levels above ~7 buy single-digit-percent ratio gains for multi-x CPU cost; in
an IPC path they are rarely worth it.

=item *

A custom dictionary (L</"Custom dictionary">) helps most when payloads are
small and share structure -- e.g. identical JSON keys across every message.

=back

These results depend heavily on payload entropy and CPU. Re-run



( run in 1.541 second using v1.01-cache-2.11-cpan-7fcb06a456a )