Author Topic: ProBalance - CPU affinity isn't restored when restraint is over [FIXED]  (Read 6117 times)

Offline abe5

  • New
  • *
  • Posts: 1
Process Lasso v6.7.0.0 64-bit
Windows 8 Pro 64-bit
AMD Athlon II X2 250 (Dual core CPU)

In ProBalance Settings, I've selected the option of changing the CPU affinity of a restrained process. "Reduce CPU affinity by one randomly selected processor"
During restraint, the affinity is reduced, but later on, it isn't restored back to 2 CPUs. (Even when the previously-restrained process is brought to foreground)
Only its priority is restored. The same goes for all processes.

This bug has been bugging me. I hope it'll be fixed soon. Thank you.  :)
« Last Edit: December 23, 2013, 04:36:52 PM by jeremy collake »

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5411
  • Gender: Male
  • The Lasso
    • Bitsum
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #1 on: October 15, 2013, 10:44:25 AM »
Thank you for reporting this, and I apologize for the delay.

I am investigating this immediately and will report back.
Software Engineer. Bitsum LLC.

Offline smartbit

  • Member
  • ***
  • Posts: 47
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #2 on: November 24, 2013, 03:59:30 PM »
I also always get this behavior.

I use the same option "Reduce CPU affinity by one randomly selected processor".
When restrain ends - priority restored, affinity remains limited

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5411
  • Gender: Male
  • The Lasso
    • Bitsum
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #3 on: November 30, 2013, 11:22:12 PM »
I've applied a fix as of 6.7.0.11 beta, releasing shortly.
Software Engineer. Bitsum LLC.

Offline smartbit

  • Member
  • ***
  • Posts: 47
Great, Thanks!

Offline smartbit

  • Member
  • ***
  • Posts: 47
Hi,
I finally had time to do some verification on this, and it's not actually working:

Let say, I start a process with default settings (4-core CPU in example): occupy 0-3 cores , priority Normal
Then, while it get restrained, it gets: 1-3, Below Normal
Restrain ends: 1-3, Normal
Restrained again: 0-2, Below Normal
Restrain ends: 0-2, Normal
Restrained again: 0-1;3, Below Normal
Restrain ends: 0-1;3, Normal

So, a you can see:
1 - The affinity is not restored.
2 - Upon another restrain, the affinity is limited again by randomly reducing 1 (new) out of 4 cores
Which, I suppose, is also not correct, since instead of reusing the 3 cores (thus being already restrained by 1 out of 4), it has to transfer the process from one core to another, just to find itself with the same resources in the end.

(maybe here are the traces of the modifications done for the fix, as PL treats the unrestrained processes as ones having original, full affinity)

Edit: tested on Process Lasso v.6.7.0.14, engine: v.810600

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5411
  • Gender: Male
  • The Lasso
    • Bitsum
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #6 on: December 05, 2013, 12:56:10 AM »
v6.7.0.15 beta should actually work. Sorry about the initial mis-fix!
Software Engineer. Bitsum LLC.

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5411
  • Gender: Male
  • The Lasso
    • Bitsum
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #7 on: December 06, 2013, 06:15:03 PM »
I also do acknowledge the second part of this issue, where the affinity isn't selected from the existing affinity. I'll work on that, though tests so far confirm that the new beta is at least restoring the CPU affinity correctly.
Software Engineer. Bitsum LLC.

Offline smartbit

  • Member
  • ***
  • Posts: 47
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #8 on: December 07, 2013, 06:39:48 AM »
Good to hear on the progress  ;)

Will test it again with the next release, once it is ready.

Offline smartbit

  • Member
  • ***
  • Posts: 47
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #9 on: December 11, 2013, 07:10:15 AM »
Hi,
I tested it briefly with the beta build 21:
The affinity seems to be restored fine this time.

Though, I'll make do some more and deep testing once the fix will hit the stable update stream, and report back here.

Offline smartbit

  • Member
  • ***
  • Posts: 47
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #10 on: December 13, 2013, 06:15:18 PM »
As I promised, I tested it for a while with the latest stable build 28:
- Seems to be good, the process affinity is restored properly!

So, I think there is another issue that can be marked as fixed/validated  :)

Offline BenYeeHua

  • Member#
  • *****
  • Posts: 2232
  • Gender: Male
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #11 on: December 14, 2013, 03:45:26 AM »
Good to hear about that, remember to report if you found any new bug. ;)

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5411
  • Gender: Male
  • The Lasso
    • Bitsum
Re: ProBalance - CPU affinity isn't restored when restraint is over
« Reply #12 on: December 23, 2013, 04:36:43 PM »
Thank you for reporting back smartbit!

Software Engineer. Bitsum LLC.