Responsiveness Calculation Improvements [FIXED-06060025b]

Started by BenYeeHua, June 16, 2013, 01:39:38 PM

Previous topic - Next topic

BenYeeHua

The "Responsiveness" is showing wrong?
Or the software really "can" affect the system responsiveness?

Tested with CPU Eater and AIDA64.
---
And also, I found the "per CPU usage" is showing full, while Windows Task Manager Total CPU usage and the CPU usage of the AIDA process is not showing full usage. :)

edkiefer

you have probalance enabled ?
I don't see any priority lowering in log or yellow bar in graph .

Edit: I am seeing low responsiveness too with CPUeater .
Bitsum QA Engineer

BenYeeHua

Quote from: edkiefer on June 16, 2013, 01:57:47 PM
you have probalance enabled ?
I don't see any priority lowering in log or yellow bar in graph .

Edit: I am seeing low responsiveness too with CPUeater .
Yes, you can see the "Below Normal" priority. ;)

As I remember, this don't happen in Windows XP, but not Windows Vista/7/8.

edkiefer

#3
yes , something looks a bit odd , I kind of remember PL being able to pretty much keep responsiveness at like 90+ levels (I could be wrong as never used it much )with CPUeater running .

The thing that is odd though , you start a load app (any kind of heavy load) and it does keep it 100% for few sec then it drops to a level, stays there for another x time and drops down .
I tried it with PL pro balance on and off and same/similar thing (not exactly ) . So not sure on this, PL does still help with heavy loading but maybe not as much as before ?
Settings seem ok , so not sure if its graph display or something else
Bitsum QA Engineer

Jeremy Collake

It definitely used to work better.

Something is not tuned right - but it's really just appearances. It may actually be the responsiveness calculation is too sensitive. It isn't a perfect or 'hard' metric, and is something I calculate. It's very susceptible to changes in thread priorities or the OS itself.

One under-utilized feature of ProBalance is the ability to change CPU affinity during restraint. Dropping off a core sure fixes things right up during the CPU Eater demo ;)
Software Engineer. Bitsum LLC.

edkiefer

The other thing I noticed is PL graph didn't match CPUeater graphs with responsiveness .

How do you set up app to cut cores off if loaded to high . wouldn't you need a different cpu load level for trigger that to be effective ?

Edit: Duh, I never looked good enough it seems in ProBalance settings ,there is option to set cores to cut off .
My point though that would really free up a lot resources so I was thinking a different load trigger point as if the default settings you set were not able to get responses good enough .

Hmm, have to think about this a bit, cutting core is double edge sword .
Bitsum QA Engineer

BenYeeHua

Yes, it can be the multi-thread support starting from Windows Vista become better, then it "stop working" as that is design for Windows XP? :)
Quote from: edkiefer on June 17, 2013, 12:52:01 PM
The other thing I noticed is PL graph didn't match CPUeater graphs with responsiveness .

How do you set up app to cut cores off if loaded to high . wouldn't you need a different cpu load level for trigger that to be effective ?
Yup, as they has a difference refresh interval start at difference time I think.
----
Yup, watchdog. ;)

Jeremy Collake

It depends on how many cores the system has. For a dual core system, you'd want to be much more conservative about ProBalance if you're dropping a core during process restraint. For a 8, 16, or 32 core system, dropping a core is effective and reasonably safe. Of course, Watchdog rules are great for these types of things. One can set a rule to change CPU affinity on X, then change it back on X.

This thread has motivated me to toss in a new ProBalance option 'drop a CPU from the CPU affinity' (randomly). I'm working on that now. I believe for multi-core/SMP platforms, CPU affinity is going to be the real winner going forward. It's something I've long needed to focus much more attention on.
Software Engineer. Bitsum LLC.

Jeremy Collake

Quote from: edkiefer on June 17, 2013, 12:52:01 PM
Edit: Duh, I never looked good enough it seems in ProBalance settings ,there is option to set cores to cut off .

Good example of my #1 problem - terrible marketing and product presentation. Even I forget some of the features at times ;p.

Quote
Hmm, have to think about this a bit, cutting core is double edge sword .

