Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^7: Looking for alternative for IPC::Shareable (or increase size)

by marioroy (Prior)
on Aug 10, 2020 at 05:20 UTC ( [id://11120531]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Looking for alternative for IPC::Shareable (or increase size)
in thread Looking for alternative for IPC::Shareable (or increase size)

Hi, jcb

I updated the examples to output the frozen length. MCE::Channel does not enable compression when using Sereal.

> 1 billion chars (2^30 1073741824) Storable runtime : 2.106 seconds memory : 4,102 megabytes Sereal runtime : 1.549 seconds memory : 3,078 megabytes Sereal with compression enabled runtime : 2.170 seconds memory : 2,104 megabytes

Thank you, DomX and jcb. ++ PerlMonks for this forum.

Humble regards, Mario

  • Comment on Re^7: Looking for alternative for IPC::Shareable (or increase size)
  • Download Code

Replies are listed 'Best First'.
Re^8: Looking for alternative for IPC::Shareable (or increase size)
by jcb (Parson) on Aug 11, 2020 at 02:08 UTC

    It seems obvious that the version using Storable is holding an extra copy of the data somewhere compared to the version using Sereal. The compression in Sereal is working reasonably well, reducing 1G of highly compressible input to about 52M stored.

    I still wonder if there really is a meaningful difference here — it should be equally possible to compress a frozen Storable image using any of the Compress:: modules to save memory or disk or network time, although it does appear that Sereal may have a slightly more efficient implementation (avoiding that extra copy of the data) that could be considered for adaptation to improve Storable as well. Maybe submit an enhancement request at the bug tracker for Storable?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120531]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-19 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found