📜 ⬆️ ⬇️

Heterogeneous processor pool in XenServer 6

Not so long ago, the customer became aware of the need to assemble a pool of virtual machines, which was to consist of HP ProLiant servers of 6 and 5 generations. The processors in these servers are: Xeon E5502 and X3353 . Starting with version 5.5, Xen supports a heterogeneous pool of processors.
4 types of heterogeneous pools are described:
  1. Adding more productive host to less productive;
  2. Adding less productive host to more productive;
  3. The combination of different and mutually exclusive hosts in the pool;
  4. A combination of different CPUs with identical capabilities.


Type 1 involves applying a mask to the connected CPU in order to achieve compatibility with the existing pool, which remains unmasked; this option is automatically included in the XenServer. Type 2 involves applying a mask to an existing pool, the server being added remains unmasked. Type 3 involves applying a common mask to the existing pool and the connected host to ensure compatibility. Type 2 and type 3 are supported via XenAPI and Xe CLI. Type 4 is suitable for models with different marketing names, but identical sets of flags and functions.
In one of the blogs I came across a video where 2 servers are added to the pool without changing the masks manually. Unfortunately, in my case, for any combination, XenServer issued: "This server's hardware is incompatible with the master's." It only remained to try to apply the mask.
Applying a mask to an existing pool affects the running virtual machines, so you need to choose the time to reboot the hosts and apply the mask.
An additional nuance is that new and old processors cannot always be described as more productive and less productive. Newer models of processors often do not use functions that are present in older processors, which can lead to incompatibility. Therefore, there will be no guarantee that when using a host mask with the latest processors, it is enough to attach it to the pool containing the old processor models.
Supported processor combinations can be found in the Hardware Compatibility List .
We proceed to the choice of a masking option.
In Citrix Xen Server, you need to decide which processors are used on the hosts.
In our case, these were X3353 (4 cores 2.66GHz) and E5502 (2 cores 1.86GHz).
Consider processor attributes using the xe host-cpu-info command in Citrix XenServer.
 [host_a] # xe host-cpu-info cpu_count : 4 vendor: GenuineIntel speed: 1866.734 modelname: Intel(R) Xeon(R) CPU E5502 @ 1.87GHz family: 6 model: 26 stepping: 5 flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni vmx est ssse3 sse4_1 sse4_2 popcnt features: 009ce3bd-bfebfbff-00000001-28100800 features_after_reboot: 009ce3bd-bfebfbff-00000001-28100800 physical_features: 009ce3bd-bfebfbff-00000001-28100800 maskable: full 

 [host_b] # xe host-cpu-info cpu_count : 4 vendor: GenuineIntel speed: 2666.668 modelname: Intel(R) Xeon(R) CPU X3353 @ 2.66GHz family: 6 model: 23 stepping: 6 flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht constant_tsc pni vmx est ssse3 sse4_1 features: 000ce3bd-bfebfbff-00000001-20000800 features_after_reboot: 000ce3bd-bfebfbff-00000001-20000800 physical_features: 000ce3bd-bfebfbff-00000001-20000800 maskable: base 

Save the results to E5502.txt and X3353.txt.
In XenServer 5.5, there is a condition that processors can be added to the pool only if they have the same vendor, model, family, and flag values.
Starting with version 5.6, only the flag values ​​of the server pool and the plug-in host must be identical to create a heterogeneous pool.
You can check compatibility masks using the Heterogeneous CPU Pool Self-Test Kit :
 # ./compare-cpu E5502.txt X3353.txt -v file1: E5502.txt file2: X3353.txt pool_mask: ffffff7f-ffffffff-ffffffff-ffffffff CPU 1: model name: Intel(R) Xeon(R) CPU E5502 @ 1.87GHz features: 009ce3bd-bfebfbff-00000001-28100800 masking level: full CPU 2: model name: Intel(R) Xeon(R) CPU X3353 @ 2.66GHz features: 000ce3bd-bfebfbff-00000001-20000800 masking level: base Result: CPU 1 and CPU 2 are compatible for masking Mask type: 1 CPU 1 has a superset of features to CPU 2 Mask: 000ce3bd-bfebfbff-00000001-20000800 

Conversely, if X3353 were added to the pool with E5502 processors:
 # ./compare-cpu X3353.txt E5502.txt -v file1: X3353.txt file2: E5502.txt pool_mask: ffffff7f-ffffffff-ffffffff-ffffffff CPU 1: model name: Intel(R) Xeon(R) CPU X3353 @ 2.66GHz features: 000ce3bd-bfebfbff-00000001-20000800 masking level: base CPU 2: model name: Intel(R) Xeon(R) CPU E5502 @ 1.87GHz features: 009ce3bd-bfebfbff-00000001-28100800 masking level: full Result: CPU 1 and CPU 2 are compatible for masking Mask type: 2 CPU 1 has a subset of features to CPU 2 Mask: 000ce3bd-bfebfbff-00000001-20000800 

The mask is identical, but the type of action is different.
What are the functions of the processors are compared? There are 2 sets of processor functions: basic functions and advanced. Both types are divided into 2 halves, known as ECX and EDX . Determining the masking options for a given pair of processors requires a comparison of the values ​​of the functions in combination with the level of masking of these processors. For brevity, XenServer stores function values ​​in hexadecimal.
Consider the functions of the E5502 and X3353 processors:
 || CPU model || base_ecx || base_edx || ext_ecx || ext_edx || Masking level || | E5502 | 009ce3bd | bfebfbff | 00000001 | 28100800 | full | | X3353 | 000ce3bd | bfebfbff | 00000001 | 20000800 | base | 

There are differences in Base_ecx and Ext_edx, we convert the functions into binary code to see the specific differences in the bits of the functions:
  || CPU model || base_ecx (bin) || ext_edx (bin) || | E5502 | 000100111001110001110111101 |101000000100000000100000000000 | | X3353 | 000000011001110001110111101 |100000000000000000100000000000 | | | xx | xx | | | 24 21 0 | 28 21 0 | 

In the E5502 processor, bits 21 and 24 are present in the base_ecx, which are missing in the X3353 processor. The ext_edx functions in the E5502 processor contain bits 21 and 28, which are missing in X3353. Because E5502 processor fully supports masking level: full, and X3353 processor supports masking level: base, then a unifying mask is possible. The mask can be calculated by calculating the bitwise AND, mutually exclusive processor functions will be disabled.
 || CPU model || base_ecx (bin) || ext_edx (bin) || | E5502 | 000100111001110001110111101 |101000000100000000100000000000 | | X3353 | 000000011001110001110111101 |100000000000000000100000000000 | | | xx | xx | | Joint | 000000011001110001110111101 | 100000000000000000100000000000 | 

We translate into hexadecimal:
 || base_ecx || ext_edx || | 000ce3bd | 20000800| 

We add these values ​​with the unchanged ext_ecx and base_edx and get the union mask:
000ce3bd-bfebfbff-00000001-20000800
Having looked in the Hardware Compatibility List, we are convinced that the mask was correct.
It remains to apply the mask to the host with an E5502 processor:
 xe host-set-cpu-features features=000ce3bd-bfebfbff-00000001-20000800 uuid=<host_uuid> 

After rebooting the host, the E5502 has the same functions as the X3353:
 # xe host-cpu-info cpu_count : 4 vendor: GenuineIntel speed: 1866.734 modelname: Intel(R) Xeon(R) CPU E5502 @ 1.87GHz family: 6 model: 26 stepping: 5 flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni vmx est ssse3 sse4_1 sse4_2 popcnt features: 000ce3bd-bfebfbff-00000001-20000800 features_after_reboot: 000ce3bd-bfebfbff-00000001-20000800 physical_features: 009ce3bd-bfebfbff-00000001-28100800 maskable: full 

Physical Features do not change.
Currently, there are no new E5-2400 and E5-2600 processors in the compatibility matrix and the masking of new Gen8 processors will be supported after the release of the next BIOS update for HP ProLiant servers:
 # xe host-cpu-info cpu_count : 32 vendor: GenuineIntel speed: 2700.068 modelname: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz family: 6 model: 45 stepping: 7 flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc nonstop_tsc aperfmperf pni pclmulqdq vmx est ssse3 sse4_1 sse4_2 x2apic popcnt aes hypervisor ida arat tpr_shadow vnmi flexpriority ept vpid features: 17bee3ff-bfebfbff-00000001-2c100800 features_after_reboot: 17bee3ff-bfebfbff-00000001-2c100800 physical_features: 17bee3ff-bfebfbff-00000001-2c100800 maskable: no 

You can see that the functions of the E5-2680 processor differ from the E5502 functions only in base_ecx and the new processors support the Flex Migration feature (as it should be), the mask will look like:
009ce3bd-bfebfbff-00000001-2c100800 , but only with an updated BIOS version. According to the CPU matrix , E5-2600 processors are supported and can be used in XenServer 6.0, but so far only in homogeneous pools.

')

Source: https://habr.com/ru/post/145665/


All Articles