On Apr 30, 2007, at 3:31 PM, Ashley M. Kirchner wrote: > As far as understand their explanation is that they simply call > the thumbnail creation routine sequentially, one image at a time, > which in turn goes to PHP which then goes to Apache. And as far as > the OS is concerned, it received 1 single call from Apache to do > something, as opposed to multiple calls at the same time. > > Would that be a reasonable explanation (of why their process > takes so long)? Because they're not spawning multiple calls ... ? Oh, I see. So they're actually generating all thumbnails as they generate the HTML that links to them? Yeah, that won't do. Not taking advantage of all the processors is the least of their problems, they also: - have a single GET request which takes way, way, way too long to respond - n_unprocessed_thumbnails*time_per_thumbnail >>> 0.1 sec for n_unprocessed_thumbnails=800, even if there's no contention for the processor - are forking from Apache, which is a bad idea, especially if it's multithreaded (are you using mpm_worker)? Big processes don't fork quickly. Much better to use a library to do this. -- Scott Lamb <http://www.slamb.org/>