Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPU Usage issues when uploading and resizing pictures  (Read 3931 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.017 seconds with 19 queries.