Comment by btilly
4 years ago
The classic pattern was that you'd spin up something like Apache, load it full of read-only data, then start forking its children. Hoping that you'd share memory between children.
With what you describe, you'd share nothing because at the point you've loaded it up, all the data you just loaded is resident. :-(
If loading == mmap(2)ing read-only, then it's not a problem. Read-only pages don't get CoW'ed.
Back when I did this, loading usually meant querying a bunch of constant data in mod_perl.
So write the query results to files and then mmap() them!
1 reply →