Processors in a Virtual Environment

The gateway Virtual Appliance can make heavy use of the CPU resources that are allocated to it. The intensity varies depending on the type of service policies being published on the Gateway. This topic explores some general guidelines on CPU resourcing.
gateway83
The
CA API Gateway
Virtual Appliance can make heavy use of the CPU resources that are allocated to it. The intensity varies depending on the type of service policies being published on the Gateway. This topic explores some general guidelines on CPU resourcing.
Virtual Appliance and CPU Usage
Observe the following deployment recommendations while deploying Virtual Appliances and allocating CPU resources. They are valid for both testing and production environments.
  • Distribute Virtual Appliances within your ESX infrastructure such that no more than two are running on the same multi-purpose host. This helps minimize the risk of overusing a single ESX host for processing. It also helps minimize the impact of the Distributed Resource Schedule (DRS) attempting to balance load throughout an ESX cluster.
  • If you cannot avoid placing more than two Virtual Appliances running on a given host, ensure that the total number of allocated CPUs (reserved or not) does
    not
    exceed the total number of physical cores on that host. Otherwise, performance degrades for all images and high %RDY* values occur as ESX attempt to balance over-committed resources. This scenario results in inconsistent performance for all images running on the affected ESX host.
    (*%RDY = The percentage of time that images wait for the hypervisor to allocate processing resources.)
Virtual Processor Allocation
When allocating processors for use in a hypervisor, be aware of the physical resources available on the ESX host. Modern servers typically come with one or more sockets, with chips that have four or six cores each. This allows many images to run, each utilizing multiple processors. Most hypervisors also include hyper-threaded “processors” in their available processor count. However, hyper-threaded cores are not physical cores, and they do not perform as well as physical cores. For Virtual Appliance sizing, only consider physical cores when sizing the image.
The Virtual Appliance performs optimally when the allocated vCPUs equal the number of cores in a single socket on the host. For example, if using 4-core sockets, you should allocate 4 vCPUs. Performance scales linearly up to that vCPU count (for example, four vCPUs have roughly twice the performance as two vCPUs, given the same policy and message size). Performance should increase beyond the number of physical cores on a socket, albeit in a non-linear fashion. However, performance begins to suffer once you approach the total number of available cores on the hypervisor. The best balance is to allocate up to the total number of cores on a socket.
Virtual Processor Reservation
Reserving processors for the Virtual Appliance helps with performance consistency, but the performance gains are relatively minor. It is up to you to decide whether to reserve CPUs for the Virtual Appliance, based on your hypervisor configuration. Consider these factors:
  • Number of images hosted on a single hypervisor client:
    If the number of vCPU’s allocated to hosted images is significantly higher than the number of total physical cores available, you should consider reserving vCPU’s for the Virtual Appliance. Doing so helps produce predictable performance in a production environment. If there is contention for CPU resources, the host attempts to reduce cycles from all images running on the host. Without processor reservation, this results in high %RDY values in the ESX host and performance drops for the Virtual Appliance.
  • Requirement for consistent and predictable performance: 
    If you require your Virtual Appliance to provide consistent and predictable performance (due to high or critical performance requirements), then you should reserve CPUs in production environments.
The factors above may imply that you should always reserve vCPU’s for the Virtual Appliance. But adequate performance is possible without reservations; just be aware that performance may vary in this environment.
For performance testing environments, images should be configured for maximum throughput and consistency. This means sizing the environment so that combined image vCPU allocations do not exceed the number of physical cores, or reserving CPUs for the Virtual Appliance.