Re:From a Ruby monolith to microservices in Go
by Argorak on Wednesday March 04, 2015 @05:07AM
(#9143474)
Yes, but garbage-collected languages with embedded markers (which Ruby used for a long time) are not at all COW-friendly (because GC runs touch the pages).
Only in recent Ruby versions is that not a problem (and was changed for exactly that reason).
But yes, your memory report might be read wrong.
I don't use the Ruby stack, but if forking happens after loading libraries, this is not true, since most UNIXes (such as Linux) use COW memory pages when forking. So, it may appear that you use N times the memory of a single process, but most of their memory pages are shared.
See fork(2).