Wednesday, December 31, 2008

Single Instruction Multiple Data SIMD

The first SIMD in Intel CPU appeared as MMX (Multimedia Extension). MMX works on 64-bit register. The 64-bits are recognized as 2 32-bit values. Instead of creating new SIMD registers, Intel has decided to use the floating point registers for MMX calculation. The floating point registers R0 to R7 are renamed to MMX0 to MMX7 for SIMD. The new data type created for MMX are all integer-based.

AMD follow with 3DNow! technology which used the floating point registers for SIMD calculation as Intel's MMX. The difference is that AMD recognized the data packed in the MM0 to MM7 register as floats. It was followed by Enhanced 3DNow! in Athlon CPU in which both Integer and Floating Point data types are supported.

In its, Pentium III CPU, Intel provided a set of 8 new registers of 128-bits size. This is enough to store 4x32-bit floating point values and this is useful in 3D calculation which deal frequently with 4x4 matrices. These new registers are called XMM0 to XMM7. Intel called the technology as Streaming SIMD Extension (SSE). Intel upgrade to SSE2 when introducing Pentium IV. With SSE2, integer values are supported as well. AMD followed suit with 3DNow! Professional, which is fully compatible to SSE2.

Saturday, December 13, 2008

LUN Masking

LUN masking performs a similar function as zoning. A LUN is a logical representation of a physical unit of storage including physical disk, physical tape drive, robotic control device, logical disk (formed by multiple physical disks with striping or RAID). LUN masking hides LUNs so that each server sees only the LUN accessible to itself. LUN masking is performed at a level just above zoning. A zone grants or restricts access only to a given port on a storage arrange, but LUN masking can take that port and grant one server access to some of its LUNs. LUN masking can be performed on 3 levels - storage array, intelligent bridges and routers, and HBA driver.

SAN BAU

Firstly, create virtual disk and tape devices for sharing. Then create zones or use LUN masking to create dats paths between resources and servers that access them. Thirdly, use persistent binding to create a permanent relationship between each virtual resource and a SCSI ID on the server. Finally, use multipathing software to manage the multiple paths between the set up.

Persistent Binding

The way that some OS assign SCSI addresses to SAN devices may cause their SCSI address tochange after a reboot, especially if storage resources configuration has changed. The solution to this problem is persistent binding between a SCSI ID and a WWN. This relationship is part of the HBA driver configuration.

Zoning

Zone is equivalent to VLAN. Zoning limits the number of hosts that can see a given storage resources. A hard zoning is created using a list of physical ports. Soft zoning is created using a list of WWN.

Multiple Paths to a Single Device

Each SCSI device willappear only on one SCSI bus. IN FC, it is not true and because of multiple HBA in the same host, it could have more than 1 path to the same device. SAN switch is closer to Ethernet router than switches. Ethernet switch uses spanning tree to detect loop and disable redundant path. Ethernet router uses a routing protocol such as OSPF to ahndle multiple path. In FC, FSPS (FC Shortest Path First) to load balanceSAN traffic and failover.

Because each device on the SAN will appear as a SCSI ID on each HBA connected tot he same, a system with multiple HBA connected to the SAN will actually think that each device on each path is a separte device. A logical layer needs to be inserted to mask these paths and present the OS with the appearance of a single SCSI connection. This is achieved by multipathing software runs on each server.

Friday, December 12, 2008

Fiber Types

Multimode fiber can carry multiple light rays (know as modes) at the same time by transmitting each mode at a slightly different reflection angle with the fiber core. Because of dispersion over longer lengths, multimode fiber is used for shorter distances (< 500m).

Multimode fiber has 2 diameter choices. The larger (62.5-micron) core can be used to a length of 175m. The newer 50-micron core is able to extend to 500m Two diameters are used to let one to reuse older fiber optic cable that ran for say FDDI network.

Single-mode fiber has a much thinner core for transmission of 1 mode up to 10 km.

Optical Fibrer Control (OFC)

There are 2 types of lasers used in HBA. OFC devices use a hand-shaking method to ensure they do not transmit a laser pulse if there is nothing connected to the HBA for safety purpose. A non-OFC will transmit even if a device is not connected to it.

FCAL Address Selection

When a loop initialize, or when a node powers up or when a node joins the loop, it sends a loop initialization primitive (LIP) frame. This causes every other node in the loop to send a LIP frame. The loop becomes unusable.

Each node then continues to transmit the loop initialization select master (LISM) frame to select a master. If the loop is also connected to a fabric (via FL port), the fabric port becomes the loop master. If not, the port with the lowest port name is chosen as loop master.

The next step is every node must select an AL_PA. The loop master sends a loop initialization select AL_PA (LISA) frame around the loop. Each L port on the loop selects a free AL_PA in the frame and marks that AL_PA used. It then forwards the frame to the next L port in the loop. In case of reinitialization, the node will attempt to select the previous AL_PA whenever possible.

Once the LISA returns to the master, it sends the CLS (close) grame to notify all nodes that the initialization process has completed.

FCAL Arbitration Process

A node wishes to transmit by initiating a ARB (arbitrate) frame. If no other ports are communicating, the ARB grame is received by the port that transmitted it, the node wins arbitration and begins to send its data.

When more than 1 nodes are arbitrating sumultaneously, the ARB frame with lowest AL_PA wins the arbitration.

Nodes that won arbitratuion can transmit until it finishes. It is not the same as token ring which transmission is limited to a fixed time period. To allow nodes with lower priority to transmit, a port that wins arbitration will set its access variable to 0 which will inhibit arbitration request. This is called fairness algorithm.

Once all talkers are allowed to transmit, the last one will place an IDLE frame to the loop. This casued every nodes to set its access variable back to 1 and the process start over again.

Difference between FCAL and Fabric

First difference is that FC-AL is a shared medium. Nodes that wish to transmit must arbitrate for the right to do so. The second difference is that the node on a loop select their own address rather than having it assigned by a switch as in fabric mode.

Arbitrated Loop

FC-AL was actually an add-on to the original FC specification which consists of Point-to-point and Fabric topologies. This is introduced as the cost for fabric is quite high and point-to-point limits the number of device connecting. FC-AL can be constructed by using NL Ports (host or storage devices) connected by fiber optic cables with SC connectors that can be split. It is an inexpensive way to connect several disk to a host. One disadvantage of this configuration is it is only practical with short distances due to logistical problem. Another problem is one bad HBA or cable can take out the entire network.

A better configuration is star layout. The connectors do not need to be split. A hub will make sure the transmit and receive ends are matched up. A manged hub can also prune the node in the event of a failure.

Fabric Topology in FC

Each N port plugs into one F port on the switch. Each node is assigned its S_ID by the switch when it logs on to the fibric. 24-bit address allows approximately 16 million unique addresses within a single fabric.

Point-to-point FC

It is the simplest and least expensive topology. It is Simplify 2 N ports communicate via a point to point connection. Although a N port connect to a F port is also point to point, it is considered as a part of a larger network.

FC Addressing

World Wide Name WWN is a fixed, unique, 64-bit addresses assigned to each port by each manufacturer. There are 2 dynamic addresses that may be assigned when this port connects to a FC network. If it is connects to an arbitrated loop, it is assigned a dynamic 8-bit address, refered to as its arbitrated loop physical address (AL_PA). If it connects to a fabric, it will be assigned a dynamic 24-bit address, refered to as its native address identifier (S_ID). When a port is connected to both arbitrated loop and a fabric, it si assigned a 24-bit adddress, with the lower 8-bits as the AL_PA.

Other FC Port Types

L Port implies it can participate in an arbitrated loop. Exclusive L Ports do not exist.

NL Port is a node port with arbitrated loop capabilities. A NL Port can connect to another node, to a switch or to an arbitrated loop.

FL Ports is a fabric port with arbitrated loop capabilities. The switch port can connect to either a node or to an arbitrated loop.

G Port is a generic port on a switch which can act as E Port, F port or a FL port depending on what connects to it.

Fibre Channel Basic Ports

N Port - node port which corresponds to a port on a disk or computer. N port can communicate with another N port or a F port on a switch.

F Port - fabric port which is found only on a switch. F port can only communicate with a N port.

E port is an expansion port on a switch that connects to another switch.

Media for FC

FC can run over both fiber and copper. Copper cables are less expensive and suitable for shorter networks. Most common copper cable is twisted pair with DB-9 connector. Cable lengths can run up to 30m. Optic cables can run up to 175m ,500m and 10km or longer.

Five Layers of FC

FC-4 (Mapping) defines how a FC network communicates with upper level protocols (SCSI and IP). Each upper-level protocol (ULP) that is transportable over FC has a map for it in FC-4.

FC-3 (Common Services) is used by applications requiring more than one port, such as striping.

FC-3 (Framing) is similar to MAC layer in OSI. It defines how data from upper level applications is slit into frames for transport over the lower layers.

FC-1 and FC-0 are similar to physical layer in OSI. FC-1 (Ordered Set) defines how frames are encoded and decoded for transport across those media types. FC-0 (Physical) defines the various media types that can carry FC data.

Fiber or Fibre?

Originally, Fibre Channel was intended to run on fiber optic cables. Confusion arose when copper wire was supported. The standard committee decided to use the word fibre, which is the European spelling for fiber to name Fibre Channel.