Disabling core parking

Started by bertie97, August 10, 2012, 02:23:15 PM

Previous topic - Next topic

BenYeeHua

Yup, still not restore back to default parking setting.
And ParkControl showing the "enable/disable" correctly  :)
PS:After this function is repaired, I think the next one is silent update, when I gaming, it jump out and stole the focus :P

Jeremy Collake

I've been fiddling with that update dialog for a long while... every time I change it one way, I have one set of users who complain.. then change it the other way, and a different set of users complain, lol. I need to put some thought into it, but I will do so ;).

Am still working on the re-enabling of core parking, have to debug the issue since it should be working. Once complete, this version will go final. I wish I would have fixed ParkControl long ago :o. Took all of 1 minute.
Software Engineer. Bitsum LLC.

BenYeeHua

Because PL is getting update >1 times/week, and most of update time is not just like other rarely used software, when you starting it, it will showing update dialog.
But just like a ghost, scaring you(jumping a window) when doing other thing.
----
Maybe a bubble dialog(or just like after windows update need reboot to update file) in tray icon, showing that
"PL having a newer version, do you want to update it now or next time the computer reboot and auto update?"
(if behave like windows update, giving yes/next reboot)
And the "automatically keep PL up to date", changing it into silent update and showing a bubble dialog is better.
Like "PL having a newer version, it will auto update in 5 sec."

Just an opinion  ;)

Jeremy Collake

I will see what I can do. Like I said, gotta please everyone. For now, the safest thing to do is turn off updates, and check manually, or when you see an update via the RSS feed.

I am working on an entirely new update component anyway, so will likely not change the existing one until this is revealed. It will be much like other modern updaters, running independently of the software on a specific schedule by the Task Manager. Of course, I'll have to do some alternate methods for those still on XP.
Software Engineer. Bitsum LLC.

BenYeeHua

Not a gamer, so not affect so much.
Most people like to watching it is working, but not so much shine until it stole the focus.  ;)

Jeremy Collake

I found the cause of the parking re-enable bug. Simple typo. Testing now.
Software Engineer. Bitsum LLC.

Jeremy Collake

Ok, it has passed testing. I'm glad I worked on this anyway, as issuing a single change to the parking makes a lot more sense when multiple ProBalance events are occurring concurrently. Anyway, it tests well so far, and my builds put Process Lasso's ProBalance through some serious testing (as you can imagine), with 8 cores all launching multiple CPU bound processes over and over. Anyway, I do want to investigate how all the various features interoperate, and perhaps refine a few things. However, this build is a good improvement over the last, so is being built now.

Some of the things Bertie mentioned first put some of the possible complications into my mind ... using this feature with that feature, etc... In the end, Process Lasso requires a certain level of user sophistication to tweak, but not to 'simply use'. That's why I discourage changing the defaults unless people know precisely what they are doing.
Software Engineer. Bitsum LLC.

BenYeeHua

Still having some problem, sometimes it will fail to set core-parking correctly, whatever it is disabling or enabling.
Maybe making it set 2 times, or adding a delay on it?
QuoteIn the end, Process Lasso requires a certain level of user sophistication to tweak, but not to 'simply use'. That's why I discourage changing the defaults unless people know precisely what they are doing.
Yup, just like Windows  ;D

Jeremy Collake

#58
Hmm.. I am not sure. I will continue evaluating it here. My test environments normally put it through the wringer. It may [edit]does NOT[/edit] have something to do with a change of the active power profile, particularly if you are using Energy Saver. A change in the power profile during a ProBalance restraint could confuse it, and this may need a change. I will look into it ;). Of course, that is wild speculation, and it should be working right..
Software Engineer. Bitsum LLC.

BenYeeHua

Nope, I not using anything that auto changing the power plans.
If they are changing, the factory software will showing the changing logo  ;)
---
Try testing it with short-time(<5/10 secs), can produce it more faster

Jeremy Collake

Yes, I later evaluated the code and found I had of course handled this condition.

