Re: crm memory usage
Eugene Crosser <[email protected]> Tue, 07 Jul 2009 09:31:57 +0400
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
Ferenc, [email protected] wrote: > crm keeps failing with 'can't fork your minion' messages. (On syscalls.) I > looked at the code and found that syscall uses fork(), which makes a > complete copy of the parent process. I'm not an experienced c-programmer > but I assume the memory usage doubles there and then. Basically, no. Linux, and I guess most modern systems, use "Copy on Write" (CoW) strategy. New control blocks are allocated and filled in for the new process, but the parent and the child continue to use the same pages of memory until one of them modifies a page. At this moment the page is copied and the two processes possess of two distinct copies of this particular page. So, only the memory that is modified is duplicated. > Is there anything to be done about this. I've read that crm uses memory > mapping instead of file IO to get performance. I'll happily trade > performance for less memory usage. Memory mapping approach is in fact more graceful than "read into memory". Parts of the file are only being transferred to RAM as the program tries to read that address in the mapped memory. That's one thing. Another is that multiple processes that have mmaped the same file (read-only) all use the same RAM pages. Eugene ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ Crm114-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crm114-general
signature.asc
(application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKUt3Rfrw/cIw6UWkRApByAKCh0S3l1YElUChAqHd0jCJKgN97zwCg0tn9 52onRBvM5cLFFul+TNlEIYk= =cKG2 -----END PGP SIGNATURE-----