Author Topic: Can I make Programs use only one kernel on an SMP System?  (Read 10968 times)

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Can I make Programs use only one kernel on an SMP System?
« on: December 02, 2014, 08:13:36 pm »
I think I have read about this before, but can not find something..

Is it possible to "tell" applications to use just one core on a SMP System?

Here VPC for OS/2 is the "problem" - it runs fine when I add the Switch /MAXCPU=1 in config.sys but crashes when all 4 kernels run (as expected).

So - is there a way to configure something in/with Virtual PC to just let it use one core even if the Switch above is not in config.sys?

Thanks in Advance,

Sigurd

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #1 on: December 02, 2014, 09:29:58 pm »
Quote
So - is there a way to configure something in/with Virtual PC to just let it use one core even if the Switch above is not in config.sys?

C:\OS2\EXECMODE.EXE should do that, but you may need to do all of the EXEs and DLLs for virtual PC. Just do EXECMODE.EXE with no parameters for help.

Note, that it will still use all of the processors, but only one at a time after setting it for SP mode (Single Processor).

FWIW, VBox (version 1.6.1, for OS/2) uses all 4 cores, without a problem (for me). There are some other limitations.

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #2 on: December 02, 2014, 09:58:09 pm »
Hi Doug,

thanks, I just tried it, no success though. Please see attached Picture.

Do you have a clue what might went wrong?

And yes - Virtualbox is running with all cores so far.

« Last Edit: December 02, 2014, 10:00:08 pm by Sigurd Fastenrath »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #3 on: December 02, 2014, 11:49:17 pm »
What happens if you run it like
execmode -sp -d -v vpc.exe

Also don't forget you can use the CPU Monitor under Programs --> Utilities to turn off (and back on) processors rather then editing config.sys and rebooting.
« Last Edit: December 02, 2014, 11:52:34 pm by Dave Yeo »

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #4 on: December 03, 2014, 01:46:43 am »

Also don't forget you can use the CPU Monitor under Programs --> Utilities to turn off (and back on) processors rather then editing config.sys and rebooting.

Interesting, I didn't know that. I just tried and what I noticed was that after starting the cpu monitor program it defaulted to disabling core 2 thru 4 even though they were enabled before I started the program. I enabled them, closed the program, opened it again, and again only processor 1 enabled. Yet the help says: "Use this selection to change the status of the processor. The processor can either be online or offline. The default status is online. To change the status to offline, deselect the processor. "

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #5 on: December 03, 2014, 04:21:33 am »
Quote
Also don't forget you can use the CPU Monitor under Programs --> Utilities to turn off (and back on) processors rather then editing config.sys and rebooting.

That works, if you don't use a recent ACPI. If you do use ACPI, it will turn off the extra processors until the load gets high enough that ACPI turns them back on. The monitor will change that, until ACPI decides to change it again.

Quote
I just tried and what I noticed was that after starting the cpu monitor program it defaulted to disabling core 2 thru 4 even though they were enabled before I started the program

In fact, it is quite likely that ACPI had turned off  processors 2 through 4, and that is what the monitor found when it started. The monitor program is not compatible with ACPI (or, it could be argued that ACPI is not compatible with the monitor).

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #6 on: December 03, 2014, 05:13:09 am »
There is another small utility: setproc, which simply takes the numeric identifier of the core with either ON/OFF parameter...since I run 5 cores here and occasionally need to disable all but one I simpy have a little cmd file created:

@echo off
setproc 5 4 3 2 off

I have an icon for the OFF/ON cmd files in my WarpCenter tray, so the convenience is literally a click-away.

Sigurd:
Regarding the execmode changes, if I read your schreenshot correctly, execmode did NOT actually alter the binary mode...did you mean it to do that, just give you the info on the file?
« Last Edit: December 03, 2014, 05:14:40 am by Dariusz Piatkowski »

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #7 on: December 03, 2014, 07:37:01 am »
There is another small utility: setproc, which simply takes the numeric identifier of the core with either ON/OFF parameter...since I run 5 cores here and occasionally need to disable all but one I simpy have a little cmd file created:

@echo off
setproc 5 4 3 2 off

I have an icon for the OFF/ON cmd files in my WarpCenter tray, so the convenience is literally a click-away.

Sigurd:
Regarding the execmode changes, if I read your schreenshot correctly, execmode did NOT actually alter the binary mode...did you mean it to do that, just give you the info on the file?

Hi,

I wanted to change the files using the -sp switch but I guess the message means that it checks the file but can not change it due to something "Bad header". So it stopped before it changed something. Do not know what to do next. Will try the -d switch later on.

I have got the xcenter (not ecenter) running and with this I can switch of the kernels (as shown in my videos before via OS/2 MCP SMP Monitor) off and on and vice versa as often as I like. If these are "really" off - I can not say but the CPU Monitor does allways show all the kernels I do have - those switched off using 0%. That is the difference to /MAXCPU=1 -> this is showing only one entry in the XCenter. Using all kernel and switch off three of them does show all kernels, but three of them at 0%. (Please verify at the screenshot I attached before).

I did notify that switching of the kernels via OS/2 MCP CPU Monitor (I am using this instead of the eCS one) leads to a less head produciton and the fan therefore calms down. While switching the kernels back on the heat comes back.

Software:
OS/2 Warp 4.52 MCP2 Merlin
Latest ACPI 3.22.06
OS/2 SMP Monitor
QSINIT Loader

I think I will try the setproc utility and report if there is any change.

Still wondering what breaks the -sp switch with execmode on vpc.exe ....
« Last Edit: December 03, 2014, 07:40:18 am by Sigurd Fastenrath »

klaus

  • Guest
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #8 on: December 03, 2014, 06:18:37 pm »
Hi Sigurd,

have you tried markexe as Roderick told us on the OS/2 user meeting in Cologne. I have done this with VLC, and it seems to me it work more stable.

markexe MPUNSAFE vlc.exe

Markexe is on eCS CD2  under \TOOLKIT\OS2TK45\BIN>markexe.exe



Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #9 on: December 05, 2014, 09:11:29 pm »
Hi Sigurd,

have you tried markexe as Roderick told us on the OS/2 user meeting in Cologne. I have done this with VLC, and it seems to me it work more stable.

markexe MPUNSAFE vlc.exe

Markexe is on eCS CD2  under \TOOLKIT\OS2TK45\BIN>markexe.exe

Hallo Klaus,

thanks, I tried it but it unfortunately has no effect allthough the file has been changed (please see picture). Will try another way :-)




Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: Can I make Programs use only one kernel on an SMP System?
« Reply #10 on: December 06, 2014, 06:11:32 am »
Quote
Do you have a clue what might went wrong?

I was looking this over, again. It occurs to me that you may need to use LXLITE to unpack the files before using the commands to it run in single CPU mode. I think that
Code: [Select]
LXLITE /U+ fname.exe should do it (if it will work). Be sure to keep a good copy of the file.