[ZendTo] Multi-cpu or thread use

Jules Field Jules at Zend.To
Tue Oct 23 15:20:08 BST 2018


The folks that know about such things appear to strongly advise against 
trying to use threads in a web server environment.

If 1 user drops 10 files in 1 drop-off, they will be virus scanned, 
checksummed and encrypted sequentially. But saying that, all the files 
are virus-scanned together to reduce the "startup cost" of clamdscan. 
This will pretty much only utilise 1 CPU core.

If 10 users each drop files (into different drop-offs, of course), then 
each user will be handled in parallel with the others, potentially using 
at least 10 CPU cores.

So the time a user has to wait at the end of the upload process is 
governed much more by the size of their drop-off. Provided you have 
fewer simultaneous users (all at the end of the upload process) than you 
have CPU cores, the number of users should make little difference to the 
time they each have to wait.

As for RAM requirements, have a look at the output of "top" when your 
ZendTo VM is reasonably busy, and see if it's actively using any swap. 
If it's using all/most of the RAM, but has plenty listed in 
buffers+cached while having little swap in use, you've got enough.

Hope that helps,

On 12/10/2018 00:03, John Thurston via ZendTo wrote:
> With the enabling of encryption in ZendTo, I've seen an increase in 
> memory and CPU utilization. I'm running 5.11 on CentOS on VMWare.
> Today, I had the host bumped up to 3GB of ram (from 2GB). This seems a 
> lot, but I duno how much clamav is using or if I have httpd rigged for 
> multi-process or multi-thread. Does php work with either? Anyway...
> If I ask for another virtual process to be thrown at this, is the php 
> going to be able to take advantage of it? That is, will it be able to 
> virus scan one big file while simultaneously encrypting another?
> Will it matter how the work arrives? That is, if a user drops two 
> files, is that going to be handled sequentially in one httpd process? 
> But if two users on different httpd processes each drop one file, 
> might they be handled in parallel?



'All the art of living lies in a fine mingling of letting go,
  and holding on.' - Henry Ellis

Twitter: @JulesFM

More information about the ZendTo mailing list