Netflix/Silverlight hijacks cpu process priority

Miramonti

Lifer
Aug 26, 2000
28,651
100
91
When I play a netflix streaming video, the process priority to the browser I'm using gets set to Above Normal. This is the case with both firefox and IE.

I've tried using a nagware software utility I found called Process Tamer, yet even with its priority management rules, it can't keep up with how aggressively Silverlight maintains the browser's high priority.

This is a major problem because many times the cpu utilization suddenly maxes out when watching netflix, essentially freezing the computer and video, and yet it's nearly impossible to kill the browser.

Is there any way to override this?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just a guess, but Silverlight itself may fall back to manually setting the priority when running on an XP-age or earlier OS. I don't believe non-admins have permission to raise their processes priority, so you could try running as a non-admin account and see if it still does it.

And I'm pretty surprised MS would do this considering how shitty their process priority system works.
 

Miramonti

Lifer
Aug 26, 2000
28,651
100
91
Just a guess, but Silverlight itself may fall back to manually setting the priority when running on an XP-age or earlier OS. I don't believe non-admins have permission to raise their processes priority, so you could try running as a non-admin account and see if it still does it.

And I'm pretty surprised MS would do this considering how shitty their process priority system works.

Same problem with non-admin privileges. No way to override the priority without it automatically getting reset to Above Normal. In IE the override is almost instantly, with firefox it takes a couple seconds.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
Do you have more than 1 core in the cpu ?
If so you can right click the process and set affinity to just 1 core and that should make the rest of the processes more responsive. Providing the cpu is fast enough to start with.
 

Miramonti

Lifer
Aug 26, 2000
28,651
100
91
Do you have more than 1 core in the cpu ?
If so you can right click the process and set affinity to just 1 core and that should make the rest of the processes more responsive. Providing the cpu is fast enough to start with.

This should be a nice work around, thanks Modelworks. The highest I've seen the cpu resources for the browser when streaming netflix on this computer is around 40% (unless it goes berserk maxing both cores, which is the problem). Generally is 20-30% tho, which just 1 core should provide plenty of overhead.
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
sounds like you need a faster processor is all.

No, Windows process scheduling is fucked with regards to priorities. It's too extreme, "Above normal" processes seem to get all the CPU time they want and "Below normal" get pretty much nothing unless the system is idle. I could see that being the case for the highest and lowest level priorities, but not +-1 from "Normal".
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
well no, xp's scheduler is lousier than vistas/win7 sure,but silverlight is simply a cpu hog. thats the main issue, not the scheduler.
its gpu accel requires the site enable it, i guess beta or something.
so well adobe manages to ahead of ms in that area, flash has a beta gpu accel version that does work fine on nvidia gpus.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
well no, xp's scheduler is lousier than vistas/win7 sure,but silverlight is simply a cpu hog. thats the main issue, not the scheduler.
its gpu accel requires the site enable it, i guess beta or something.
so well adobe manages to ahead of ms in that area, flash has a beta gpu accel version that does work fine on nvidia gpus.

Windows' process scheduler is terrible regardless of release. Even above priority processes get to monopolize the CPU and below priority ones don't get any CPU time unless the CPU is totally idle.
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
well isn't that the whole point of "above normal priority"?

i've not seen complaints about vista/win7 schedulers, they are very good.
theres no reason to for windows to keep silverlight away from the cpu until it starts skipping frames. it is a cpu hog after all. he's complaining about process priority when the problem is that decode is not gpu based, and the variability of h264 decode is natural.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
well isn't that the whole point of "above normal priority"?

i've not seen complaints about vista/win7 schedulers, they are very good.
theres no reason to for windows to keep silverlight away from the cpu until it starts skipping frames. it is a cpu hog after all. he's complaining about process priority when the problem is that decode is not gpu based, and the variability of h264 decode is natural.