Therefore, the cause must be something else. I will likely find it in extended testing, or perhaps just continued thought ;). A quick toggle is coming soon too I think, so that you can know the state, and change it.
Software Engineer. Bitsum LLC.

danlock

With reference to the auto-update window/no window debate and toggling:


The initial install/change install options menu could include a checkbox/toggle switch that asks, "Would you like a window to pop up on your screen when Process Lasso updates to a new build? If you don't check this box, it will do so silently (in the background). You will be able to toggle the "Show window when updating/background updating" option in the Updates menu after installation completes, so don't worry if make a choice here that you want to change."


That will, of course, require the inclusion of that toggleable option, however you want it to read, in the Updates menu if you do it the way I've just described.


I hate the XP scheduler, never use it, and regularly remove or disable tasks that insert themselves into the scheduler (the Task Scheduler service itself is set to "Manual start" on my system (not the Automatic Updates notifier, the Task Scheduler)), so I'm happy to see that you're aware of needing to do it a different way on XP.


BenYeeHua

I forgot the install optional setting
Thank  ;)
----
QuoteI hate the XP scheduler, never use it, and regularly remove or disable tasks that insert themselves into the scheduler (the Task Scheduler service itself is set to "Manual start" on my system (not the Automatic Updates notifier, the Task Scheduler)), so I'm happy to see that you're aware of needing to do it a different way on XP.
You should type as XP Task Scheduler, as scheduler can be windows scheduler
https://en.wikipedia.org/wiki/Scheduling_%28computing%29
QuoteIn computer science, scheduling is the method by which threads, processes or data flows are given access to system resources (e.g. processor time, communications bandwidth). This is usually done to load balance a system effectively or achieve a target quality of service. The need for a scheduling algorithm arises from the requirement for most modern systems to perform multitasking (execute more than one process at a time) and multiplexing (transmit multiple flows simultaneously).
And this is why PL is need for us ;)

And I hate some software adding the task also, I don't like them checking update when I rarely using them, I just check the update with a "Software manage" and update them when I need them  :)

Jeremy Collake

#63
I will be uploading a second build of .98 it looks like, to address a secondary problem with the preservation of the parking settings when set to disable during ProBalance. I am pretty confident this is the culprit, and the build has only been out a few minutes. If it passes automated testing, I'm just re-uploading and re-issuing it. I wish I would have caught it 5 minutes ago, instead of while I was uploading .. but at least I caught it. Note that what we are talking about doesn't affect anyone who doesn't use the ProBalance option to disable CPU core parking during ProBalance events.
Software Engineer. Bitsum LLC.

Victek

This thread about core parking is intriguing, but somewhat over my head.  It would be great to have an explanation of core parking on the Process Lasso webpage (or somewhere :-) ) that explains in layman's terms what it is and the pros and cons of using PL to adjust it.  At the moment I'm not sure which way to go.

Jeremy Collake

#65
Honestly, for most people concerned with performance, you should disable CPU core parking. It is more for energy savings than anything. The scheduler already tries to avoid core thrashing (the other thing it helps with). So, it comes down to that simple recommendation ;). ProBalance has a feature (what I have been fixing here) to disable core parking while ProBalance is active. However, you can also change the parking setting for specific power profiles. In the end, Process Lasso can control it any number of ways. Please see ParkControl (Options / Power) for more information.
Software Engineer. Bitsum LLC.

Jeremy Collake

@BenYeeHua: Ok, the final .98 is out now. I believe this will be ok for you. It has done well for me in LOTS of testing so far... And I definitely did fix one possible cause for such a loss in the settings, no question about that. The first build didn't exist very long, so I don't think anyone will mind. Again, any reader who did get that first build will get an update notification in 'Check For Updates'.
Software Engineer. Bitsum LLC.

BenYeeHua

Just testing it 5 mins, and it is working.
I will testing it 1 day to checking that it is working without problem or not  ;)
Just a question, when the computer shutdown/PL is having a update/PL process is end task while ProBalance is restraint, what will happen to core-parking setting?
Will it restore core-parking to default setting next time the PL is start or?

bertie97

Gratifying as it is to see my original question blossom into the monstrous triffid I see before me...  ;)

I am still kinda wondering about the 0-50-100% gradations, what was 0 again?  Allow ''all'' to be parked?
:)

Phil

#69
Quote from: bertie97 on August 31, 2012, 06:06:40 AM
Gratifying as it is to see my original question blossom into the monstrous triffid I see before me...  ;)

I am still kinda wondering about the 0-50-100% gradations, what was 0 again?  Allow ''all'' to be parked?
:)

The percentage box indicates the amount of activity your cores will surmount during high CPU usage. For instance, if you want 75% of your cores to be active while the other 25% remain unparked, type in 75 in the box. bitsum.support referred to this in an article on how to manually disable core parking here: CPU Core Parking

bertie97

Thanks I'd missed that bit of documentation  ::)

Jeremy Collake

#71
And for the record '0' is considered an invalid value (as all cores can't be parked) and thus causes a return to default (which varies) maximum parking (all but one physical core).
Software Engineer. Bitsum LLC.

bertie97

Quote from: bitsum.support on August 31, 2012, 12:57:01 PM
And for the record '0' is considered an invalid value (as all cores can't be parked) and thus causes a return to default (which varies).

& that would be the missing piece of the puzzle. 
I had considered that all cores parked would be equivalent to a 'sleep' state.  Feeling this was potentially illogical given the options, I was moved to seek answers - so thanks are in order   ;)

Jeremy Collake

#73
I am glad you brought this up, because this is a deficiency in ParkControl. I need to clearly explain what '0' would do.
Software Engineer. Bitsum LLC.

Jeremy Collake

#74
Ok, I need to amend my statement above. After cursory testing in NT 6.2, a value of 0 will allow parking of all but one physical core - since at least one physical core *must* remain active. So, instead of 'default', I should have said 'maximum parking'. The actual scheduler behavior regarding parking needs further analyzed and documented, as well as any changes that have been made between NT 6.0 to NT 6.2, and any differences between processors.

In short, I'm on it. Microsoft kind of sprung this on everyone without much documentation. It was originally designed mostly for servers needing to save energy and reduce thermal emissions, but later proliferated onto all PCs (likely with saving the environment in mind). While it also theoretically can have a positive effect on core thrashing, the scheduler already avoids core thrashing, so I am skeptical it has any additional impact on core thrashing.
Software Engineer. Bitsum LLC.

Jeremy Collake

#75
And while it seems logical to 'park' cores that aren't in use, there *is* a very pronounced effect on performance I and others have benchmarked. Why? Because although unparking the core is fast, it is not instant. And it takes the slightest delay to cause an effect on performance and/or responsiveness. The largest issue, I believe, is how aggressively Windows parks cores. Once enabled, you'll see it immediately start parking cores, even if the total CPU load is as high as 50%. If it were to be more conservative, its effect on performance would be less. There is actually an undocumented power profile configuration setting that appears to control the aggressiveness of the parking, but information on it is not available, so we are only left to guess what it might affect. It wasn't added for no reason, so I suspect Microsoft identified this problem ... but for *some* CPUs, it is still far too aggressive with its parking. So, one thing on my todo list is to reverse engineer what this setting does, and continue research on CPU parking in Windows on various CPUs, and the effect of such.
Software Engineer. Bitsum LLC.

BenYeeHua

QuoteI still have more tests to run to determine if 'maximum parking' is the default
QuoteSo, one thing on my todo list is to reverse engineer what this setting does, and continue research on CPU parking in Windows on various CPUs, and the effect of such.
I waiting for this also  ;)
It is a secret for us, just like the TCP auto-turning, SuperFeteh etc
Quoteso I am skeptical it has any additional impact on core thrashing.
I wanna asking this, what is the affect of core-parking when having the fake-core?
What time the fake-core will helping the most?
Full load, or little load on CPU?
As I know, HT is reduce the idle time of CPU while it can grab the resources from other thread(on real-core).
With more time with a thread, but decrease the total time for a jobs with multi-threads software.
----
For example: when having 4 threads software(winrar), it decreasing the performance as most time the threads is on the fake-core, because core-parking has parking only 1-3 fake core, so the time to let the threads reach the real-core is need for some time. And it cause 2 threads of winrar is fighting in 1 core  ;D
----
And, did the fake-core putting less threads than real-core if core-parking is disable???

