Linux on IBM Z


Linux on IBM Z is the collective term for the Linux operating system compiled to run on IBM mainframes, especially IBM Z and IBM LinuxONE servers. Similar terms which imply the same meaning are Linux on zEnterprise, Linux on zSeries, Linux/390, Linux/390x, etc. The terms zLinux or z/Linux are also sometimes used, but these terms are discouraged by IBM as they create the implication of an IBM-offered or IBM-distributed version of Linux, which is incorrect.

History

Linux on IBM Z originated as two separate efforts to port Linux to IBM's System/390 servers. The first effort, the "Bigfoot" project, developed by Linas Vepstas in late 1998 through early 1999, was an independent distribution and has since been abandoned. IBM published a collection of patches and additions to the Linux 2.2.13 kernel on December 18, 1999, to start today's mainline Linux on Z. Formal product announcements quickly followed in 2000, including the Integrated Facility for Linux engines. Think Blue Linux was an early mainframe distribution consisting mainly of Red Hat packages added to the IBM kernel. Commercial Linux distributors introduced mainframe editions very quickly after the initial kernel work.
At the start of IBM's involvement, Linux patches for IBM Z included some object code only modules, without source code. Soon after IBM replaced the OCO modules with open source modules. Linux on Z is free software under the GNU General Public License.
According to IBM, by May, 2006, over 1,700 customers were running Linux on their mainframes.

Virtualization

is required by default on IBM Z; there is no option to run Linux on Z without some degree of virtualization. First layer virtualization is provided by the Processor Resource and System Manager to deploy one or more Logical Partitions. Each LPAR supports a variety of operating systems including Linux on IBM Z. A hypervisor called z/VM can also be run as the second layer virtualization in LPARs to create as many virtual machines as there are resources assigned to the LPARs to support them. KVM on z is another hypervisor option.
When Linux applications in an LPAR access data and applications in other LPARs such as CICS, IBM DB2, IMS, Linux, and other mainframe subsystems running on the same physical mainframe, they can utilize HiperSockets - fast, memory-only TCP/IP connections. As compared to TCP/IP over standard network interface cards, HiperSockets can improve end-user responsiveness, security, and reliability.
With the zEC12, zBC12, and later models, the HiperSocket concept is extended beyond the physical machine boundary via an RDMA over Converged Ethernet adapter to facilitate a secure and high speed inter-system communication. Applications in LPAR A in system A can thus use HiperSockets to communicate with applications in LPAR B in system B to ensure the security and performance attributes.

Hardware

Beginning with Linux kernel version 4.1 released in early 2015, Linux on Z is only available as a 64-bit operating system compatible with z/Architecture mainframes. Previously Linux on Z was also available as a 31-bit operating system compatible with older model mainframes introduced prior to 2000's z900 model. However, the newer 64-bit Linux kernel and 64-bit Linux on Z distributions are still backward compatible with applications compiled for 31-bit Linux on Z. Historically the Linux kernel architecture designations were "s390" and "s390x" to distinguish between the 31-bit and 64-bit Linux on Z kernels respectively, but "s390" now also refers generally to the one Linux on Z kernel architecture.
Linux runs on standard, general purpose mainframe CPs as well as IFLs. IFLs are mainframe processors dedicated to running Linux, either natively or under a hypervisor. Microcode restricts IFLs from running "traditional" workloads, such as z/OS, but they are physically identical to other IBM Z processors. IFLs are typically less expensive to acquire from IBM than CPs.

Advantages

Linux on Z gives the flexibility of running Linux with the advantages of fault-tolerant mainframe hardware capable of over 90,000 I/O operations per second and with a mean time between failure measured in decades. Using virtualization, numerous smaller servers can be combined onto one mainframe, gaining some benefits of centralization and cost reduction, while still allowing specialized servers. Instead of paravirtualization, IBM mainframes use full virtualization, which permits workload density far greater than paravirtualization does. Combining full virtualization of the hardware plus lightweight Virtual Machine containers that run Linux in isolation result in a platform that supports more virtual servers than any other in a single footprint, which also can lower operating costs. Additional savings can be seen from reduced need for floor space, power, cooling, networking hardware, and the other infrastructure needed to support a data center. IBM mainframes allow transparent use of redundant processor execution steps and integrity checking, which is important for critical applications in certain industries such as banking. Mainframes typically allow hot-swapping of hardware, such as processors and memory. IBM Z provides fault tolerance for all key components, including processors, memory, I/O Interconnect, power supply, channel paths, network cards, and others. Through internal monitoring, possible problems are detected and problem components are designed to be switched over without even failing a single transaction. In the rare event of failure, firmware will automatically enable a spare component, disable the failing component, and notify IBM to dispatch a service representative. This is transparent to the operating system, allowing routine repairs to be performed without shutting down the system. Many industries continue to rely on mainframes where they are considered to be the best option in terms of reliability, security, or cost.

Pricing and costs

Linux on Z is not generally appropriate on premises for small businesses that would have fewer than about 10 distributed Linux servers, although some expensive per-processor licensed software can quickly reduce that rule of thumb. Most software vendors, including IBM, treat the highly virtualized IFLs just like non-virtualized processors on other platforms for licensing purposes. In other words, a single IFL running scores of Linux instances still typically counts as one "ordinary" CPU, at the same CPU price, for software licensing. Test, development, quality assurance, training, and redundant production server instances can all run on one IFL. Thus, beyond some minimum threshold, Linux on Z can quickly become cost-advantageous when factoring in labor and software costs.
The cost equation for Linux on Z is not always well understood and is controversial, and many businesses and governments have difficulty measuring, much less basing decisions on, software, labor, and other costs. Acquisition costs are often more visible, and small, non-scalable servers are "cheap." Nonetheless, non-acquisition costs are no less real and are usually far greater than hardware acquisition prices. Also, individual users and departments within larger businesses and governments sometimes have difficulty sharing computing infrastructure, citing a loss of control. Server centralization, as Linux on Z provides, might reward cooperation with better service and lower costs, but that's not to say that cooperation is always easily accomplished within a corporate bureaucracy.
Linux on Z also supports less expensive disk storage devices than z/OS because Linux does not require FICON or ESCON attachment, although z/OS may use disk space more efficiently, on balance, due to hardware-assisted database compression common on z/OS and the smaller number of operating system instances z/OS typically requires. There are also some operational advantages using some FICON-attached storage with Linux on Z, for example support for z/VM Live Guest Relocation.

Appropriate workloads

Mainframe characteristics are designed for such business workloads as transaction processing and large database management. Mainframe design traditionally emphasizes "balanced" performance for all computing elements including input/output, implemented via channel I/O. Mainframes offload I/O, system accounting, and other non-core computing tasks from the main CPUs as much as possible, and z/Architecture additionally offloads cryptographic calculations. For example, in a single IBM z13 machine up to 141 processor cores are available to configure as IFLs. However, every such machine also has 27 additional main cores: 2 as spares, 1 for firmware support, and the remainder running system accounting and I/O support tasks. In addition, each I/O adapter typically has two PowerPC processors, and a z13 supports hundreds of I/O adapters. There are also separate processors handling memory and cache control tasks, environmental monitoring, and internal interconnections, as examples.
Historically, mainframes in general, and Linux on Z in particular, did not execute "CPU-intensive" single task computations with notably high performance compared to certain other platforms with a few notable exceptions such as cryptographic calculations. Examples included most scientific simulations, weather forecasting, and molecular modeling. Supercomputers, including Linux-based supercomputers, excel at these workloads. This bifurcation between mainframes and other platforms has significantly blurred in recent years, starting with the introduction of 2008's System z10, a machine based on quad-core 4.4 GHz processors with hardware decimal floating point. As mainframe processor technology has continued to evolve, and especially with the introduction of the IBM LinuxONE and IBM z13 models in 2015, IBM has started promoting its mainframes as ideal platforms to run real-time analytics and other computationally intensive tasks that mainframes did not historically run well.
Mainframes do not provide graphics or sound adapters, and are as such ill-suited for digital media editing or computer-aided design except perhaps in support roles

Support

Like all other versions of Linux, Linux on Z is governed by the GPL free software license. Complete Linux on Z source code is available from numerous parties on a free and equal basis, and architectural support is part of the main Linux kernel effort. IBM assigns several of its programmers to the community effort, but IBM is by no means the only participant.
Though there are no obstacles to running any Linux on Z distribution on an IBM z System, IBM routinely tests three particular Linux on Z distributions: Red Hat, SUSE, and, starting in 2015, Canonical's Ubuntu Linux. Other notable Linux on Z distributions include Debian, Fedora, Slackware, CentOS, and Gentoo.
Nearly every free or open-source software package available for Linux generally is available for Linux on Z, including Apache HTTP Server, Samba software, JBoss, PostgreSQL, MySQL, PHP, Python programming language, Concurrent Versions System, GNU Compiler Collection, LLVM, and Perl, Rust, among many others.
Red Hat and SUSE offer mainline support for their distributions running Linux on Z. In 2015 Canonical announced plans to offer official support for its distribution starting in early 2016. IBM Global Services also offers support contracts, including 24x7 coverage. Some standard Linux software applications are readily available pre-compiled, including popular closed-source enterprise software packages such as WebSphere, DB2 and Oracle databases and applications, SAP R/3, SAP ERP, and IBM's Java Developer's Kit, to name only a few.

Developer resources

IBM offers resources to developers wishing to target Linux for z:
Linux on Z supports Unicode and ASCII just like any other Linux distribution—it is not an EBCDIC-based operating system. However, for convenience Linux is able to read kernel parameters in EBCDIC. z/VM takes advantage of this capability.
Porting Linux applications to Linux on Z is fairly straightforward. Potential issues include endianness and reliance on non-portable libraries particularly if source code is not available. Programs can be easily cross compiled to z/Architecture binaries on non-mainframe Linux systems.

Emulators

There are at least three software-based IBM Z mainframes emulators.