No, it's one thing for High or Real-Time to monopolize the CPU but one step above normal shouldn't at all. Linux has steps going from -19 to 20 for process priorities and seven setting one to -19 doesn't cause it to completely monopolize the CPU to the point where it take minutes to open up task manager and kill it. And that's what he's complaining about. Silverlight being a CPU hog is one thing, but the fact that it increases it's own process' priority and results in the system essentially hanging for seconds at a time while it monopolizes the CPU is a whole other.
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
Look, if silverlight makes it so it takes minutes to do things, your system is too slow. Quibbling over process priority is really besides the point if its that bad.
 

Miramonti

Lifer
Aug 26, 2000
28,651
100
91
This isn't a system problem.

Normally netflix/silverlight stays 20-30% dual cpu usage, but on occassion for whatever buggy reason spikes to ~100% dual core utilization. If I had more cores I imagine it would use even more resources. If silverlight is going to be so unstable, it's ridiculous to require Above Normal priority, which basically kills the ability to access any other function on the computer, including the ability to kill the browser when it goes berserk.

That said, limiting the browser affinity to one core only has been an excellent solution. When it maxes out one cpu, the other system processes still have the ability to operate, including ones that aid silverlight in 'catching up', where the freeze now is only temporary until the video can start playing normally again.

Like I said, this does not happen all the time and is not normally a problem, but I've watched a lot of streaming netflix lately and its been a pia when it does happen (until I limited it to one core only.)
 
Last edited:

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
look, if its streaming at higher quality it probably needs both cores.
its unaccelerated video. streaming unreliability only makes it harder. when i stream dvd quality netflix it does not take a whole core of a e2200 which is a slow processor. It rarely goes over 50%, mostly nearer to 20% actually. it doesn't take both cores to 100%. somethings wrong with your system.
 
Last edited:

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
No, it's one thing for High or Real-Time to monopolize the CPU but one step above normal shouldn't at all.

If a process with Above Normal base priority is requesting 100% of the CPU resources, it should get priority over processes with just a Normal base priority. Any other behavior is broken.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If a process with Above Normal base priority is requesting 100% of the CPU resources, it should get priority over processes with just a Normal base priority. Any other behavior is broken.

Within reason, this isn't Win3.11 with cooperative multitasking. Other processes should still get a chance to run, which isn't the case with the Windows process scheduler.
 

Miramonti

Lifer
Aug 26, 2000
28,651
100
91
look, if its streaming at higher quality it probably needs both cores.
its unaccelerated video. streaming unreliability only makes it harder. when i stream dvd quality netflix it does not take a whole core of a e2200 which is a slow processor. It rarely goes over 50%, mostly nearer to 20% actually. it doesn't take both cores to 100%. somethings wrong with your system.

I'm not that special...this problem isn't unique to me.

Anyhow, I've been watching plenty of episodes lately and silverlight seems to get more vulnerable when relying on the 'next episode' button, which keeps silverlight running between videos, as opposed to going back to the web page and clicking on the link to the next episode, which stops and restarts it.
 

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
Within reason, this isn't Win3.11 with cooperative multitasking. Other processes should still get a chance to run, which isn't the case with the Windows process scheduler.

Assuming that the scheduler is set to give programs priority, other processes have a chance to run if they have the same base priority and they have foreground focus.

Interrupting a higher-priority thread to give a lower-priority thread a chance to run completely defeats the purpose of priority levels.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Assuming that the scheduler is set to give programs priority, other processes have a chance to run if they have the same base priority and they have foreground focus.

Interrupting a higher-priority thread to give a lower-priority thread a chance to run completely defeats the purpose of priority levels.

No, it doesn't. Higher priority means they get to go first whenever there's more than one runnable task, however you can't starve lower priority tasks indefinitely either. Eventually you have to let them run as well. Having a high priority task slow the machine down to get it's job done is one thing, but with Windows it's pretty much all or nothing. And on top of that, Windows isn't a real-time OS, there's no guarantee of any amount of processing time.