http://qs321.pair.com?node_id=127039


in reply to IPC::SharedCache slower than reading off disk

Linux like most modern OSes, uses spare RAM to cache disk accesses. Thus, when you use retrieve you are probably not actually going off the disk. Also, IPC::SharedCache uses Storable to put the data structure into its shared memory segment(s) (I believe it divides the hash between multiple segments, but I'm not entirely sure.) This is because it's very hard to move perl's internal representation of these data structures into the shared memory while having it work on all processes and not having perl move it out of that space.) Also, IPC::SharedCache does synchronization to make sure that one does not write the data structure while another's reading it and get stale data, which also carries it's own overhead.