|
|
|
|
|
by eropple
3801 days ago
|
|
Attempting to cite `ps`, which includes the unique pages as well as all shared pages used by the process--i.e. pages created by its parent to store such trivialities as the entirety of the Ruby runtime and the classes loaded therein--makes me question your understanding of the Linux process and memory model. Do you understand how fork(2) works on a modern Linux machine with regard to memory page sharing from parent to child? Suffice to say that nobody running a hojillion processes in Unicorn or another forking process worker--and I should point out that I have written one of these in Ruby, this isn't Unicorn magic--is suffering under the tyranny of large amounts of duplicated data. (I'm sure there are people who spin up X of a process from the jump, but they are swimming upstream and are not the norm in my experience.) The difference in memory usage between a forked process on a shared-page/copy-on-write OS and a thread is infinitesmal. You'd have better luck arguing about having a JIT and better perf (and there you'd be incontrovertibly correct, but I don't think it really matters for 95% of everything). |
|