Jeremy Collake

#77
The scheduler avoids logical (fake) cores by default to the maximum extent it can. When it does put a thread on a logical core, it tries to move it to a physical core as soon as one is available in the next time slice. It knows to avoid them.

So, to answer your question (I think), you will *not* get in a situation where somehow the physical cores got parked, leaving only those low-performance hyper-threaded cores available.

BUT, it could be that having too few physical cores available could cause performance degradation, but in theory Windows should unpark these cores immediately when this situation arises. The inability for it to do so quickly enough, or anticipate the CPU utilization needs, and then the aggressiveness at which it tries to re-park cores I believe is the performance issue.
Software Engineer. Bitsum LLC.

Jeremy Collake

[edited] - as always. I am sorry, sometimes I have trouble understanding what you are asking, but then I eventually figure it out. Your concern was if only one physical core was left (with 2 logical cores on it), that the scheduler would only use that one real physical core, instead of waking up the other real physical cores for maximum performance. In theory, Windows shouldn't be that stupid. My opinion as to why this has such a big effect on performance is in the last paragraph above and instead involves the aggressiveness of CPU Parking by Windows. I mean, if you watch it, it wants to park them *quick*. This results in a high frequency of sleep/wake cycles.
Software Engineer. Bitsum LLC.

BenYeeHua

Quoteit wants to park them *quick*. This results in a high frequency of sleep/wake cycles.
Ok, I understand it now, but how about this?
4 real-core unparked, but the first core of the fake-core also unparked.
Without the core-parking is parking/unparking(active).
So what will happen to the performance to 1(and 4)thread(s)?
Increase or decrease?

Jeremy Collake

I do not know. It depends on how smart the scheduler is, and the CPU type (e.g. an AMD logical core is much more like a physical core than an Intel hyper-threaded logical core). Not very helpful, but it is hard for me to guess what the impact might be in such a situation. It would also depend on what software is running on the PC, its needs, etc...

In other words, too many variables for me to try to guess... but I can make something up if you prefer ;p
Software Engineer. Bitsum LLC.

BenYeeHua

Ya, the HT is not perfect, while it reduce the idle time of the core, it also grab the resource from the thread on real core.
And the AMD is reverse, it grab the resource of an office(module), like L2 for example.
----
Why we get a slower fix of scheduler for Bulldozer in Windows, but more quickly in Linux?

Jeremy Collake

Quote from: BenYeeHua on August 31, 2012, 06:06:41 PM
Why we get a slower fix of scheduler for Bulldozer in Windows, but more quickly in Linux?

Because *any* adjustment to the Windows scheduler requires extensive testing, as it might change the behavior of legacy software, especially enterprise software running on servers, or real-time systems. Linux, on the other hand, always has the capacity to change more rapidly, caring very little about legacy support. Further, with linux, being open source, you can choose which scheduler you want to compile into your kernel, if you are an advanced user. Mostly though it is about legacy support. The entire linux community is very against maintaining support for legacy applications and systems, they toss them out so fast I can't keep up at times. For instance, changes in the GCC compiler sometimes breaks projects I work on, and I must adjust them to handle the new compiler. Microsoft maintains legacy support not by choice necessarily, but out of customer demand. As soon as they go change anything, they have revolts. Therefore, anything they do change, especially something at that level, must at the very least go through extensive testing. It is also less risky to simply not change it, and allow a performance penalty.
Software Engineer. Bitsum LLC.

Jeremy Collake

As I mentioned, I have begun additional research on core parking, but the results won't be available for a while. In the interim, the things we can agree on are:

1. Windows is too aggressive in its CPU Parking.
2. This problem is more prevalent on certain processors (both AMD and Intel).
3. The electrical and thermal savings are modest given the pre-existing per-core frequency and voltage scaling technologies already in existence.
4. When disabling CPU Parking, I strongly recommend using ParkControl or Process Lasso's ProBalance over manual registry edits. They do it the 'right way'.
5. Any beneficial impact on a reduction in core thrashing has not been demonstrated, to my knowledge and experience.
6. Too little information and guidance has been provided by Microsoft.

I will release a compiled list of default parking behaviors of Windows on various systems as soon as it is available. The utilities used to collect this information must be developed, and may be of benefit to our users in determining the proper level of CPU Parking, or potentially the aggressiveness at which is applied (the mysterious new setting I alluded to).
Software Engineer. Bitsum LLC.

Jeremy Collake

... and what I've done (just now) is add a 'slider control' to ParkControl, as a compliment to the confusing integers. The fact that Microsoft made the integers inverse of what is intuitive makes this a necessary addition. That way you can slide it from minimum parking (100) to maximum parking (0).
Software Engineer. Bitsum LLC.

BenYeeHua

QuoteThe entire linux community is very against maintaining support for legacy applications and systems, they toss them out so fast I can't keep up at times.
Agree.

Quote4. When disabling CPU Parking, I strongly recommend using ParkControl or Process Lasso's ProBalance over manual registry edits. They do it the 'right way'.
And reduce the time to showing the setting in Power Plans and changing by open Power Plans-advanced etc.....
----
Quote5. Any beneficial impact on a reduction in core thrashing has not been demonstrated, to my knowledge and experience.
I think if the L2/L3 cache is high latency until it is no enough time for it to cache, with the time the thread is processing.
Or the L2/L3 is having less read/write speed(If I recall right, the things can affect on L3 is read/write speed and the storage space)
Then it maybe getting less performance in core thrashing.
----
Quote6. Too little information and guidance has been provided by Microsoft.
Yup.
----
QuoteI will release a compiled list of default parking behaviors of Windows on various systems as soon as it is available. The utilities used to collect this information must be developed, and may be of benefit to our users in determining the proper level of CPU Parking, or potentially the aggressiveness at which is applied (the mysterious new setting I alluded to).
And the problem is, how many time is needed  ;)
----
Quote... and what I've done (just now) is add a 'slider control' to ParkControl, as a compliment to the confusing integers. The fact that Microsoft made the integers inverse of what is intuitive makes this a necessary addition. That way you can slide it from minimum parking (100) to maximum parking (0).
As it is confusing, because they think it is"how many core it can be parked", not "how many core it can be un-parked"   ;)

bertie97

Quote from: bitsum.support on August 31, 2012, 08:37:38 PM
... and what I've done (just now) is add a 'slider control' to ParkControl, as a compliment to the confusing integers. The fact that Microsoft made the integers inverse of what is intuitive makes this a necessary addition. That way you can slide it from minimum parking (100) to maximum parking (0).

That will be a nice touch.  :)
Guess I have opened a can of worms again, if it's not the 0s it's the 1s  :P

BenYeeHua

Quote from: bertie97 on September 01, 2012, 11:02:54 AM
That will be a nice touch.  :)
Guess I have opened a can of worms again, if it's not the 0s it's the 1s  :P
This is true for 2-bits world  ;)

Jeremy Collake

The sliders are really cool, will try to release new ParkControl today. Much easier to use. One for AC, one for DC.
Software Engineer. Bitsum LLC.

Jeremy Collake

I cleaned up the About CPU Parking page *some*, though further works needs done. It is still a lot better than it was.
Software Engineer. Bitsum LLC.

Jeremy Collake

.. and the new slider controls I was referring to. I haven't yet completed the code, want to make sure it is all right before I release.
Software Engineer. Bitsum LLC.

bertie97

Looking good.

Feeling quite spoilt by all these updates.  How will I cope when PL is perfect?!   :)

Jeremy Collake

It will never be perfect, nor complete ;p. Trust me, my todo list I think has over 1K items, lol.
Software Engineer. Bitsum LLC.

BenYeeHua

Quotemy todo list I think has over 1K items
Just like this.
I having 5 thing that haven done yet today, so I add into todo list.
And the next time I try to finish the todo list, but I only finish 2 of it, and the today works I haven done, so I add into todo list also.
Repeat and repeat...
This is my life, lol
But one days, I feel great, so I finish all the todo list, and it start repeat again the next day...
----
And the UI look great  ;)

Jeremy Collake

Yes, that is how it happened to me too ;p.

BTW, I have fixed and changed a number of things today, and some of the new ParkControl sliders I'm still working on. Therefore, it *might* be possible a beta is issued with the new sliders temporarily non-visible. However you will know they are going to show up shortly.

One of the things I've done is restored the CPU Eater demo to within the installer. I stupidly forgot that I allowed it to be launched from within Process Lasso, hence users would see an error when trying to launch it from within Process Lasso.

Another modification allows launching Process Lasso again when it is already running, but not having to see a UAC elevation prompt just to have the old instance invoke its main window.
Software Engineer. Bitsum LLC.

BenYeeHua

QuoteTherefore, it *might* be possible a beta is issued with the new sliders temporarily non-visible. However you will know they are going to show up shortly.
That fine, as I has facing this before when using other software.
QuoteI stupidly forgot that I allowed it to be launched from within Process Lasso, hence users would see an error when trying to launch it from within Process Lasso.
And how about when you coding the New Updater.
6.Can download advanced tools software (CPU Eater)when running it from PL
So user can getting it back when clicking on it(if you remove it again).  ;)
----
QuoteAnother modification allows launching Process Lasso again when it is already running, but not having to see a UAC elevation prompt just to have the old instance invoke its main window.
UAC is not enable in this computer.  :)
And I know the risk.

QuoteYes, that is how it happened to me too ;p.
And this is life.  ;D

Jeremy Collake

I am not sure of your question about the CPU Eater and updater, but the auto-updater will restore it if missing from the current install. I could have users download and run it 'on demand', but it is so small, I might as well just include it in the package. I don't know what I was thinking when I removed it. I guess I figured most users used the stand-alone version, and I have so many menu items I forgot I added one to launch CPU Eater from within Process Lasso.

I released a beta to start testing some changes. The new ParkControl changes I had to hide because they are not yet finished. You can tell where they are hidden though ;).

The new launcher is also not ready because I must rewrite some mechanisms due to system security of unelevated processes communicating with elevated processes. I further have to do extensive testing in multi-user environments.
Software Engineer. Bitsum LLC.

BenYeeHua

Nice hiding  ;D
----
That what I mean, but I love to having the CPU eater when I download the Installer.
Because when you making it 'on demand', more codes is waiting for you.

And I recall that, the on demand downloading data is useful for some 2d online game.
Like HTML5/flash game for example  ;)
----
QuoteThe new launcher is also not ready because I must rewrite some mechanisms due to system security of unelevated processes communicating with elevated processes. I further have to do extensive testing in multi-user environments.
And the problem is ghosting the Flash Player also  ;D

Jeremy Collake

ParkControl has been updated. It is a bit early, hot off the presses. Please let me know if you experience any troubles. http://bitsum.com/about_cpu_core_parking.php
Software Engineer. Bitsum LLC.

bertie97

Have just installed the update to x.1.5
Noticed my sliders are slightly obscured in comparison to your ss.
Purely cosmetic issue I guess.

The radio buttons - as in the ss - neither shown as active.  Correct state?

Beyond that I must thrash the system a bit to see if anything important occurs.  ;)