topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 1:45 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Installing an executable with limited execution priority  (Read 11024 times)

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Installing an executable with limited execution priority
« on: February 22, 2013, 04:19 PM »
I have one game program that sucks CPU time, but it's only this program. It's so bad, that after quitting this program, the time-slice quantums are adjusted by Windows XP to make all the other programs sluggish. The only way I know to reset these quantums is to log out, then log back into Windows again. Is there a resource kit program that can be used to install this one program (executable) at a lower priority?

I also have exactly the same question for the Firefox plugin-container executable that seems to hog CPU cycles when visiting certain web pages with many DoubleClick Flash ads. The Chrome browser doesn't have this problem.
C:\Program Files\Mozilla Firefox\plugin-container.exe

Other than that, all programs behave well on my Windows XP system, so I would like to avoid solutions that would affect all other well behaved programs.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #1 on: February 22, 2013, 05:13 PM »
It's so bad, that after quitting this program, the time-slice quantums are adjusted by Windows XP to make all the other programs sluggish.
What? :huh: - is that actually what happens? (there is - or at least used to be - some quantum/timeslice config you could go at in the registry, but afaik that required a reboot, and I'm not sure the settings work any longer... and if a game messed with them, it would seem weird that logging off/on would restore if quitting the game didn't).

Differently privileged stuff on XP (and everything before it) was a headache, Vistas UAC is actually quite a godsend in that regard. You could probably create a non-privileged user and use "run as user", but it's been years since I messed with it (thankfully!) so the details are hazy. Other methods to drop privileges are flaky.

But are you sure it's a high vs. low privilege thing? Could it be something else, like the CPU/GPU overheating and causing thermal throttling - and that "logging out fixes it" is because of the time it takes doing the relog jig, rather than the act of relogging?

As for flash, it's a well-known hog, and I doubt there's much you can do about it in Firefox (apart from uninstalling :D) - Chrome doesn't use the default Adobe plugin, they have their own tweaked version. If Process Tamer on plugin-container doesn't help, I dunno - my experience is that flash is generally a pretty sluggish hog.
- carpe noctem

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #2 on: February 23, 2013, 12:49 AM »
It's so bad, that after quitting this program, the time-slice quantums are adjusted by Windows XP to make all the other programs sluggish.
What? :huh: - is that actually what happens?

Well, what else can it be? Sometimes (75% of the time) I can run the game and exit without any problems. Other times, if I enter, then exit the game for 5 seconds, things are sluggish afterwards. Logging out and back in always fixes it immediately.

It might be the game latches on to a Windows resource and fails to release it upon exiting. Logging out simply releases that resource. I've tried debugging it with process explorer without success. What other monitoring utility would you recommend that shows system resource allocations?

As for flash, it's a well-known hog, and I doubt there's much you can do about it in Firefox.... If Process Tamer on plugin-container doesn't help,...

I've never used Process Tamer. I was hoping to setup some special priorities on these problem executables so I wouldn't need Process Tamer in the first place.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #3 on: February 23, 2013, 06:54 AM »
Well, what else can it be? Sometimes (75% of the time) I can run the game and exit without any problems. Other times, if I enter, then exit the game for 5 seconds, things are sluggish afterwards. Logging out and back in always fixes it immediately.
That is a very good question :) - I just wouldn't expect anything as "near kernel level" as thread scheduling to be fixed by a mere relog.

It might be the game latches on to a Windows resource and fails to release it upon exiting. Logging out simply releases that resource. I've tried debugging it with process explorer without success. What other monitoring utility would you recommend that shows system resource allocations?
Process explorer would be my best bet to start with. There's nothing fishy to spot? Is CPU and memory usage (both the overall as well as looking at individual processes) at normal levels, or is anything spiking? Can you describe the effects of the sluggishness?

I've never used Process Tamer. I was hoping to setup some special priorities on these problem executables so I wouldn't need Process Tamer in the first place.
Ah, I thought you had already tried PT since you posted in this forum :)

Anyway, would you care to name the game? Perhaps somebody else could take a look at it and try to reproduce, or perhaps there's known quirkiness or something.
- carpe noctem

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #4 on: February 23, 2013, 09:33 AM »
A quick search through the "tubes" made me find:
- open the command prompt
- type (for example): start /low notepad.exe

Put the above in a batch file, associate the desired icon with it and done.
There is one problem with this way of starting an application. The use of quotes is not allowed...So if the executable is stored in a folder with spaces in its name, you will have a problem. Solvable by putting the folder into the PATH variable, I would think.

Or did I understand the request incorrectly?

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #5 on: February 23, 2013, 10:02 AM »
Well, what else can it be? Sometimes (75% of the time) I can run the game and exit without any problems. Other times, if I enter, then exit the game for 5 seconds, things are sluggish afterwards. Logging out and back in always fixes it immediately.
That is a very good question :) - I just wouldn't expect anything as "near kernel level" as thread scheduling to be fixed by a mere relog.

Well maybe the working set (max memory allocation, max time slice) gets modified. But a shared resource could also be to blame.

It might be the game latches on to a Windows resource and fails to release it upon exiting. Logging out simply releases that resource. I've tried debugging it with process explorer without success.
Process explorer would be my best bet to start with. There's nothing fishy to spot? Is CPU and memory usage (both the overall as well as looking at individual processes) at normal levels, or is anything spiking? Can you describe the effects of the sluggishness?

The idle process is using up all the CPU cycles in process explorer when the system is sluggish.  It may take 6-8 seconds to simply open the WinXP START menu--unbelievable. Other windows open slowly as well. Programs seem to run okay, but everything about the UI is really slow. Upon trying to log out, sometimes it takes Windows two minutes to close programs.

The program is MahJongg Master 4.0 (2002). It's a very well designed board program, but it hogs every CPU cycle when it runs. What's weird is that 75% of the time Windows is fine after it exits. I wonder if I configure it to not use GPU hardware acceleration if that would make a difference?

What about knocking down the execution priority of the Firefox Plugin Container executable so Flash ads aren't stalling the browser? Is this a question for the Firefox forum?  Can Flash itself be tamed by reducing its execution priority? Shouldn't there be something in the Windows resource kit for doing that?

superticker

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 143
    • View Profile
    • Superticker's SU reviews about technology
    • Donate to Member
Re: Installing an executable with limited execution priority
« Reply #6 on: February 23, 2013, 10:16 AM »
- type (for example): start /low notepad.exe

Put the above in a batch file,... associate the desired icon with it and done.

So can this be done using a Windows resource kit utility that would patch the registry for this program's install such that it would always run in low priority without using a batch or command-line pif file? I'm guessing "yes", but I need to know the name of the resource kit utility so I can read up on it.

I would like to pose the same question for the Flash install or Firefox Plugin Container install. Darn Flash ads make my browser slow and unusable. I wish the ads would use canvas and HTML5 instead of Flash.