in reply to Using kernel-space threads with Perl

If the data that needs to be shared is too large for RAM another good option is to use a fast DBM like KyotoCabinet and in your Perl program just use forks with a library like Parallel::Forker, Parallel::ForkManager, Parallel::Prefork, etc.

I've done things this way and it works really fast as long as you aren't constantly writing to/changing the shared data (with KyotoCabinet you can specify the size of the RAM cache but the rest of the DBM is on the filesystem will be slower). If you are creating the shared data structure once and then reading from it with your forks it can be nearly as fast as RAM.

  • Comment on Re: Using kernel-space threads with Perl