CPU Usage issues when uploading and resizing pictures CPU Usage issues when uploading and resizing pictures
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CPU Usage issues when uploading and resizing pictures

Started by prodigious, October 06, 2004, 05:24:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prodigious

Hello..

So while using 1.3.1, I ended up getting my account suspended because I had caused a 32% CPU Usage on my server.  My TOS calls for no more than 6% so I wanted to know if any of you also had issues with this.     I was uploading pictures using the normal upload interface (not batch add) and I was resizing the pictures once they were uploaded.

Any thoughts on how I can keep using Coppermine's features but keep CPU Usage down within acceptable limits?

Thanks
Mike

Tranz

Were you using files at the original size from the camera? How many files?

prodigious

Yes, the files were the original size;  5 files at a time.   I believe the files were at least 1600 x 1200 originally.

kegobeer

The problem lies with GD or ImageMagick, and the CPU cycles they consume during the resize process.  The easiest (and best) way to keep this low is to resize the images prior to upload (I resize mine to 640x480) and drop the resolution to a more web happy level.

Both GD and ImageMagick are CPU intensive apps - there's no real workaround for that.  You could limit uploads to one file at a time, tell your users to put some time between uploads, prevent images larger that 1024x768 from being uploaded, or have your users try using xp_publish.php (which uses the built in XP upload ability) which can resize the images before being uploaded.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots