EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB10122: Processor Affinity Implementation in MicroStrategy 9.x - 10.x


Community Admin

• Strategy


This document outlines the licensing implementation additions and changes in Processor Affinity Implementation in Strategy 9.x - 10.x. This information is in addition to the existing license governing in Strategy 8.x and earlier releases. Consult the following Strategy Knowledge Base document for information on the license governing in Strategy 9.x - 10.x:
KB9737: License Compliance Auditing modifications introduced in MicroStrategy 7i Release 11 (7.5.1 products) applicable to version 10.x
 
Processor Affinity for Intelligence Server Universal Edition
As part of the installation process and the software compliance program, when Strategy Intelligence Server Universal Edition is licensed based on CPUs, the user is required to input the number of processors that will be used by Strategy Intelligence Server on that machine. The ability to deploy Intelligence Server on a subset of the total number of physical CPUs on a given machine is called Processor Affinity.
 
With the exception of some operating system specific variations outlined in this document, the Processor Affinity behavior for Strategy Intelligence Server on UNIX Operating Systems is similar to the current behavior on Windows operating system. For details on the Processor Affinity behavior on Windows, consult the following Strategy Knowledge Base document:
KB7496: How does the CPU/Clock Speed licensing scheme work in MicroStrategy Intelligence Server 9.x - 10.x?
 
The following are some general points regarding Processor Affinity on UNIX operating system. Implementation considerations specific to AIX and Solaris are discussed in separate sections later in this document.
 

  • The ability to set Processor Affinity on UNIX operating systems does require special system level privileges. Given this constraint, the installation routine must run under the 'root' UNIX account if the license key is based on CPU. If the user account running the installation is different than 'root' using CPU based license, the following error message will be displayed and the installation will not proceed:
     
ka04W00000148MuQAI_0EM440000002BqB.gif
  •  
    
    At least one product requirement is not met. Change your selection or install the missing components.
    Strategy Intelligence Server Universal requirements:

     
    
    MISSING: 'root' user privileges. Your license key for Strategy Intelligence Server Universal is based on CPUs. This license type requires the software to be installed as root. Please log in as root and run the installation again.

  • If the target machine has more that one physical processor and the License Key contains more than one CPU of Strategy Intelligence Server Universal Edition, the installation routine will prompt the user for the number of CPUs to be deployed with an upper limit on the number of licensed CPUs or the physical CPU count. The screen shot below shows an example when the machine has two CPUs and the license is for two CPUs:
     
ka04W00000148MuQAI_0EM440000002Bpo.gif
  •  
    This upper limit will be based on logic as indicated by the following example:
     
    • If the license contains 12 CPUs and the machine has 4 CPUs, the limit will be 4.
    • If the license contains 4 CPUs and the machine has 12 CPUs, the limit will be 4.
    • If the license contains 4 CPUs and the machine has 4 CPUs, the limit will be 4.
  • Once the user provides the number of CPUs to be deployed, the installation routine will set an initial Processor Affinity Mask in the registry, defaulting to the first number of physical processors that corresponds to the number of CPUs to be deployed on that machine. For examples, 4 CPUs on an 8 way machine will set the Processor Affinity Mask to use processors 0, 1, 2, 3. Processor Affinity Mask is defined as a bit mask that specifies the processors on which a given process must run.
     
  • Strategy Service Manager provides the user the ability to modify the physical processors (Processor Affinity Mask) that are utilized by Intelligence Server Universal Edition. This is, if the installation sets the Processor Affinity Mask to CPUs 0 and 1 on a 4 way machine and the license has 4 CPUs, Service Manager will allow the user to change the mask to also use CPUs 2 and 3.
     
    This is performed through Strategy Service Manager > Options > Intelligence Server Options. The following screen shot illustrates this window:
     
ka04W00000148MuQAI_0EM440000002BqC.gif
  •  
    If Processor Affinity is changed, a Strategy Intelligence Server restart will be required.
     
    NOTE:
    To view or modify the Intelligence Server options, Strategy Intelligence Server must be registered as a service. Otherwise, the options will be grayed out. To set up Strategy Intelligence Server to run as a service, enter the following from the command line after navigating to the bin directory in the Install location:
     
    
    mstrctl -s IntelligenceServer rs

  • Each UNIX platform exposes its own set of functionality to bind processes to processors. However, UNIX also provides commands to easily change the processor assignments, which forces Intelligence Server Universal Edition to periodically check its own Processor Affinity and take steps whenever the Processor Affinity mask does not comply with the overall CPU licensing. Whenever license compliance is not met, the Processor Affinity is automatically adjusted to as many CPUs as necessary to become compliant again.
     
    This automatic adjustment of Processor Affinity attempts to apply the user-specified Processor Affinity only the first time. There is no guarantee that it will set the Processor Affinity to the value specified by the user when it adjusts the system back into compliance. That is, if the customer has a 2 CPU license and the Processor Affinity is manually set to use Processors 1 and 2, the Processor Affinity may be reset to use Processors 0 and 1 when the system is adjusted back into compliance.
     

Implementation considerations on AIX
 
On AIX, Processor Affinity is implemented using resource sets. A resource set is a logical structure that contains a list of CPUs. Processes are bound to a resource set which defines specific CPUs that will be used. Resource sets do not define an exclusive use of resource, meaning that the same CPU can be a part of several different resource sets. When Strategy Intelligence Server starts up, it creates a resource set, assigns CPUs to that resource set and binds the server process to that resource set. Resource sets exist only for the lifetime of the process. If the process shuts down either normally or unexpectedly, the resource set is cleaned from the system.
 
While the 'root' account is mandatory for installation based on CPU licensing, it may be possible to run Strategy Intelligence Server as a non-root account by granting appropriate permissions. However, creating/modifying resource sets and binding processes requires 'root' privileges. If Strategy Intelligence Server is run as a non-root account, CPU based licensing may result in an out-of-compliance. For example, suppose Strategy Intelligence Server only has license for 3 CPUs while the machine on which it is running has 8 CPUs. In this scenario, if Strategy Intelligence Server is run as a non-root account, it will still start but it will use all 8 CPUs. This will result in an out-of-compliance situation.
 
AIX provides a series of *rset commands to easily manipulate resource sets and resource set binding. For instance, the rmrset command can be used manually to remove resource sets. If the user manually alters processor assignments and an out-of-compliance situation occurs, then the Processor Affinity will automatically be brought back to compliance as described earlier.
 
Implementation considerations on Solaris
 
On Solaris, Processor Affinity is implemented using Processor Set Binding. A processor set is a collection of processors. Thus, a process assigned to a processor set can only use the specified CPUs. Additionally, there are two constraints with regard to Processor sets:
 

  • A processor set takes exclusive ownership of the processors. Only the processes assigned to the processor set can use the processor set's CPUs. Any other process is not allowed to use any of these CPUs.
     
  • A processor set exists beyond the lifetime of the process that created it. Therefore, when the process is shut down, it must delete the processor set that was created. If a process creates a processor set with 3 CPUs and the process unexpectedly terminates without deleting the processor set it created, then the 3 CPUs cannot be utilized by other processes until the system is rebooted, or the processor set is deleted manually.

For creation of a processor set with more than 1 CPU, the psrset command is used. For 1 CPU, the pbind command may be used to bind processes to that CPU. Unlike the psrset command, binding processes to CPUs using the pbind command does not cause the CPU lock to linger beyond the lifetime of the process.
 
The following points apply regarding implementation of Processor Affinity on Solaris:
 

  1. When Strategy Intelligence Server starts up, it creates a processor set, assigns CPUs to that processor set and binds the server process to that processor set. However, Strategy Intelligence Server creates processor sets only on machines that have more than 2 CPUs and when the number of CPUs is greater than what is licensed.
     
    For example, if 2 CPUs of a Strategy Intelligence Server license are installed on a 4 CPU machine, then a processor set containing 2 CPUs is created. On the other hand, if 4 CPUs of an Intelligence Server license key is used on the same machine, then a processor set is not created.
     
    In the case of machines with 2 CPUs or less, the pbind command is used when there is only a 1 CPU license. Strategy Intelligence Server does not create the processor set.
     
  2. Strategy Intelligence Server deletes the processor set before shutting down so that those processes are not locked anymore. In a situation where Intelligence Server terminates unexpectedly, it performs a cleanup of the processor set it created, upon restart. However, if the Intelligence Server does not restart immediately, the user may be required to manually delete the processor set so that the CPUs are free to be used by other applications.
     
  3. Users may specify Strategy Intelligence Server to start using a pre-defined processor set. This may done by entering the following from the command line:
     
    
    psrset -e <processorsetID> mstrsvr

    For example, there is an existing processor set comprising processors 0, 1, and 2. A 2 CPU license of Strategy Intelligence Server is configured to use this processor set at start-up. In this instance, Intelligence Server will modify the existing processor set to use only 2 CPUs. Note that Strategy Intelligence Server will not create a new processor set in this situation and when shut down, it will not delete this processor set (since it did not create it).
     

Processor Affinity tool for Strategy Web
 
In Strategy 9.x - 10.x, it is possible to install Strategy Web on a machine that has more CPUs than has been licensed. During installation, if the license is based on CPUs, the number of CPUs that Strategy Web will use on the machine must be entered. Similar to installing Strategy Intelligence Server, this sets the initial processor affinity mask. A window similar to the one shown in the following screen shot appears during installation:
 

ka04W00000148MuQAI_0EM440000002Bpq.gif

 
A Processor Affinity tool (MAWebAff.exe) will also be shipped, to allow the manual setting of Processor Affinity for web servers. This tool is installed in the Strategy Web directory and may be launched by double-clicking on MAWebAff.exe. The following window will appear:
 

ka04W00000148MuQAI_0EM440000002Bpm.jpeg

 
NOTES:
 

  • Neither the install routine nor the Processor Affinity tool will allow Strategy Web to use more CPUs than the license allows.
     
  • When Strategy Intelligence Server performs its daily audit, Strategy Web sends information about the CPUs currently in use so that all Web licenses can be aggregated.

 
Product Packaging Disclaimer
Strategy reserves the right to modify the behavior, capabilities, packaging and licensing for our software products at any time. Contact your Strategy Account Executive to obtain additional information regarding any particular software products.
 
Third Party Software Installation:
WARNING:
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 20, 2017

Last Updated:

June 20, 2017