PowerVM - IVE

IBM will enhance virtualization capabilities incorporated into the fastest ever POWER 6 architecture systems. One of these enhanced virtualization capabilities that can provide both 10Gbps physical to virtualized Ethernet interface using multiple partitions IVE (Integrated Virtual Ethernet adapter). This article will put this new virtualization features introduced to everyone, and walks the user through a step by step formulated a set using the POWER IVE environment.


About IVE
IVE (Integrated Virtual Ethernet adapter) POWER 6 systems are all standard features. It consists of a POWER6 GX + bus directly connected to the physical Ethernet card and a PCI adapter components. Such a structure enables IVE provides high-speed and low-latency I / O throughput.
Before IVE, Virtual Ethernet technology provides a network connection between LPAR, and SEA (Shared ethernet adatper) and VIOS (Virtual I / O Server) provides LPAR to external web services. Now IVE can replace most of the functions of virtual Ethernet and SEA has to offer. Figure 1 on the left is VIOS (Virtual I / O Server), the right is IVE.
IVE feature provides users with a variety of options, from 1Gbps connection to link the two four-port 1Gbps port and two-port 10Gbps speed.
Figure 1.VIOS and IVE
VIOS and IVE
Compare IVE and the VIOS
IVE network adapters Ethernet virtualization and LPAR (Logical Partition) external network communication ability, but they offer features not identical. Under different needs, we need to choose a different way Ethernet virtualization. Table 1 lists the main differences we virtualized IVE and VIOS Ethernet applications can provide, for reference.
Table 1 IVE and VIOS comparison table
VirtualizationIVEVIOS
Basic functions
Ethernet virtualized server resourcesYY
It provides hardware accelerationYN
HMC can be used as a hardware device managementYN
Flexible ScalabilityNY
You must be run on an LPAR - based operating systemNY
Have ASF (advanced server functions) functions such as: Live Partition MobilityNY
Network features
Virtualization of Ethernet card can be used as SEAYY
It provides low latency 10Gbps Ethernet speedYN
Provide a secure network links between LPARYY
Industrial support network standards such as VLAN, MTUYY
No separate PCI card to provide external network linksYN
Memory function
SCSI virtualized file system data (iSCSI)NY
You can see and IVE phase, VIOS virtualization solution is based on software, it can provide more virtual Ethernet ports, as well as greater flexibility (for example: live partition mobility). But it does not provide hardware-based Ethernet protocol acceleration, and needs to run on an LPAR on the system.

IVE (Integrated Virtual Ethernet adapter) architecture introduced

IVE provides Ethernet network link from 1Gbps to 10Gbps rates and provide queue processing and virtualization capabilities of TCP links. In addition IVE also provides network protocol stack processing hardware acceleration, and the use of system memory as the main storage control information and other functions. Thus, we can see, IVE provides many advanced features. Here we have a detailed understanding of architecture from the IVE.
IVE architecture introduced
Figure 2.IVE system layout
IVE system layout
POWER 6 each server I / O subsystem includes P5IOC2 chips. P5IOC2 chip as a standalone controller in the system as the primary bridge chip uses the PCI bus and all I / O devices. IVE major hardware is contained in P5IOC2 chip.
In addition to providing a clear low-latency network traffic optimization features, a key function IVE is to provide an integrated two 10Gbps rate on a P5IOC2 chip Ethernet ports or four 1Gbps Ethernet ports. This high degree of integration, making 10G / 1G / 100M / 10M rate share the same I / O device without additional hardware, thus greatly reducing the cost of entry-level and midrange server platforms Ethernet solutions.
IVE provides the following major virtualization features:
  • Up to 32 logical ports
  • Each IVE port group 16 MAC address
  • Each logical port can be assigned to a different LPAR
  • Each LPAR default separate transmit and receive queues
  • Each LPAR separate MIB and RMON counters
  • Each logical port on a separate VLAN filter (maximum 4096 VLAN * 32 logical ports)
  • LPAR to LPAR interior floor of the exchange
IVE uses system memory and CPU for network acceleration, thereby greatly reducing the cost and offers great flexibility.
IVE logic and physical layer components
IVE is a physical hardware and firmware includes two parts, here we introduce one of several main modules:

  • Host Ethernet Adapter (HEA) is a major hardware IVE, the above-mentioned P5IOC2 chip included. HEA is responsible for all of the logical port and a virtual connection to the floor of the exchange as well as the physical port (see Figure 3).
  • Physical port (Physical ports) is a hardware module that is responsible for connecting external LAN / VLAN and switch.
  • Daughter card (daughter cards) contains IVE virtualization management and drivers

3.IVE logical structure
IVE logical structure
IVE some of the concepts:


  • HEA Host Ethernet Adapter, located P5IOC2 I/O control chip.
  • LHEA Logical Host Ethernet Adapter, logical expression of physical HEA adapter is the parent device LHEA port.
  • LHEA port (Port) logical expression of physical HEA ports.
  • Port Group (Port group) share a set of logical ports or two physical ports. IVE supports up to two port groups, any port group can support up to 16 logical ports (LHEA Port).
  • MCS (Multiple Core Scaling) that allows support for multi-transmission queue must be designed to accept the arguments on each LPAR.

Physical ports and logical ports (Physical port and logical port)
From a hardware point of view, it is a physical port you can connect an Ethernet cable (IVE provides copper or fiber ports connected mode) connector. Logical port is a physical port virtualization, which allows multiple LPAR share a single physical port and its connections. In addition, any logical port has its own MAC address, the MAC address is stored in the IVE's hardware.
A physical port supports up to 16 logical ports, the number of logical ports need to be adjusted according to the MCS value. When promiscuous mode is turned on, a physical port allows only assigned to a single LPAR use.
Analogy 4.IVE internal structure and the traditional network structure
Analogy IVE internal structure and the traditional network structure
Physical port promiscuous mode
When a physical port is set to promiscuous mode, the port can only be assigned to a single LPAR use, while the other LPAR can not use this physical port.
When turned promiscuous mode:
 When you need to share on a physical port to more than 16 LPAR's, IVE will not meet your needs, please open the physical port promiscuous mode, and assigned to the VIOS, use the VIOS SEA virtualization capabilities.
 When you want the physical port as a dedicated resource assigned to a LPAR time. Such as the implementation of tcpdump or iptrace.
In Figure 5, the second physical port is set to promiscuous mode and assign it to a VIOS. VIOS logical port as the first SEA use.
Figure 5. Case physical port promiscuous mode
Physical port promiscuous mode Case
Internal communication between LPAR
LPAR to LPAR can be achieved between the internal communication on the same physical port logical port. In other words, if you use more than one LPAR on the same physical port virtualization a logical port, then you can achieve LPAR-LPAR internal high-speed communication between them. So, if you need high-speed network communication between LPAR, please assign them out on the same physical port virtual logical port.
IVE typical operating mode
Now I work pattern typical IVE to do a brief introduction, see Figure 5. This is the lower part of the figure shows a physical port with two IVE adapter. Wherein the physical port is configured right side became promiscuous mode and is exclusive to the far right of the VIOS partition. VIOS partition the physical port virtualization out LHEA further configured to use SEA. IVE adapter physical port on the left side of the virtual three logical ports are allocated to three logical partition. Note that because these three logical port is a physical port on the virtual out, so their performance can be achieved between LPAR-LPAR internal communication, without the need to go through an external switch.

How to configure the IVE

Configuring HEA and LHEA (Logical Host Ethernet Adapter)
Below we will take you step by step to configure HEA and LHEA. Note that the configuration HEA you must have an installed HMC or IVM (Integrated Virtualization Manager). Here we will introduce another HMC IVE configuration steps, step on IVM are similar.
Configuring the HMC HEA
We first need to make sure that your system by HMC have LHEA functional modules.
i. Select your server in the Server Administration Panel, and click on the Task drop-down button in the properties button. Then select the Capabilities tab, there will be similar to Figure 6, page displays. Please note that the Logical Host Ethernet Adapter Capability whether Ture.
Figure 6.LHEA function
LHEA function
ii. Select your server in your server administration panel, and then select Tasks drop-down button, click Hardware Information → Adapters → Host Ethernet. 7
Figure 7
Figure 7
iii. In the new pop-up of HEA configuration window (Figure 8) to select the physical port you want to configure, click Configure.
Figure 8
Figure 8
iv. Within the new pop-HEA physical port configuration window (Figure 9), you can configure the Speed ​​/ Duplex / Packet size, etc. Depending on your situation. We recommend that you turn Flow control enabled features. Congestion occurs when the network connection, this feature can prevent dropped packets. In consideration of performance for 10Gbps speed network adapters, we recommend enabling this feature even more so that it can reach full speed. For how to adjust the Scaling value (MCS) of the value of Multi-Core, refer to the section "Parameter performance recommendations."
v. Once you finish all configuration adjustments, click the OK button.
Figure 9
Figure 9
Configure ports on the HMC LHEA
When you use the Create LPAR Wizard to create a new LPAR, which allows you to configure step LHEA.
  • Before creating the LPAR Wizard window, select the physical port configuration HEA us, and then click Configure. (10)
Figure 10
Figure 10


  • In the new LHEA configuration window (Figure 11) choose what you want to use a free logical port. If you want With a VLAN, select the logical port you want in the VLAN in Allowed VLAN IDs, if you want to add a new VLAN, you can then VLAN to add VLAN ID input box and click the ADD button. If you need access to all the logical port of a VLAN, check Allow all VLAN IDS.
  • Once configured, click the OK button.




Figure 11
Figure 11
Configuring LHEA on AIX
Features LHEA well as limitations.

  • Each LPAR can not be assigned by a physical port virtualization out of the multiple logical ports.
  • LPAR logical port will be treated as a native Ethernet interface, you can configure the settings according to the way normal Ethernet card.
  • If you use the Live Partiton Mobility LPAR function, you can not use LHEA on this LPAR.

According to the bus in the hardware memory position in the table, the card sequence may have differences in different systems. For p570, we will use the following load order:
  • LHEA (logical adapters)
  • PCI (physical adapters)
  • VIO (virtual adapters)
We can clearly see the relationship between HEA and LHEA by the following command:
bash-2.05b # lsslot -c slot | grep -Ei "lhea | Description"
# Slot Description Device (s)
HEA 1 Logical I / O Slot lhea0 ent0 ent1
bash-2.05b # lsdev -l ent0 -F physloc
U789D.001.DQD75C5-P1-C10-T2
bash-2.05b # lsdev -l ent0 -F physloc
U789D.001.DQD75C5-P1-C10-T1
# Entstat -d ent1 | grep Port
Logical Host Ethernet Port (l-port) Driver Properties:
Logical Port Link State: Up
Physical Port Link State: Up
Logical Host Ethernet Port (l-port) Specific Properties:
Logical Port Number: 2
Port Operational State: Up
External-Network Switch-Port Operational State: Down
As can be seen from the results of the above command, HEA1 IVE is a daughter card, lhea0 is and HEA1 corresponding logical expression, ent0 and ent1 by lhea0 two ports virtualization a virtual network adapter.
Enable and disable MCS on AIX
MCS can provide better performance in most cases.
In the AIX environment is enabled by default MCS, you can see by what way:
# Lsslot -c slot | grep -Ei "lhea | Desciption"
# Slot Description Device (s)
HEA 1 Logical I / O Slot lhea (0) ent (0) ent1
# Lsattr -El ent1 | grep multicore
multicore yes Enable Multi-Core Scaling
True
If you want to turn off MCS function, please use the following method:
# Ifconfig en1 down detach
# Chdev -l ent1 -a multicore = no
ent1 changed
# Lsattr -El ent1 | grep multicore
multicore no Enable Multi-Core Scaling
True

Parameters performance recommendations

MCS default in AIX system is turned on, and the use of QP value set by the HMC. When setting the MCS value, please note the following rules:


  • Use to meet the performance needs of MCS minimum value, and to pay attention in a port group all share the same physical port MCS value.
  • For logical port, the MCS set higher value means higher throughput obtained until the theoretical limit to reach the network link, but it will also result in greater CPU consumption.
  • For an LPAR exclusive 10Gbps physical port, we recommend at least the MCS set the value to 4 to get the logical port full speed link. Conversely, if the four LPAR Share This physical port, and are active, set the MCS value to 1, so that all LPAR logical port to reach full speed.
  • For 1Gbps physical port, we recommend, and can reach a minimum value of the full rate of MCS.
  • If there are a large number of small files transfer network, to increase MCS value.

The maximum transmission unit (MTU) must be set in accordance with HMC in your network.
The physical port is set to promiscuous mode, if you want a physical port by SEA will be shared over 16 LPAR.
  • This model does not bring performance improvements
  • You can entstat -d entx | grep Promiscuous command to view the promiscuous mode.
  • Use of this SEA LPAR can access external networks for network monitoring. If you want to sniff tool, you can temporarily set the physical port to promiscuous mode.

AIX - HEA and LHEA

A Host Ethernet Adapter (HEA) is a physical Ethernet adapter that is integrated directly into the GX+ bus on a managed system. HEAs offer high throughput, low latency, and virtualization support for Ethernet connections. HEAs are also known as Integrated Virtual Ethernet adapters (IVE adapters).

Unlike most other types of I/O devices, you can never assign the HEA itself to a logical partition. Instead, multiple logical partitions can connect directly to the HEA and use the HEA resources. This allows these logical partitions to access external networks through the HEA without having to go through an Ethernet bridge on another logical partition.

To connect a logical partition to an HEA, you must create a logical Host Ethernet Adapter (LHEA) for the logical partition. A logical Host Ethernet Adapter (LHEA) is a representation of a physical HEA on a logical partition. An LHEA appears to the operating system as if it were a physical Ethernet adapter, just as a virtual Ethernet adapter appears as if it were a physical Ethernet adapter. When you create an LHEA for a logical partition, you specify the resources that the logical partition can use on the actual physical HEA. Each logical partition can have one LHEA for each physical HEA on the managed system. Each LHEA can have one or more logical ports, and each logical port can connect to a physical port on the HEA.

You can create an LHEA for a logical partition using either of the following methods:

You can add the LHEA to a partition profile, shut down the logical partition, and reactivate the logical partition using the partition profile with the LHEA.
You can add the LHEA to a running logical partition using dynamic logical partitioning. (This method can be used for Linux® logical partitions only if you install Red Hat Enterprise Linux version 5.1, Red Hat Enterprise Linux version 4.6, or a later version of Red Hat Enterprise Linux on the logical partition.)
When you activate a logical partition, the LHEAs in the partition profile are considered to be required resources. If the physical HEA resources required by the LHEAs are not available, then the logical partition cannot be activated. However, when the logical partition is active, you can remove any LHEAs you want from the logical partition. For every active LHEA that you assign to an IBM® i logical partition, IBM i requires 40 MB of memory.

After you create an LHEA for a logical partition, a network device is created in the logical partition. This network device is named entX on AIX® logical partitions, CMNXX on IBM i logical partitions, and ethX on Linux logical partitions, where X represents sequentially assigned numbers. The user can then set up TCP/IP configuration similar to a physical Ethernet device to communicate with other logical partitions.

You can configure a logical partition so that it is the only logical partition that can access a physical port of an HEA by specifying promiscuous mode for an LHEA that is assigned to the logical partition. When an LHEA is in promiscuous mode, no other logical partitions can access the logical ports of the physical port that is associated with the LHEA that is in promiscuous mode. You might want to configure a logical partition to promiscuous mode in the following situations:

If you want to connect more than 16 logical partitions to each other and to an external network through a physical port on an HEA, you can create a logical port on a Virtual I/O Server logical partition and configure an Ethernet bridge between the logical port and a virtual Ethernet adapter on a virtual LAN. This allows all logical partitions with virtual Ethernet adapters on the virtual LAN to communicate with the physical port through the Ethernet bridge. If you configure an Ethernet bridge between a logical port and a virtual Ethernet adapter, the physical port that is connected to the logical port must have the following properties:
The physical port must be configured so that the Virtual I/O Server logical partition is the promiscuous mode logical partition for the physical port.
The physical port can have only one logical port.
You want the logical partition to have dedicated access to a physical port.
You want to use tools such as tcpdump or iptrace.
A logical port can communicate with all other logical ports that are connected to the same physical port on the HEA. The physical port and its associated logical ports form a logical Ethernet network. Broadcast and multicast packets are distributed on this logical network as though it was a physical Ethernet network. You can connect up to 16 logical ports to a physical port using this logical network. By extension, you can connect up to 16 logical partitions to each other and to an external network through this logical network. The actual number of logical ports that you can connect to a physical port depends upon the Multi-Core Scaling value of the physical port group and the number of logical ports that have been created for other physical ports within the physical port group. By default, the Multi-Core Scaling value of each physical port group is set to 4, which allows 4 logical ports to be connected to the physical ports in the physical port group. To allow up to 16 logical ports to be connected to the physical ports in the physical port group, you must change the Multi-Core Scaling value of the physical port group to 1 and restart the managed system.

[16 logical ports can be connected to the physical ports in the physical port group, It is all depends on the MCS values,]



You can set each logical port to restrict or allow packets that are tagged for specific VLANs. You can set a logical port to accept packets with any VLAN ID, or you can set a logical port to accept only the VLAN IDs that you specify. You can specify up to 20 individual VLAN IDs for each logical port.

The physical ports on an HEA are always configured on the managed system level. If you use an HMC to manage a system, you must use the HMC to configure the physical ports on any HEAs belonging to the managed system. Also, the physical port configuration applies to all logical partitions that use the physical port. (Some properties might require setup in the operating system as well. For example, the maximum packet size for a physical port on the HEA must be set on the managed system level using the HMC. However, you must also set the maximum packet size for each logical port within the operating system.) By contrast, if a system is unpartitioned and is not managed by an HMC, you can configure the physical ports on an HEA within the operating system just as if the physical ports were ports on a regular physical Ethernet adapter.

HEA hardware does not support half duplex mode.

You can change the properties of a logical port on an LHEA by using dynamic logical partitioning to remove the logical port from the logical partition and add the logical port back to the logical partition using the changed properties. If the operating system of the logical partition does not support dynamic logical partitioning for LHEAs, and you want to change any logical port property other than the VLANs on which the logical port participates, you must set a partition profile for the logical partition so that the partition profile contains the desired logical port properties, shut down the logical partition, and activate the logical partition using the new or changed partition profile. If the operating system of the logical partition does not support dynamic logical partitioning for LHEAs, and you want to change the VLANs on which the logical port participates, you must remove the logical port from a partition profile belonging to the logical partition, shut down and activate the logical partition using the changed partition profile, add the logical port back to the partition profile using the changed VLAN configuration, and shut down and activate the logical partition again using the changed partition profile.

AIX - Queue Depth (queue_depth)

   Queue depth is the number of I/O requests (SCSI commands) that can be queued at one time on a storage controller. Each I/O request from the host's initiator HBA to the storage controller's target adapter consumes a queue entry. Typically, a higher queue depth equates to better performance. However, if the storage controller's maximum queue depth is reached, that storage controller rejects incoming commands by returning a QFULL response to them. If a large number of hosts are accessing a storage controller, plan carefully to avoid QFULL conditions, which significantly degrade system performance and can lead to errors on some systems.

Changing the queue_depth on a hdisk with chdev –P. This updates the devices ODM information only, not its running configuration. The new value will take effect next time We reboot the system. So now I have a different queue_depth in the ODM compared to the devices current running config (in the kernel).

What if We forget that We’ve made this change to the ODM and forget to reboot the system for many months? Until someone complains about the an I/O performance issue, We still believe that the changes are in effective. But it is NOT, Why ?

How do We know if the ODM matches the devices running configuration?

For example, We start with a queue_depth of 3, which is confirmed by looking at lsattr (ODM) and kdb (running config) output:

# lsattr -El hdisk6 -a queue_depth
queue_depth 3 Queue DEPTH True


# echo scsidisk hdisk6 | kdb | grep queue_depth
    ushort queue_depth  = 0x3;                                                   < In Hex.

Now We change the queue_depth using chdev –P i.e. only updating the ODM.

# chdev -l hdisk6 -a queue_depth=256 -P
hdisk6 changed

# lsattr -El hdisk6 -a queue_depth
queue_depth 256 Queue DEPTH True
         
kdb reports that the disks running configuration still has a queue_depth of 3.

# echo scsidisk hdisk6 | kdb | grep queue_depth
    ushort queue_depth  = 0x3;

Now if We varyoff the VG and change the disk queue_depth, both lsattr (ODM) and kdb (the running config) show the same value:


# umount /test
# varyoffvg testvg

# chdev -l hdisk6 -a queue_depth=256
hdisk6 changed

# varyonvg testvg
# mount /test

# lsattr -El hdisk6 -a queue_depth
queue_depth 256 Queue DEPTH True

# echo scsidisk hdisk6 | kdb | grep queue_depth
    ushort queue_depth  = 0x100;                                    < In Hex = Dec 256.

# echo "ibase=16 ; 100" | bc

256

This is one way of checking We’ve rebooted since We changed our queue_depth attributes.

Setting queue depths on AIX hosts:
You can change the queue depth on AIX hosts using the chdev command. Changes made using the chdev command persist across reboots.

Examples:
To change the queue depth for the hdisk7 device, use the following command:
chdev -l hdisk7 -a queue_depth=32
To change the queue depth for the fcs0 HBA, use the following command:
chdev -l fcs0 -a num_cmd_elems=128
The default value for num_cmd_elems is 200. The maximum value is 2,048.

Note: It might be necessary to take the HBA offline to change num_cmd_elems and then bring it back online using the rmdev -l fcs0 -R and makdev -l fcs0 -P commands.