Licensing a physical server
You can license a physical server whether it is a single bare metal host or running multiple virtual machines.
You can determine the number of Virtual Processor Cores (VPCs) to license on a physical server in three ways:
- Determine the number of physical cores on the machine
- db2pd –osinfo command
- db2diag command
Using the number of physical cores to determine the number of VPCs to license
The number of physical cores on your physical server is equivalent to the number of VPCs used by the program. You can license a physical server whether it is single bare metal host or running multiple virtual machines. For hybrid environments, you can either license the number of physical cores on the machine or you can license the sum of the virtual cores on the machine. Choose whichever results in the lesser number.
Using the db2pd command to determine the number of VPCs to license
- Run the db2pd –osinfo command to return the server’s environment variables. If you have multiple servers, you must run the command on each server.
- If you have an HMTDegree value of ‘1’, the OnlineCPU value is equivalent to the number of VPCs you must license. Virtual machines always have an HMTDegree value of ‘1’.
- Use the following formula to find the number of VPCs you must license: Number of VPCs to license = OnlineCPU / HMTDegree
Using the db2diag command to determine the number of VPCs to license
- If you are on Windows, run the following command: db2diag -g data:=“System Info”. If you are on Linux/Unix, run the following command: db2diag -g data:='System Info'
- Similar to the db2pd command, this command returns the number of online CPUs and the HMT degree, displayed as “Threading degree per core”.
- Use the following formula to find the number of VPCs you must license: Number of VPCs to license = OnlineCPU / HMTDegree
Examples
Scenario 1 - physical server deployment
- It is deployed on a two-socket server with eight cores per processor and hyper-threading turned on to a degree of 2 (16 physical cores).
- The operating system shows 32 CPUs available.
- Run the db2pd -osinfo command. An HMTDegree of 2 and an OnlineCPU of 32 is returned.
- License 16 VPCs for this environment.
Scenario 2 - single VM environment on a physical server
- The VMware is deployed on a two-socket server with eight cores per processor and hyper-threading turned on to a degree of 2 (32 virtual cores or 16 physical cores).
- The VMware reports six virtual processors.
- Run the db2pd -osinfo command. An HMTDegree of 1 and an OnlineCPU of 6 is returned.
- License six VPCs for this environment.
Scenario 3 - heavy virtualization on a single machine
- Db2 is running on a two-socket server with eight cores per processor and hyper-threading turned on to a degree of 2 (16 physical cores).
- Three of the VM images report 16 virtual cores, and the other two VM images report eight virtual cores.
- Run the db2pd-osinfo command across all VMware hosts. The VMware hosts return an HMTDegree of 1 for each virtual machine and a total OnlineCPU of 64 across the five virtual machines.
- License 16 VPCs for this environment.