How to calculate engine.queue.size, engine.session.max and logical processors in Spotfire TERR service

How to calculate engine.queue.size, engine.session.max and logical processors in Spotfire TERR service

book

Article ID: KB0070838

calendar_today

Updated On:

Products

Spotfire Server

Description

When running services like TERR, Python, and R on the Spotfire Node Manager you may want to customize the service configuration as to what are logical processors, how to calculate logical processors, and how to set and calculate engine.queue.size and engine.session.max and what will happen if you do not set it.

Issue/Introduction

This article outlines about what are logical processors, how to calculate logical processors, and how to set and calculate engine.queue.size and engine.session.max and what will happen if you do not set it.

Resolution

If your CPU is capable of hyperthreading,  each core can handle two threads so that an 8-core CPU will have 8 * 2 = 16 logical processors.
You can go to the task manager click on the performance tab and check the logical processors/ virtual processors count. PFA screenshot.
Note:
  • Virtual Processors on the virtual machine are not always the same as the logical processors (it’s a physical processor TimeSlot that will be given to the virtual machine). Please refer to the attached referenced link for more info.
  • In Linux OS, the CPU(s) value indicates the number of logical cores i.e. logical processors. the "lscpu" command displays the result.
task manager

Here's the method to calculate the engine queue size and session max,
  • default engine.queue.size should be 4 ( 0.25 * 16 logical processors), i.e. one-quarter of the number of logical processors on the host as per the document.
  • default engine.session.max should be 15 (16 logical processors -1), It is the capacity that you see on the "Monitoring and Diagnostics".

The total number of engines that can run simultaneously is the sum of engine.session.max + engine.queue.size. i.e. 15+4 = 19.
You can think of engine.queue.size as a pool of pre-warmed idle engines which are assigned when a new (engine) session is created so it is a balance of inflow of new sessions vs "engine warmup time".

If you do not set these values, the services will take the default values based on the logical processors you have on the server machine.
The "Capacity" option you see in the Python/ TERR/ R Service Instances is the engine session max in "Monitoring and Diagnostics", PFA screenshot.
Service instance capacity
Note:  Similarly, the same calculation method is used for the R, TERR, and Python services. Please refer to the reference documents links attached.

Additional Information

Doc: Custom TERR configuration properties Doc: Custom R configuration properties  Doc: Custom Python configuration properties  External: Virtualization: Processor, Core, Logical Processor, Virtual Processor

Attachments

How to calculate engine.queue.size, engine.session.max and logical processors in Spotfire TERR service get_app
How to calculate engine.queue.size, engine.session.max and logical processors in Spotfire TERR service get_app