Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU Throttle value doesn't change #393

Closed
tikendra-chand opened this issue Mar 3, 2017 · 5 comments
Closed

CPU Throttle value doesn't change #393

tikendra-chand opened this issue Mar 3, 2017 · 5 comments
Labels

Comments

@tikendra-chand
Copy link

tikendra-chand commented Mar 3, 2017

I am trying to set CPU throttle for imagemagick and I have tried most of the options specified in docs, yet 'convert -list resource' shows 'Throttle: 0'. I have tried following options:

  1. changed policy.xml and un-commented line with value 3: <policy domain="resource" name="throttle" value="3"/>
  2. set the environment variable by putting this in .bashrc: export MAGICK_THROTTLE=5
  3. put it in convert command options like this: convert -limit throttle 2 largenew.jpg large.png; which throws: convert: unrecognized resource type `throttle' @ error/convert.c/ConvertImageCommand/2014
  4. export MAGICK_THROTTLE=5; in terminal

However 'convert -list resource' always shows 'Throttle: 0'. It works if I change other resource limits though, only throttle isn't working.

I have tried this with 'ImageMagick 6.8.9-9 Q16 x86_64' and 'ImageMagick 7.0.5-0 Q16 x86_64' on ubuntu 15.10.

Can you please fix this or let me know how to configure it if I am doing anything wrong?

dlemstra pushed a commit to ImageMagick/Website that referenced this issue Mar 3, 2017
dlemstra pushed a commit to ImageMagick/Website that referenced this issue Mar 3, 2017
@mikayla-grace
Copy link

We corrected the documentation, the environment variable is MAGICK_THROTTLE_LIMIT. However, if you have a throttle security policy, it overrides the value of the environment variable.

We added a patch to support the -limit throttle option.

We're not sure why the throttle security policy does not work for you. We added your policy to policy.xml and it returned expected results: Throttle: 3. Can you post your security policy? Perhaps there is a bug in the parser that is triggered in only limited circumstances.

@tikendra-chand
Copy link
Author

This is mine policy.xml (/etc/ImageMagick-6/policy.xml)
policy

@mikayla-grace
Copy link

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 16, 2017
2017-03-11  7.0.5-2 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.5-2, GIT revision 19696:da91a7c:20170311.

2017-03-06  7.0.5-2 Cristy  <quetzlzacatenango@image...>
  * Respect throttle policy (reference
    ImageMagick/ImageMagick#393).
  * Return proper minima / maxima (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377).
  * Support the -authenticate option for PDF (reference
    Counting objects: 7, done.g/discourse-server/viewtopic.php?f=3&t=31530).
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue May 17, 2017
Pkgsrc changes:
Adapt to new version, PLIST (2 new files).

Upstream changes:
2017-05-12  6.9.8-5 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-5, GIT revision 11575:186b15d:20170512.

2017-05-10  6.9.8-5 John Cupitt <jcupitt@gmail.com>
  * Revise DICOM window and rescale handling (reference
    ImageMagick/ImageMagick#484)

2017-05-08  6.9.8-5 Cristy  <quetzlzacatenango@image...>
  * Fix transient PDF bug (reference
    ImageMagick/ImageMagick#463).
  * Check for EOF conditions for RLE image format.
  * Reset histogram page geometry (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31920).

2017-04-24  6.9.8-4 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-4, GIT revision 11521:d7433aa:20170424.

2017-03-26  6.9.8-4 Cristy  <quetzlzacatenango@image...>
  * Minimize buffer copies to improve OpenCL performance.
  * Patch a PCD writer problem, dark pixels (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=3164).
  * Support ICC based PDF's (reference
    ImageMagick/ImageMagick#417).

2017-03-24  6.9.8-3 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-3, GIT revision 11444:3f523e5:20170324.

2017-03-20  6.9.8-3 Cristy  <quetzlzacatenango@image...>
  * MagickWand-config, use --cflags, not --clags (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31602).
  * Respect -loop option for animate -window (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31619).

2017-03-18  6.9.8-2 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-2, GIT revision 11436:a912791:20170318.

2017-03-14  6.9.8-2 Cristy  <quetzlzacatenango@image...>
  * Support namespaces for the security policy.

2017-03-11  6.9.8-1 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-1.

2017-03-03  6.9.8-0 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.8-0, GIT revision 11408:da91a7c:20170311.

2017-03-06  6.9.8-0 Cristy  <quetzlzacatenango@image...>
  * Respect throttle policy (reference
    ImageMagick/ImageMagick#393).
  * Support the -authenticate option for PDF (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31530).

2017-03-03  6.9.7-10 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.7-10, GIT revision 11396:44b1bc6:20170303.

2017-02-21  6.9.7-10 Cristy  <quetzlzacatenango@image...>
  * Fix Spurious memory allocation message (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31438).
  * Identical images should return inf for PSNR (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31487).
@tikendra-chand
Copy link
Author

Thanks for fixing it, its working fine in in 7.0.5-10.
I need one help though:
If I am performing multiple operations in one command like this:
convert ( -size 800x495 canvas:none ) (newimage.png -resize 1780x1200) -geometry -618-522 -composite changedimage.png
Will this work (setting -limit option only once)?
convert ( -size 800x495 canvas:none ) (newimage.png -resize 1780x1200) -geometry -618-522 -composite -limit throttle 100 changedimage.png
Or do I need to set "-limit throttle 100" inside each sub-operations too?

clrpackages pushed a commit to clearlinux-pkgs/ImageMagick that referenced this issue Jul 17, 2017
…on 6.9.8.0

2017-03-06  6.9.8-0 Cristy  <quetzlzacatenango@image...>
  * Respect throttle policy (reference
    ImageMagick/ImageMagick#393).
  * Support the -authenticate option for PDF (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31530).
@dlemstra
Copy link
Member

@tikendra-chand You should put -limit throttle 100 at the start of your command.

@dlemstra dlemstra added the bug label Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants