in reply to How best to optimize shared data

Don't try to write your own shared memory module from scratch -- there's no good reason to do it. Just use Cache::FastMmap or BerkeleyDB (not DB_File!) and they will handle the hard stuff and give you great performance.