Yes, though as I mentioned; more so for fewer cores. For systems with less than 4 logical cores, it probably isn't a good idea to go tweaking CPU affinities. For systems with 4 or more logical cores, assignment of CPU affinity can be really beneficial towards guaranteeing access to computational resources.
Software Engineer. Bitsum LLC.

edkiefer

Yes, I edited my post above .

I think it would be good to have a point on and off as you do what the app to run fast (whatever the app is ) unless its a badly coded app but work load type apps , Photoshop, video encoding etc things users starts , not system tasks .
Bitsum QA Engineer

Jeremy Collake

I've tried to generally exclude all system processes from ProBalance, but it turns out that many people have Windows components or services that they want ProBalance to act on. There are certainly many that should never be touched,  mostly those on which the rest of the OS or processes are serviced by.
Software Engineer. Bitsum LLC.

edkiefer

I am on win7 64bit but my comments on what I remember maybe partly from XP .

How would this work for a foreground app ,would you still want core dropping on this, I think not .

I don't have system processes set to be restrained .
Edit : ahh, I did have it set to, i excluded system services now .
Bitsum QA Engineer

Jeremy Collake

I moved this over to Team Bitsum for now, while I fumble around with improving things. I will restore it when I have better answers!
Software Engineer. Bitsum LLC.

BenYeeHua

Quote from: jeremy collake on June 17, 2013, 02:36:52 PM
I moved this over to Team Bitsum for now, while I fumble around with improving things. I will restore it when I have better answers!
Not a problem. :)
----
I think you "might" adding a function to ProBalance, when ProBalance detect the responsiveness under 50%, unload one of the core and restraint the foreground processes when it don't help(if the lag is caused by foreground processes). ;)

edkiefer

Quote from: BenYeeHua on June 18, 2013, 01:19:20 AM
Not a problem. :)
----
I think you "might" adding a function to ProBalance, when ProBalance detect the responsiveness under 50%, unload one of the core and restraint the foreground processes when it don't help(if the lag is caused by foreground processes). ;)
Thinking about this , how does the responsive meter measure ? (input lag? ) on any system overall or per process .
What I am driving at and have not tested for example you play some game, this 99% of time would be foreground as full screen is "mostly" default.
Now in game and way its coded response is good, no input lag or anything . but now say you alt-tab the game and run some other app, you might find it laggy a bit .
So not sure you should ever cripple or hold back foreground process, at least 90% of time IMO .

I have OT question with cpu priories, i/o, etc when app run . Does the app control this or does windows do it or both can .
reason I run the graphic app MSI Afterburner and by default having it run at startup I noticed it always below normal, an lower i/o but if I start it manually it comes up normal, was wonder what controls this the app or windows is doing something on its own .

PS: the app MSI AB is setup through task scheduler if that matters .
Bitsum QA Engineer

BenYeeHua

Quote from: edkiefer on June 18, 2013, 10:02:21 AM
Thinking about this , how does the responsive meter measure ? (input lag? ) on any system overall or per process .
What I am driving at and have not tested for example you play some game, this 99% of time would be foreground as full screen is "mostly" default.
Now in game and way its coded response is good, no input lag or anything . but now say you alt-tab the game and run some other app, you might find it laggy a bit .
So not sure you should ever cripple or hold back foreground process, at least 90% of time IMO .
So at least 10% Responsiveness? ;D
Game don't eating 100% CPU usage most of the time, so I think this issues don't come out.
Just try to playing a game, and switch out to check for Responsiveness.

And yup, most of the game will stop wasting CPU time to rendering after you switch out and run other app, so that lag will be the hard disk issue(as the Ram SuperFetch cache has been filled with game data.)
But it will be useful if the "Responsiveness" detection don't having any bug, and the accurate don't having issues. :)

Why I need to restraint the foreground process is because sometimes the foreground process will become CPU eater too, but normally we can "fix" it by switching to other windows and let it become background process and restraint by PL.
If I just untick that setting and let ProBalance start restraint foreground proess, untick the ignore all process without normal priority class, why not making it more smart with "Responsiveness"?(as some virus can setting themselves with higher priority.)

And we might also using "Responsiveness" to making that background process CPU eater getting more lower priority(Idle), or let it free one of the core/thread.
But we has to make sure it is accurate first, and it really means system is laggy. :)
QuoteI have OT question with cpu priories, i/o, etc when app run . Does the app control this or does windows do it or both can .
reason I run the graphic app MSI Afterburner and by default having it run at startup I noticed it always below normal, an lower i/o but if I start it manually it comes up normal, was wonder what controls this the app or windows is doing something on its own .

PS: the app MSI AB is setup through task scheduler if that matters .
Yup, Task scheduler is mostly using as background process, so they will getting lower Memory priority, and might be also i/o priority.
----
Yes, I checked the Task Scheduler, it did lower the i/o priority too, but you can set it back by using PL. ;)

edkiefer

Yes, I should of thought that out more, even games that use 4+ cores only end up using on avg "about" 50% of CPU and yes the graphic thread is the heaviest one .
Bitsum QA Engineer

BenYeeHua

Quote from: edkiefer on June 18, 2013, 01:01:36 PM
Yes, I should of thought that out more, even games that use 4+ cores only end up using on avg "about" 50% of CPU and yes the graphic thread is the heaviest one .
And this is very sad....
But I think with the PS4 Xbox One using that moar coar AMD, this situation will be reduced. :)
And we might playing game with Ultrabook SmartPhone in the future. 8)
----
Anyway, back to the Topic.
If "Responsiveness" is correct, we can using it to improve ProBalance. ;)

edkiefer

Quote from: BenYeeHua on June 18, 2013, 11:16:21 PM
And this is very sad....
But I think with the PS4 Xbox One using that moar coar AMD, this situation will be reduced. :)
And we might playing game with Ultrabook SmartPhone in the future. 8)
----
Anyway, back to the Topic.
If "Responsiveness" is correct, we can using it to improve ProBalance. ;)
Yes, but remember it not that game developers are lazy or stupid it the very nature of that type of app that it needs to wait on data from one thread completion to next to start another . you can only parallel so much . The only thing they can do really is add or do more computational data to use up more , like better physic's , more advance calculations of damage , flight models (weapons) etc .

Yes, lets see what Jeremy gets on his tests .

Bitsum QA Engineer

Jeremy Collake

After experimenting a bit, I've made some modifications to internal Responsiveness metric, and believe the CPU Eater now behaves quite a bit better. I'm still testing though, I need to try many more platforms. I've not yet released a version of Process Lasso with the change, but am uploading a new CPU Eater.

The end change is only an adjustment of the thread priorities.

Let me know how it goes for you, if you try; looking at it from the demo perspective, running with and without ProBalance enabled.

New CPU Eater:
32-bit http://bitsum.com/files/CPUEaterDist32.exe
64-bit http://bitsum.com/files/CPUEaterDist64.exe

Software Engineer. Bitsum LLC.

Jeremy Collake

And note that by 'thread priorities' I mean for the *responsiveness calculator* .. the CPU Eater threads run at normal priority.
Software Engineer. Bitsum LLC.

edkiefer

night an day .
My short test . I had Palemoon running , about 50 tabs in background .
I start cpueater (PL not running ) . I then repeat opening a PDF file , which takes long time to start, even 2nd time (good 30sec ). response meter is in the 25-55 & .
I then run PL and repeat above test, the PDF opens instantly and response meter is always/mostly 100%

This is on win7 64bit, 3570k @4.0ghz  and CPUeater was set to 12 threads .
Bitsum QA Engineer

BenYeeHua

Quote from: edkiefer on June 19, 2013, 06:59:25 AM
Yes, but remember it not that game developers are lazy or stupid it the very nature of that type of app that it needs to wait on data from one thread completion to next to start another . you can only parallel so much . The only thing they can do really is add or do more computational data to use up more , like better physic's , more advance calculations of damage , flight models (weapons) etc .
Yup, I know about this, but we can try to "Push" them to start using more thread for other thing.
If they can't get 60FPS as the main thread is blocking, I hope they can at least getting 30FPS with other effect on the game.
For example, motion blur, many player don't "feel" Crysis is lag when it is running with 15FPS only!!!
I think this is because they don't too sensitive on the FPS or Input Lag, and with the help of motion blur too.

Quote from: edkiefer on June 19, 2013, 01:38:36 PM
night an day .
My short test . I had Palemoon running , about 50 tabs in background .
I start cpueater (PL not running ) . I then repeat opening a PDF file , which takes long time to start, even 2nd time (good 30sec ). response meter is in the 25-55 & .
I then run PL and repeat above test, the PDF opens instantly and response meter is always/mostly 100%

This is on win7 64bit, 3570k @4.0ghz  and CPUeater was set to 12 threads .
Same, also 12 threads set as default, just testing the start time with Paint and AIDA64, scrolling the start menu.
I don't feel any lag or slowing down with ProBalance enable, but feel some lag without ProBalance(getting 53% Responsiveness), I think the responsiveness is more accurate than before with ProBalance enable.
It can be the responsiveness calculator calculate the wrong value(before the tweak on the 'thread priorities')? :)

PS:As I am sleepy, so I don't do much test with it, sorry about that.

edkiefer

Jeremy

I assume even though changelog didn't list you alter the response graph in PL GUI like you did with CPUeater ?

It stays 100% now
6.6.0.23beta
Bitsum QA Engineer

Jeremy Collake

#24
Thanks guys! I'm glad you also see it's working better.
Software Engineer. Bitsum LLC.

Jeremy Collake

I've fixed up the GUI in v6.6.0.27 beta (coming in a few minutes).

It is also a night and day difference in my testing so far. It runs the responsiveness calculator at the same priority as the CPU Eater. This means it has equally exact results, back to the way it used to be. Give it a try when it's released in a few minutes!

Very excited that this is fixed up.. and I hate myself for making this mistake to start with.
Software Engineer. Bitsum LLC.

edkiefer

ok , As I posted above it seemed that you changed PL graph after last update (not today) PL green response is 100% with probalance enabled running CPUeater .

Anyway updated to 27b and looks good .
one thing with 12 threads value set and probalance off PL graph stalls, fails to update a lot of time, but the statusbar of PL does update the values .
In other words after 60sec the graph is much shorter from left to right .
priority is above normal for PL so not sure but that is with probalance disabled so not biggy, system is heavy loaded with 12 threads .
If I set CPUeater to 5threads it just starting to affect graph with probalance off , with 4threads graph is fine but then response is 100% too .
Bitsum QA Engineer

Jeremy Collake

Thanks! That's no surprise, let me explain:

Responsiveness thread MUST run in a specific very low priority.
Previously the GUI was run in the HIGH priority class, and this prevents the responsiveness thread from running in that very low priority.
Now it is ABOVE NORMAL, which means it can get lagged, but the responsiveness thread is right.

Solutions:
1. Raise the priority of some other individual threads of Process Lasso may allow it to return its previous level of responsiveness and kill that lag.
2. Isolate responsiveness calculation in a separate process. I really don't want to do this.

Hopefully, with some tuning, I can get this right!

Quote from: edkiefer on June 18, 2013, 10:02:21 AM
Thinking about this , how does the responsive meter measure ? (input lag? ) on any system overall or per process .

This is a 'secret' I have not revealed. It's real simple. Real elegant. I just can't bring myself to reveal it :o. It's nothing complex though.

It's overall, not per-process. The monitoring thread (set at the right priority :o), basically reports how much responsiveness it can get. That's as best I can do without giving it away.

Quote
So not sure you should ever cripple or hold back foreground process, at least 90% of time IMO .

I may have misunderstood, but Process Lasso never does ... If a process is restrained, it'll be instantly restored as soon as it enters the foreground.

Quote
I have OT question with cpu priories, i/o, etc when app run . Does the app control this or does windows do it or both can .
reason I run the graphic app MSI Afterburner and by default having it run at startup I noticed it always below normal, an lower i/o but if I start it manually it comes up normal, was wonder what controls this the app or windows is doing something on its own .

Both can control it. The OS just uses defaults. When a process is launched by some component (e.g. Task Scheduler), it can inherit from its parent though, or sometimes have its priority set by its parent. Is that process launched by the Task Scheduler?

EDIT: Ok, I just made some adjustments to the primary thread's priority. I'll do some testing, but I think this will help the lag in high loads, and not affect the responsiveness calculation. It'll be in .27 beta. Best of both worlds I hope.

