CPU Affinity

In setting the CPU Affinity in the setup wizard, when I have over 10 cores, the assignment does not come out right.  CPU 0 and 1 are good, and then 10 becomes 2, 11 becomes 3, and then  the next is 2, it comes out  as 4, 3 becomes 5.

This is on 2018R2 through 2020R2

I think I'm up to date on the updates, but is there something I am missing?

Parents Reply
  • It is definitely a bug in the UI. There shouldn't be any problem for you to edit the citect.ini directly and set the correct affinity you require.

    Just out of interest, why are you using CPU affinity? It isn't usually required as setting to "all" allows the OS to manage and distribute the load across the CPU cores efficiently.

Children
  • I have found that if there are a lot of processes running, things are much faster if the affinity is set. I'm not sure that crossing the CPU's helps much in getting things to work smoothly.  I think if you have four processes, it's not a big deal.  If your clustering gets to have more than 16 processes, it really helps..

  • It may depend on the project. I upgraded a customer's servers to Citect 7.40 a number of years ago. Their project Cicode was not compatible with multi-process mode so it was running as a single process on a single CPU/core. The new alarm server in 7.30/7.40 required more resources and bogged down one core at 100% (with the other 15 or so cores near 0%) and would eventually crash because it couldn't keep up. I enabled all cores in the Computer Setup Wizard, and it spread the CPU usage across all the cores and ran fine with under 10% usage on each.

    I've heard people say the runtime can't use multiple CPUs/cores in single process mode. However, just running the Example project in single-process mode, Windows Task Manager reports about 186 threads for the single Citect32.exe process.

    You might get more efficient processing out of the CPUs if each task is bound to a single core, but if you're mainly concerned about the Citect runtime getting all the CPU time that it needs, enabling all cores is usually a good idea. Enabling multi-process mode in the Wizard is also recommended.

    I have heard of a system where an OPC server was using a lot of CPU because of a bug, and couldn't keep up unless they dedicated one core to the OPC server, with Citect only using the other cores.