spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <uh...@fantomas.sk>
Subject Re: fork is vfork? (was Re: "With similar rules, rspamd is about ten times faster than SpamAssassin.")
Date Fri, 08 Mar 2013 17:06:26 GMT
>On Thu, 7 Mar 2013 14:18:12 +0100
>Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
>
>> I'm not talking about the semantics but about the implementation.
>> Simply said, vfork() was developed to avoid process memory copying
>> used at fork(). on linux, fork() does NOT copy process memory.

On 07.03.13 09:48, David F. Skoll wrote:
>vfork() also suspends execution of the parent until the child calls
>execve or _exit.  If the child happens to write into its memory, the parent
>sees the changes... very different from fork().

I think Giampaolo Tomassoni got the point in his reply to the same mail I
was replying to. 

>Now, as for the great benefits of copy-on-write: It is actually almost
>useless with Perl programs.  Here's the reason: Perl uses
>reference-counting to know when to free memory.  So even if you access
>memory "read-only" by creating a new reference to the underlying object,
>that effectively becomes a write operation and Linux needs to copy the
>page.

luckily, this does not happen at fork() time but at the time memory is
changed. Mamory may stay unchanged, so even after some time the memory
footprint can be smaller.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"One World. One Web. One Program." - Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" - Adolf Hitler

Mime
View raw message