EDIT2: BTW, .27 was a database mistake that lasted for about a minute; the current is .25.
Software Engineer. Bitsum LLC.

edkiefer

Quote from: Persona Support on June 21, 2013, 04:58:39 PM
Thanks! That's no surprise, let me explain:

Responsiveness thread MUST run in a specific very low priority.
Previously the GUI was run in the HIGH priority class, and this prevents the responsiveness thread from running in that very low priority.
Now it is ABOVE NORMAL, which means it can get lagged, but the responsiveness thread is right.

Solutions:
1. Raise the priority of some other individual threads of Process Lasso may allow it to return its previous level of responsiveness and kill that lag.
2. Isolate responsiveness calculation in a separate process. I really don't want to do this.

Hopefully, with some tuning, I can get this right!

This is a 'secret' I have not revealed. It's real simple. Real elegant. I just can't bring myself to reveal it :o. It's nothing complex though.

It's overall, not per-process. The monitoring thread (set at the right priority :o), basically reports how much responsiveness it can get. That's as best I can do without giving it away.

I may have misunderstood, but Process Lasso never does ... If a process is restrained, it'll be instantly restored as soon as it enters the foreground.

Both can control it. The OS just uses defaults. When a process is launched by some component (e.g. Task Scheduler), it can inherit from its parent though, or sometimes have its priority set by its parent. Is that process launched by the Task Scheduler?

EDIT: Ok, I just made some adjustments to the primary thread's priority. I'll do some testing, but I think this will help the lag in high loads, and not affect the responsiveness calculation. It'll be in .27 beta. Best of both worlds I hope.

EDIT2: BTW, .27 was a database mistake that lasted for about a minute; the current is .25.
I think I posted it above, but yes it run from task scheduler .
yes, I am on .25b , I just saw .27 somewhere with update .
Bitsum QA Engineer

Jeremy Collake

Quote from: edkiefer on June 21, 2013, 05:32:01 PM
I think I posted it above, but yes it run from task scheduler .

Sorry, I am in one of my speed-read modes today :o. Most application developers probably haven't noticed the Task Scheduler child process low I/O and memory priorities, or in other cases, perhaps it's appropriate. Few applications change their own priorities. Process Lasso sets its own priorities (all), to resolve that issue with Task Scheduler child processes having low priorities.
Software Engineer. Bitsum LLC.

edkiefer

Quote from: Persona Support on June 21, 2013, 05:48:55 PM
Sorry, I am in one of my speed-read modes today :o. Most application developers probably haven't noticed the Task Scheduler child process low I/O and memory priorities, or in other cases, perhaps it's appropriate. Few applications change their own priorities. Process Lasso sets its own priorities (all), to resolve that issue with Task Scheduler child processes having low priorities.
Ok, I wasn't sure as I don't write code , the Dev of AB can be little funny answering questions  :)

It works fine FYI the app can set core clocks and fan profiles , it can also make vids and overlay graphic stat data on screen running your game .
Bitsum QA Engineer

Jeremy Collake

Yes, I believe I used MSI Afterburner for a while in the past.

BTW, if AMD CPU, have you tried AMD Overdrive? It'll work on any AMD system, and is awesome. You can create profiles for processes and such. It has control over *everything* (depending on the CPU model for some overclocking functions).
Software Engineer. Bitsum LLC.

edkiefer

No, I am on Intel Z77 chipset (Asus P8Z77V-PRO ) with a i5-3570k and Nvidia MSI 660ti PE/OC so nothing AMD here at the moment .

I built it around 9 months ago and very happy how it runs .
Bitsum QA Engineer

BenYeeHua

And I also using AB, as I need that OSD.
It is useful with the RivaTuner Statistics Server, other software like HWiNFO can provide the information with the OSD, just look up while you are gaming. ;)
Just so bad the dev don't has any plan to support 64-bit, but I think there might be more game providing the 64-bit version, as the Xbox One and the PS4 having HSA(Unified Memory) and larger Ram, so they need 64-bit to using more than 4GB. :)

PS:If you think it should be split, just split it to a new topic.