Results 1 to 5 of 5
-
03-21-2013, 03:25 AM #1Newbie
- Join Date
- Sep 2005
- Location
- California
- Posts
- 23
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
-
03-21-2013, 03:46 AM #2Web Hosting Evangelist
- 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. >>>
-
03-21-2013, 07:35 AM #3WHT Addict
- 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)
-
03-21-2013, 09:02 AM #4Web Hosting Master
- 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..
-
03-21-2013, 09:08 AM #5Disabled
- 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
-
Credit Card Processing Resources
By fowkswe in forum Running a Web Hosting BusinessReplies: 12Last Post: 11-13-2003, 12:11 PM -
PHP & ImageMagick Programmer
By gilman01 in forum Employment / Job OffersReplies: 6Last Post: 08-28-2003, 04:40 PM -
PHP versus Plain HTML files & Server Resources
By ochiba in forum Web HostingReplies: 9Last Post: 03-22-2003, 10:59 AM -
Php & ImageMagick
By dsm in forum Programming DiscussionReplies: 0Last Post: 08-29-2002, 09:35 PM