4 ms·
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 memo
by btilly 4y 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. :-(
- cryptonector 4y agoIf loading == mmap(2)ing read-only, then it's not a problem. Read-only pages don't get CoW'ed.
- btilly 4y agoBack when I did this, loading usually meant querying a bunch of constant data in mod_perl.
- cryptonector 4y agoSo write the query results to files and then mmap() them!
- btilly 4y agoYou'd be amazed at how difficult it is to make useful use of mmap() from within a variety of common scripting languages.