6.0.0-alpha12
6/12/25

[#13566] Multi-thread performance while uploading
Summary Multi-thread performance while uploading
Queue Ansel
Queue Version 3.0.1
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester bonnaud (at) hotmail (dot) com
Created 09/15/2014 (3923 days ago)
Due
Updated 09/16/2014 (3922 days ago)
Assigned
Resolved 09/15/2014 (3923 days ago)
Milestone
Patch No

History
09/16/2014 02:40:24 AM bonnaud (at) hotmail (dot) com Comment #5 Reply to this comment

[Show Quoted Text - 37 lines]
I understand that basically it's possible, but would require almost 
compiling a very exotic version of php and possibly apache to achieve 
and thus make it "impossible". You're by far more knowledgable than me 
in the depts of php and linux various packages.


Thanks btw for the time you take answering those ticket. My university 
is actually using imp ( old one probably on horde version 3 ) and I 
think there is great potential with this framework.
09/15/2014 11:33:46 PM Michael Rubinsky Comment #4
State ⇒ Rejected
Reply to this comment
Neither Horde nor PHP has control over the number of CPUs in use on
the server. the only thing I could suggest is making sure that the
configuration for auto generating the views is turned off and see if
that helps
I've actually narrowed it down to the fact that even if you open 3 
tab in the same browser somehow apache consider it the same session
Of course. Anything coming from the same browser/login is going to be 
the same session.
and thus don't spread the work on 3 worker. Though if you open one 
in firefox and one in chrome those are considered as 2 session and 
will be working on 2 worker.

I might be mistaken in the explication but the bahavior is what I noticed.

Would there be a workaround possible with that to fire up more 
worker to increase the picture processing ?
No. Userland code has no control over which PHP instance executes the 
code (unless you start talking about using the various forking 
functions in PHP and we are NOT going there). The only possibility is 
to write a new backend handler for Horde_Queue (which queues the 
operations when automatically generating the image thumbnails on 
upload). Note that this would only help once the files are fully 
uploaded, and not affect the actual uploaded of the files.
Like during the upload I noticed it's only working on 1 picture at a 
time instead of let's say 4 ( configurable the maximum of 
simultanuous upload from a user )
The core logic that handles the uploading is done via a third party 
library called Plupload, and this does not currently support 
simultaneous uploads, or immediate-start-on-drop operations. Even if 
we did have the functionality, though, you are still stuck with the 
problem of it all being done from a single session.
09/15/2014 09:27:35 PM bonnaud (at) hotmail (dot) com Comment #3 Reply to this comment
Neither Horde nor PHP has control over the number of CPUs in use on 
the server. the only thing I could suggest is making sure that the 
configuration for auto generating the views is turned off and see if 
that helps
I've actually narrowed it down to the fact that even if you open 3 tab 
in the same browser somehow apache consider it the same session and 
thus don't spread the work on 3 worker. Though if you open one in 
firefox and one in chrome those are considered as 2 session and will 
be working on 2 worker.

I might be mistaken in the explication but the bahavior is what I noticed.

Would there be a workaround possible with that to fire up more worker 
to increase the picture processing ?

Like during the upload I noticed it's only working on 1 picture at a 
time instead of let's say 4 ( configurable the maximum of simultanuous 
upload from a user ) ?
09/15/2014 03:57:28 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Neither Horde nor PHP has control over the number of CPUs in use on 
the server. the only thing I could suggest is making sure that the 
configuration for auto generating the views is turned off and see if 
that helps
09/15/2014 07:39:39 AM bonnaud (at) hotmail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Multi-thread performance while uploading
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ No
State ⇒ New
Reply to this comment
I'm not sure if it's my configuration, a limitation of imagick or a 
limitation of apache but while uploading picture even if the server 
have 4 core, only 1 core is working and the rest of the horde 
framework is almost on a hang.

I'm using apache 2.4 with php5.2 ( so mpm-prefork ) and php5-imagick 
wich right now give the best performance.

I've also tried with imagemagick -> same behavior, but slightly slower
also with phpGD2 -> don't actually upload all files, don't go over 25% 
cpu neither

I've cheked thru htop and vmware vsphere client ( max 26% of cpu usage 
of the machine confirming only one core is working ) and I also cheked 
pgrep apache2 | wc -l I had 12 instances of apache running.

This is not right now a big issue, but could become so since the mail 
client is almost hanging while uploading pictures.

Saved Queries