CPU usage is too high
Posted: 2010-10-14T08:47:57-07:00
Hi
I have developed a program in C++ to smooth a png image and cut it into small pieces. We have run this program on IM v6.2.xxx and the CPU
usage is reasonably (on a 8 core computer, it took about 20-30%). After I upgraded IM to v6.6.4-10, The CPU usage goes to ~100%
(100% for all 8 cores). I read the previous discussion on similar topics:
viewtopic.php?f=1&t=14307&hilit=cpu
http://thomasschweitzer.com/2009/08/13/ ... -problems/
I had tried:
1: disable openmp
After disable openmp, my process only uses one cpu instead all 8 CPUs, the time consumed is much longer.
that is not what I want.
2: use nice -n 19
Although my process priority is lowered, the CPU consumption is the same as before
3: compile the IM to Q8:
The CPU usage lowers to ~95% (Q16 is 100%)
my current IM version is:
Version: ImageMagick 6.6.4-10 2010-10-14 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
Any suggestion on how to resolve this issue?
thanks
I have developed a program in C++ to smooth a png image and cut it into small pieces. We have run this program on IM v6.2.xxx and the CPU
usage is reasonably (on a 8 core computer, it took about 20-30%). After I upgraded IM to v6.6.4-10, The CPU usage goes to ~100%
(100% for all 8 cores). I read the previous discussion on similar topics:
viewtopic.php?f=1&t=14307&hilit=cpu
http://thomasschweitzer.com/2009/08/13/ ... -problems/
I had tried:
1: disable openmp
After disable openmp, my process only uses one cpu instead all 8 CPUs, the time consumed is much longer.
that is not what I want.
2: use nice -n 19
Although my process priority is lowered, the CPU consumption is the same as before
3: compile the IM to Q8:
The CPU usage lowers to ~95% (Q16 is 100%)
my current IM version is:
Version: ImageMagick 6.6.4-10 2010-10-14 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
Any suggestion on how to resolve this issue?
thanks