Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-41211: What is the Difference Between CPU Threads and adclient Threads?

Authentication Service ,  

30 September,20 at 03:51 PM

Question:
  
What is the difference between the threads that allow a CPU to do simultaneous multithreading, and the threads that adclient uses that are defined in the /etc/centrifydc/centrifydc.conf file?
  
i.e.
adclient.clients.threads: 4
adclient.clients.threads.max: 20

Answer:
  
 A CPU has a number of threads of execution that are defined in the kernel and largely based on the number of CPU cores.  Hyperthreading is based on virtual core.  These threads are simultaneous units of execution and are orthogonal to adclient threads.

The adclient has threads of execution which represent the tasks within a given adclient process that can proceed simultaneously.  There is a logical consistency to the task itself.  These processes include main, background, group policy worker, etc.  They are scheduled by the operating system and given to a CPU core (or thread) to actually execute.  If no CPU thread is available, the tasks must wait for the resource.  The CPU core thread assignments are managed exclusively by the host operating system.

The adclient threads are defined in
/etc/centrifydc/centrifydc.conf.  The default values are shown below.
  
adclient.clients.threads: 4
adclient.clients.threads.max: 20

  
This configuration means adclient will launch 4 worker threads when it first starts up. This value is considered the low water mark (LWM).  Adclient will then dispatch units of work to those worker threads.  When all 4 are busy, adclient will allocate additional threads until it reaches the maximum 20.  If there is still more work to be dispatched, the task will wait for the next available thread to be freed up.

As tasks are completed and there are no tasks waiting for the threads, the extra threads are released until the number of threads reaches the LWM.

So it is entirely possible for adclient to have hundreds of threads where the CPU may only have 8 or 16 core threads.  There is no correspondence between CPU threads and adclient threads.

  

 

 

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.

Related Articles

No related Articles