But this is going off topic, so I'm not longer going to contribute to this thread.
I eat my words - I am going to comment further...
But first apologise to Marc for the misunderstanding between us.
Unix forks and context switches very very fast, and Linux faster still.
This is the point I was trying to make, but didn't get the words quite right.
I'm also pretty sure that BSD is the same.
And preforked servers are a well-regarded design for
high-performance servers; Apache and Postfix are my favourite
examples.
> I hope nclamd gets added to the list.
Me too. Like I said before, we have it installed on 35 sites now and no problems. In total we have installed and support over 200 Linux servers between the two of us, so we have to keep the level of support down otherwise our lives would be a nightmare.
Having worked with the Apache code for some time, I followed its model pretty closely (not actually copying code, just following the concepts).
Not only does nclamd pre-fork, but you can also control an upper and lower child pre-fork limit and define how much work each child will do before it retires.
With a pre-forked design, you get the protection advantages of separate processes, while amortizing the fork cost out over the servicing of hundreds of requests.
nclamd's architecture is the way to go.
Thank you.
For me the key here is "the mail must flow". It you have ever been a sysadmin on a large mail server you would understand what I mean. Users will very quickly let you know what they think of a mail server when it goes down.
100% availability though redundancy and defensive programming was a key aim. Low resource usage and scalability were the next on the list.
For me what kills the idea of using threads, apart from the fragility of the service, is the inheritance of leaks. As has been previously pointed out in this mailing list, where you are linking in other people's code you will be linking in leaks whether you like it or not. So, you have to have a strategy to deal with them.
Pre-forking is well documented and well regarded solution which also gives you the advantage of having control over resource utilisation by controlling the rate at which the processes are forked and controlling the upper and lower limits of pre-forked processes.
James
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Clamav-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-devel
