Author Topic: CPU load  (Read 6761 times)

Offline multiweb

  • Newcomer
  • Posts: 25
    • Some of my Pics :)
CPU load
« on: 2012 April 08 16:59:30 »
I've been running a few batches now and was wondering if there are settings for PI to run on my system without 'hogging' the system. I'm running a water cooled I7 with 24GB RAM. I/O mouse/keyboard are not very responsive during batching in PI. I checked the CPU load and although it maxes out the 8 cores to 100% at times it is not as heavy on my machine as let's say a HD video encoding in AE or Premiere (which still leaves the main OS UI very fluid and responsive) and the RAM usage is very minimal with PI idling around 5GB so nothing exceptional.

The problem seems to be that PI picks up application focus everytime it cycles through the process. So if you're trying to do something else in another app, mouse motion and keyboard input will be buffered and interrupted. Even trying to type this post during the batching process was impossible so I had to stop it. I saw something in Global Preferences called Parallel Processing and Threads. I tried to change maximum module thread priority from Time Critical to Normal. Although a little better it didn't significantly improve things. Am I missing something?
Marc Aragnou.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: CPU load
« Reply #1 on: 2012 April 08 19:58:52 »
very interesting. this is the first time i've heard someone on a different platform talk about focus stealing during script execution. this happens to me all the time on osx-86 and because i use spaces (virtual desktops), when PI starts doing this, i can't use my computer at all anymore.

my guess is this is some kind of QT bug, though for me it seemed to correlate with when the pixinsight console window activated itself as the script iterates.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: CPU load
« Reply #2 on: 2012 April 09 04:28:12 »
I think there have been several reports about this issue, mainly on Windows. What I usually do is this:

- Set "Maximum module thread priority" to "lowest" in "Global Preferences/Parallel Processing and Threads"
- If I forget this: The windows task manager allows to change the priority of the PI process to "Low" when the process is already running.

Both of these cost less than 5% performance, keep the GUI responsive, and allow to watch a DVD or surf the internet while PI is doing its things.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: CPU load
« Reply #3 on: 2012 April 09 04:39:55 »
Hi,

You can also choose the maximum number of logical processors that PI is allowed to use. This is done with the 'parallel' command with the '-p' option:

parallel -p=<n>

Where 'n' is the number of processors.

One question: How many files are you processing in your batch process? There is a known problem with the image container when you process several thousands of images... at least in Linux.


Regards,
Vicent.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: CPU load
« Reply #4 on: 2012 April 09 05:11:17 »
Usually it is less than 100 images. A real CPU hog is StarAlignment.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: CPU load
« Reply #5 on: 2012 April 09 10:25:31 »
Quote
You can also choose the maximum number of logical processors that PI is allowed to use.

I usually set mine to one less than the maximum.  For example, if I have 12 cores, I will set the maximum value to 11.  Experimentation is key.  Generally speaking, this is the only parameter I have had to change with respect to a non-responsive OS.

Wade

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: CPU load
« Reply #6 on: 2012 April 09 10:34:15 »
Using Fedora I've never had this kind of problems problems even if there were a lot of programs running and web browsing at the same time. I use to have the parallel processing set to the maximum number of cores.

Vicent.

Offline multiweb

  • Newcomer
  • Posts: 25
    • Some of my Pics :)
Re: CPU load
« Reply #7 on: 2012 April 09 15:19:15 »
Set "Maximum module thread priority" to "lowest" in "Global Preferences/Parallel Processing and Threads"

That worked quite well. No problem now. Thanks.
Marc Aragnou.

Offline multiweb

  • Newcomer
  • Posts: 25
    • Some of my Pics :)
Re: CPU load
« Reply #8 on: 2012 April 09 15:21:59 »
Hi,

You can also choose the maximum number of logical processors that PI is allowed to use. This is done with the 'parallel' command with the '-p' option:

parallel -p=<n>

Where 'n' is the number of processors.

One question: How many files are you processing in your batch process? There is a known problem with the image container when you process several thousands of images... at least in Linux.


Regards,
Vicent.

About 3000 subs. It's a time-lapse. How do you start PI with the parallel option? Create a shortcut with the arguments after the executable? (i.e prog.exe -arg1 value1 -arg2 value2 )

EDIT: found it. Didn't realise the process console also acts as a command line prompt. doh!
« Last Edit: 2012 April 09 22:29:58 by multiweb »
Marc Aragnou.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: CPU load
« Reply #9 on: 2012 April 09 16:39:32 »
but did these changes fix the focus stealing? on my mac i do not have problems with system unresponsiveness, just the fact that when executing a script, PI keeps stealing focus. juan has tried a few times to fix this yet it still persists for me...


Offline multiweb

  • Newcomer
  • Posts: 25
    • Some of my Pics :)
Re: CPU load
« Reply #10 on: 2012 April 09 22:28:19 »
but did these changes fix the focus stealing? on my mac i do not have problems with system unresponsiveness, just the fact that when executing a script, PI keeps stealing focus. juan has tried a few times to fix this yet it still persists for me...

Strangely enough I don't have the loss of focus issue anymore. Setting 'Maximum module thread priority' back to Time Critical and instead disabling one core so now giving only access to 7 out of 8 works better. Because PI has still plenty of processing power available and I don't get the CPU hogging issue anymore.
Marc Aragnou.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: CPU load
« Reply #11 on: 2012 April 10 10:13:08 »
i guess i will try making these changes and see what happens with the focus stealing. thanks.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: CPU load
« Reply #12 on: 2012 April 10 11:05:39 »
Focus stealing remains a problem for me on Win7 when disabling one core.