Advanced search  

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

Pages: [1]   Go Down

Author Topic: CPU Usage issues when uploading and resizing pictures  (Read 3866 times)

0 Members and 1 Guest are viewing this topic.

prodigious

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
CPU Usage issues when uploading and resizing pictures
« on: October 06, 2004, 05:24:26 pm »

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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: CPU Usage issues when uploading and resizing pictures
« Reply #1 on: October 06, 2004, 06:44:59 pm »

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

prodigious

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CPU Usage issues when uploading and resizing pictures
« Reply #2 on: October 06, 2004, 08:17:36 pm »

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

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: CPU Usage issues when uploading and resizing pictures
« Reply #3 on: October 06, 2004, 08:42:45 pm »

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.
Logged
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
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.