Results 1 to 5 of 5
  1. #1

    PHP Image Processing Resources (GD & ImageMagick)

    So, I'm developing a PHP script that does a lot of image processing with multiple different images of different sizes. These images are usually cropped into a lot smaller images, then grayscale and sharpening filters are applied to the cropped images.

    Does anyone have any experience with the GD and ImageMagick libraries, especially using PHP? Wondering what kind of resources will help me increase the speed of the PHP script. Currently a normal execution of my script takes 30 seconds, with a 1 core CPU, 1024 GB RAM, and an SSD.

    Should I be looking for a VPS with more CPU cores, more RAM? Please let me know your thoughts.
    VirtualOptix Networks :: Flexible and Reliable Network Solutions
    Shared and Reseller cPanel Hosting - OpenVZ VPS - KVM VPS
    Dedicated Servers (Multiple Locations) - Web Design and Solutions
    Incomparable Support Staff Dedicated To Helping At All Costs

  2. #2
    Join Date
    Jan 2013
    Location
    Gone Fishin'
    Posts
    548
    I know nothing about GD and ImageMagick libraries but if it takes 30 sec for your script common sense tells you if you went with more cores and RAM it might take 15 sec for the same script.

    Again I know nothing about GD and ImageMagick.
    <<< Please see Forum Guidelines for signature setup. >>>

  3. #3
    Join Date
    Dec 2005
    Location
    Poland
    Posts
    143
    It is hard to say but you can do some tests and check what is more utilized ram or cpu and this will give you some clue.
    Why not to start script and measure its load on the system and check the results?
    Marcin Krupinski
    HOSTINEURO
    Fast,reliable VPS and Dedicated Servers in Europe (Germany / Netherlands)
    Red Hat Certified Engineer(RHCE)

  4. #4
    Join Date
    Nov 2000
    Location
    localhost
    Posts
    3,771
    Neither, for god sake do not do any imagemagick processing (via library or shell exec) in the request pipeline for 531 reasons, e.g. a resource starvation DOS would be trivial. If images are known preprocess your images and store the transformed output. If you need to handle this scenario as new images are added then throw the request on to a queue and have a worker process or processes (say cores-1 work processes) run the the transform in background. If you need to display the transformed image immediately then have an ajax request check if the job (long poll if you dont have a thread per request) has been processed and then remove the spinning icon.
    MattF - Since the start..

  5. #5
    Join Date
    May 2012
    Location
    Dallas, TX
    Posts
    293
    Looks like you need a VPS with a decent amount of RAM, maybe 2GB, and a good CPU, obviously. Higher-clock CPUs would be better in your case.

    In regards to framework, GD should be just fine.

Similar Threads

  1. Credit Card Processing Resources
    By fowkswe in forum Running a Web Hosting Business
    Replies: 12
    Last Post: 11-13-2003, 12:11 PM
  2. PHP & ImageMagick Programmer
    By gilman01 in forum Employment / Job Offers
    Replies: 6
    Last Post: 08-28-2003, 04:40 PM
  3. PHP versus Plain HTML files & Server Resources
    By ochiba in forum Web Hosting
    Replies: 9
    Last Post: 03-22-2003, 10:59 AM
  4. Php & ImageMagick
    By dsm in forum Programming Discussion
    Replies: 0
    Last Post: 08-29-2002, 09:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •