CPU affinity questions

Post Reply

Topic author
garyrevell
Active Contributor
Posts: 38
Joined: Thu Nov 19, 2020 7:15 am
Reputation: 0
Location: Basingstoke, UK
Status: Offline
Contact:

CPU affinity questions

Post by garyrevell » Fri Oct 15, 2021 7:49 am

Hi all,

We've got a legacy system that runs VSI I64VMS OPENVMS V8.4-2L1 on an OpenVMS cluster and with the following CPU config:

Code: Select all

XXXXX (VMS2) $ show cpu/all

System: VMS2, HP Integrity BL860c i4  (1.73GHz/20.0MB)

CPU ownership sets:
   Active               0-7
   Configure            0-7

CPU state sets:
   Potential            0-7
   Autostart            0-7
   Powered Down         None
   Not Present          None
   Hard Excluded        None
   Failover             None
XXXXX (VMS2) $
So this tells me that we have 8 CPUs, is this correct? Or do I have to consider it in another way?

Many years ago we used to run the app on VAX/VMS with, I believe, only one CPU and a design decision then was taken to use the sys$process_affinity system service to set the affinity to CPU 0, and this now appears to be a bottleneck, and that the other 7 CPUs are not being used.

If we were to make changes such that some of the executables were to set affinity to other CPUs, do you see any potential problems? At the moment we're looking at possible changes to stop some of our processes hogging the CPU at 75%+ sometimes.

I'd really welcome any comments, caveats. I can provide more info as needed.

Thanks!

Gary

User avatar

arne_v
Master
Posts: 299
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: CPU affinity questions

Post by arne_v » Fri Oct 15, 2021 11:55 am

I am not an expert in Itanium hardware, but I believe that box must be a 1s4c8t system aka 1 socket, 4 cores, 8 threads (2 threads per core due to hyperthreading).

I think the key question is: why was that CPU affinity set originally?

Utilizing all VCPU will increase concurrency. If those applications were all well written then it should not be a problem. But impossible to say based on information available whether there will be a problem.

Unless the code base is small enough to effectively review for concurrency problems, then I think research of why it was done originally is the way to go.
Arne
arne@vajhoej.dk
VMS user since 1986

User avatar

imiller
Master
Posts: 130
Joined: Fri Jun 28, 2019 8:45 am
Reputation: 0
Location: South Tyneside, UK
Status: Offline
Contact:

Re: CPU affinity questions

Post by imiller » Mon Oct 18, 2021 11:56 am

That server has Intel® Itanium® 9520 1.73GHz/4-core/20MB/130W Processor. You could have two processes thus giving the 8 cpu that you see or you could have hyperthreads switched on with one processor which would give 8 CPUs.

If you

$ run sys$test:HTHREADS.EXE

Then this will tell you if hyperthreading is switch on or not.

You don't want an application setting affinity to CPU 0 as that CPU is always used for certain internal functions by OpenVMS and you may have device drivers assigned to that CPU as well [ see SHOW FASTPATH ].

If your application requires being run on only one CPU then choose a different CPU. I suggest CPU 7 [ if no hyperthreads ] or CPU 3 if hyperthreads are enabled. By default device drivers tend to use lower numbered CPUs.
Ian Miller
[ personal opinion only. usual disclaimers apply. Do not taunt happy fun ball ].

Post Reply