Imagick, why would a host not enable it?

So, I just installed zenphoto for my roommate and they love it but they ran into a small issue of BMP images not being displayed, at least not the thumbnail. I narrowed down the issue, I think, to the 'imagick' extension not being installed/enabled/available on the server. So, I contacted my hosts support desk, Lunarpages, and inquired about having that enabled/installed on the server I am hosted on. I was informed in the reply that imagick is not available on any of their shared hosting servers, unless I want to shell out for their Dedicated or VPS services.

My main question here is this. Is imagick some type of security risk or very server resource intensive?

I'm mainly wondering this because I've noticed in the past year that Lunarpage has become very nickle & dimey and I just can't figure why this would be some type of restricted extension for whatever reason, which I'm still waiting on a reply from the Lunarpages support team to explain.

Frustrated...

Comments

  • imagick is server and resource HOG
  • acrylian Administrator, Developer
    @jphilbert: Really? Actually it is generally said to be more memory friendly than GD. Which is why we added support for it.

    @twizted: Server configurations are quite different on hosts. I would recommend to look for another one if this one does not match your requirements.
  • I know from experience that GD is easier to set up, as it comes bundled with PHP, whereas ImageMagick needs to be set up. If you both have them up-and-running, then go for ImageMagick, as it has a sightly better performance and support for more image formats.
    Main difference between the two is the way batch-add is being done: when using GD, one image after the other is processed, which is good in terms of server load. Drawback is that you might have issues resizing larger pics (both in terms of dimensions and filesize), as you're limited by the memory assigned to PHP.
    ImageMagick on the other hand is quite resources-hungry, and it will start a separate process for each pic that needs to be resized during batch-add, which can bring the server down."
    I had ImageMagick installed on a server I managed I love the speed but I ended up removing it because every process that need to used had the potential to bring the server to 99% cpu utilization... not a good idea when its shared hosting.
  • acrylian Administrator, Developer
    Interesting info. thanks. So do you think we should extend this info here?:
    http://www.zenphoto.org/news/problems-with-albums-and-images#workaround-2-use-imagick-instead-of-the-gd-libary
  • Since we on the subject I noticed my host supports it ... but Zenphoto cant detect it ... any reason why? .. I am curious to see it will be a good solution and wont mind testing it who knows it may server me well.

    As for changing the info I am not sure the requirements are different from server to server. I know its a nice alternative when it works and the server can handle the load.
    ImageMagick is a better solution hands down I just know it can be a hog at times.
    -------------------------------------------

    Just Host Web Hosting Help
    ImageMagick
    Problem:

    Is ImageMagick installed on my account?

    Solution:

    ImageMagick is installed on all of our hosting servers, located at:

    /usr/bin/convert

    You can check versions with the following command:

    convert -version

    The ImageMagick/MagickWand extension for PHP is also available all servers. To invoke it, verify you have the following variable set in your php.ini:

    extension_dir = '/usr/lib64/php/modules'

    Then, add the following line to your php.ini:

    extension=magickwand.so

    For further information on configuring your account with the php.ini file, please see the article How do I change the PHP environment for my site with php.ini?.
  • acrylian Administrator, Developer
    We do only support ImageMagick via the PHP extension Imagick (as noted on the requirements..;-))
  • Yea I noticed my service only support magickwand for ImageMagick when I asked why they said the the Imagick module is prone to take too many resources #gofigure

    Oh well I screwed :P
  • acrylian Administrator, Developer
    Ah, ok. I don't know actually, maybe the author of our imagick module, Kagutsuchi, can.
  • Well magickwand uses the same exact API and most functions yes I already tried to hack the lib-Imagick.php to see if it would work no cigar :P
  • jalves Member
    Hi, i'm using imagick in my vps and i have some problems, it takes too long to resize images. When batching a lot of images consumes all the memory available. I can't find a solution for this.
    I've setup some resource limits in lib-Imagick.php that prevents all my memory from being consumed but it takes too much time to resize images. Using GD is almost instantly but the resized images are poor in quality..
  • @twizted - I'd imagine it's an issue of support. Hosts needs to be able to support it if they add it, and for some hosts, it doesn't seem to be a priority. In your case, however, it sounds like your host considers Imagick to be "premium" functionality.

    @jphilbert - The Imagick PHP extension and magickwand use the same functionality under the hood, but it's not interchangeable, as far as I know.

    @jalves - Setting resource limits will slow your server down if the limits are exceeded. When you set a memory limit, ImageMagick will begin to use swap space on the hard disk instead. RAM is far, far faster than disk speed, so whenever memory runs out on your system, ImageMagick will simply continue processing on the disk, thus causing slow performance.
  • jalves Member
    Hi kagutsuchi,

    thank you for your answer.
    yes i know that.. but if i don't have limits all my memory is consumed and my server becomes unresponsive... i had to restart some times to get it back.
    My galleries have 100 thumbs by page and i'm working with hi-res pictures (4000pxX3000px). Do you think it is too much? But even with 4 thumbs by page it gets too much time.. GD is much faster.. Could i have something wrong? I can't find anything to solve the problem..
  • If GD works well, then use what works :)

    Those images are quite large though and will consume much memory and begin to use swap with Imagick, regardless of resource limits.

    FYI, this github issue should help with Imagick memory consumption, so it could be improved in the coming Zenphoto releases: http://github.com/zenphoto/zenphoto/issues/418
  • jalves Member
    Yes but GD puts some artifacts in resized images.. that's my problem. GD is fast but poor quality, Imagick is too slow but good quality.. There's no solution for my problem? :S
  • The issue posted in my last post should help with resource usage, thus making Imagick faster. :)
  • jalves Member
    Thank you very very much @kagutsuchi!!! It just solved my problem!
    Sorry i didn't noticed it before!
    Just removed my resource limits and made the changes suggested in the link.
    It is now faster than ever and perfect thumbs! You just saved my day! Thank you once again!
    This should be committed for the next zp build!
  • acrylian Administrator, Developer
    Did you check your image settings? Actually GD does not put that much artefacts into images unless the compression is quite high.
Sign In or Register to comment.