| @@ -12,7 +12,9 @@ · 11 unmodified lines |
| 12 | \author{Ronald G. Minnich% | 12 | \author{Ronald G. Minnich% |
| 13 | \thanks{\protect\includegraphics[height=0.3in]{thunderchicken}% | 13 | \thanks{\protect\includegraphics[height=0.3in]{thunderchicken}% |
| 14 | }% | 14 | }% |
| 15 | \thanks{Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DEAC0494AL85000. SAND- 2009-5156C.} and John Floren and Jim Mckie | 15 | \thanks{Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DEAC0494AL85000. SAND- 2009-5156C.} |
| | 16 | and John Floren\thanks{Sandia National Labs} and |
| | 17 | and Eric Van Hensberge\thanks{IBM} and Jim Mckie |
| 16 | \thanks{Bell Laboratories, Murray Hill, NJ, USA } | 18 | \thanks{Bell Laboratories, Murray Hill, NJ, USA } |
| 17 | and Charles Forsyth | 19 | and Charles Forsyth |
| 18 | \thanks{Vita Nuova, Ldt.} and Roger Pearce\thanks{Lawrence Livermore National Laboratory} | 20 | \thanks{Vita Nuova, Ldt.} and Roger Pearce\thanks{Lawrence Livermore National Laboratory} |
| @@ -27,7 +29,7 @@ · 8 unmodified lines |
| 27 | \subsection*{Abstract} | 29 | \subsection*{Abstract} |
| 28 | This paper explores the use of operating systems modifications, which we call {\em specializations}, as a technique for improving IO throughput in High Performance Computing (HPC) systems. | 30 | This paper explores the use of operating systems modifications, which we call {\em specializations}, as a technique for improving IO throughput in High Performance Computing (HPC) systems. |
| 29 | These specializations are the software analog of the specializations implemented in chips such as the Power PC 4xx series used in the Blue Gene supercomputer. A | 31 | These specializations are the software analog of the specializations implemented in chips such as the Power PC 4xx series used in the Blue Gene supercomputer. A |
| 30 | specialization adds functionality that is not needed in a general purpose product, and that yet is essential to the correct operation of a special purpose product. It has little use | 32 | specialization adds functionality that is not needed in a general purpose product, yet is essential to the correct operation of a special purpose product. It has little use |
| 31 | outside the HPC domain; its presence is the difference between success and failure in the HPC domain. | 33 | outside the HPC domain; its presence is the difference between success and failure in the HPC domain. |
| 32 | | 34 | |
| 33 | In the Blue Gene hardware, a significant fraction of the floor plan is dedicated to special purpose subsystems. Conversely, our specializations are very small and simple, but have a dramatic impact on performance. | 35 | In the Blue Gene hardware, a significant fraction of the floor plan is dedicated to special purpose subsystems. Conversely, our specializations are very small and simple, but have a dramatic impact on performance. |
| @@ -36,15 +38,15 @@ They include: · 2 unmodified lines |
| 36 | \item Support for process-private system calls and currying for devices that require it | 38 | \item Support for process-private system calls and currying for devices that require it |
| 37 | \item A bypass path in the system call that implements low latency access to a network driver | 39 | \item A bypass path in the system call that implements low latency access to a network driver |
| 38 | \item A hybrid process model in which certain distinguished processes share the heap (bss) segment with virtual-equal-physical addressing, allowing common memory addresses in programs, the kernel, and interrupt handlers | 40 | \item A hybrid process model in which certain distinguished processes share the heap (bss) segment with virtual-equal-physical addressing, allowing common memory addresses in programs, the kernel, and interrupt handlers |
| 39 | \item Support for {\em active messages} and {\em one sided messaging} in the interrupt handler of a network driver | 41 | \item Support for {\em active messages} and {\em one-sided messaging} in the interrupt handler of a network driver |
| 40 | \end{itemize} | 42 | \end{itemize} |
| 41 | | 43 | |
| 42 | We have implemented and measured these changes using the IBM Blue Gene supercomputers, running under the Plan~9 research operating system. | 44 | We have implemented and measured these changes using IBM Blue Gene supercomputers running under the Plan~9 research operating system. |
| 43 | In this paper we describe the implementations and the results, and how they compare with current state of the art programming models on these machines. | 45 | In this paper we describe the implementations and the results, and how they compare with current state of the art programming models on these machines. |
| 44 | | 46 | |
| 45 | \section{Introduction} | 47 | \section{Introduction} |
| 46 | Communications performance may be the single most critical determinant of overall performance on High Performance Computing (HPC) systems. Of the top 10 systems on the Top 500 list, 70\% use a proprietary interconnect. Proprietary interconnects compose 5.8\% of the Top 500, but the machines they are used in comprise over 30\% of the total compute power on that list. | 48 | Communications performance may be the single most critical determinant of overall performance on High Performance Computing (HPC) systems. Of the top 10 systems on the Top 500 list, 70\% use a proprietary interconnect. Proprietary interconnects compose 5.8\% of the Top 500, but the machines they are used in comprise over 30\% of the total compute power on that list. |
| 47 | As the Blue Gene/P shows, a supercomputer with a low-performance 850 Mhz. CPUs can thrive if given a high performance network. The reverse is not true: very high performance processors on a low-performance network will not do very well at all on traditional HPC tasks. On the Top 500, the first | 49 | As the Blue Gene/P shows, a supercomputer with low performance 850 Mhz. CPUs can thrive if given a high performance network. The reverse is not true: very high performance processors on a low performance network will not do very well at all on traditional HPC tasks. On the Top 500, the first |
| 48 | mention of Ethernet occurs at slot 155, with a large but not very high performance Ethernet-connect cluster. | 50 | mention of Ethernet occurs at slot 155, with a large but not very high performance Ethernet-connect cluster. |
| 49 | | 51 | |
| 50 | Even the most cursory cost estimates show that on the Top 10 systems, the cost of the interconnect consumes a large fraction of total; 50\% is not unusual. The networks are carefully engineered to support applications at minimal overhead, at a scale of 10s of thousands of processors. | 52 | Even the most cursory cost estimates show that on the Top 10 systems, the cost of the interconnect consumes a large fraction of total; 50\% is not unusual. The networks are carefully engineered to support applications at minimal overhead, at a scale of 10s of thousands of processors. |
| @@ -54,9 +56,9 @@ drops by a factor of 3 at least. The latency of the Torus network on the Blue Ge · 3 unmodified lines |
| 54 | If Linux is used, we quickly find that it is possible to convert a sixty million dollar, special-purpose Blue Gene network to little better than an Ethernet. | 56 | If Linux is used, we quickly find that it is possible to convert a sixty million dollar, special-purpose Blue Gene network to little better than an Ethernet. |
| 55 | | 57 | |
| 56 | General purpose operating systems have too much overhead attached to the movement of data, even those as efficient as Linux. | 58 | General purpose operating systems have too much overhead attached to the movement of data, even those as efficient as Linux. |
| 57 | For this reason, for the past two decades, HPC systems have used a technique known as "OS bypass", which in the simplest terms means the device driver is part of the application, not the OS. | 59 | For this reason, for the past two decades, HPC systems have used a technique known as ``OS bypass'', which in the simplest terms means the device driver is part of the application, not the OS. |
| 58 | The use of "OS Bypass" is not without problems. If the network interface does not support virtualization, i.e. if a single network interface can only be used as a single network interface, OS Bypass essentially turns | 60 | The use of "OS Bypass" is not without problems. If the network interface does not support virtualization, i.e. if a single network interface can only be used as a single network interface, OS Bypass essentially turns |
| 59 | the HPC system into single-user machine. Multiple processes on a single node can not even share the interface. If, on the other hand, the network interface does support virtual instances, the cost can be very high: | 61 | the HPC system into a single-user machine. Multiple processes on a single node can not even share the interface. If, on the other hand, the network interface does support virtual instances, the cost can be very high: |
| 60 | Infiniband interfaces, for example, run at about 15 watts, or 50\% more power than the full Blue Gene/P node chip. | 62 | Infiniband interfaces, for example, run at about 15 watts, or 50\% more power than the full Blue Gene/P node chip. |
| 61 | | 63 | |
| 62 | HPC designers are thus left with two unpalatable choices: design HPC systems as single-user devices, because the network is single-user; or, create virtualizing network interfaces, increasing power, heat dissipation, complexity, and cost. | 64 | HPC designers are thus left with two unpalatable choices: design HPC systems as single-user devices, because the network is single-user; or, create virtualizing network interfaces, increasing power, heat dissipation, complexity, and cost. |
| @@ -72,7 +74,9 @@ Finally, we discuss performance and future work. · 9 unmodified lines |
| 72 | \subsection{Blue Gene and its operating systems} | 74 | \subsection{Blue Gene and its operating systems} |
| 73 | The IBM Blue Gene\cite{DBLP:journals/ibmrd/GaraBCCCGHHHKLOSTV05} series of supercomputers, among the fastest in the world, are also unique in that they are purpose built from the chip to the system level. In contrast to other systems which use a standard off-the-shelf CPU placed on a motherboard and connected to network chips, IBM has embedded network functionality on the CPU as shown in Figure \ref{bglchip}. These CPUs are then packaged into boards which consist of little more than DRAM and a connector, and from there to full systems.The result is a greatly simplified system which, in turn, is extremely reliable; the BG/L system at Lawrence Livermore National Lab, with 128,000 CPUs, has an average uptime of 10 days. The term uptime in this case means that after 10 days, {\em everything} is still working; any failure of any subsystem, down to a single DRAM cell, counts as an interrupt. | 75 | The IBM Blue Gene\cite{DBLP:journals/ibmrd/GaraBCCCGHHHKLOSTV05} series of supercomputers, among the fastest in the world, are also unique in that they are purpose built from the chip to the system level. In contrast to other systems which use a standard off-the-shelf CPU placed on a motherboard and connected to network chips, IBM has embedded network functionality on the CPU as shown in Figure \ref{bglchip}. These CPUs are then packaged into boards which consist of little more than DRAM and a connector, and from there to full systems.The result is a greatly simplified system which, in turn, is extremely reliable; the BG/L system at Lawrence Livermore National Lab, with 128,000 CPUs, has an average uptime of 10 days. The term uptime in this case means that after 10 days, {\em everything} is still working; any failure of any subsystem, down to a single DRAM cell, counts as an interrupt. |
| 74 | \begin{figure} | 76 | \begin{figure} |
| | 77 | \center{ |
| 75 | \includegraphics[width=.3\textwidth]{bglchip.eps} | 78 | \includegraphics[width=.3\textwidth]{bglchip.eps} |
| | 79 | } |
| 76 | \caption{\label{bglchip}Blue Gene/L CPU showing dedicated network hardware (Torus, Tree, Eth, and JTAG). Note that on most CPUs the Eth block is not connected.} | 80 | \caption{\label{bglchip}Blue Gene/L CPU showing dedicated network hardware (Torus, Tree, Eth, and JTAG). Note that on most CPUs the Eth block is not connected.} |
| 77 | \end{figure} | 81 | \end{figure} |
| 78 | | 82 | |
| @@ -86,7 +90,8 @@ compute nodes. For further detail the reader is referred to \cite{plan9bgp}. · 7 unmodified lines |
| 86 | Currently, Blue Gene systems run two different kernels. The I/O nodes run Linux. The compute nodes run a lightweight kernel, the Compute Node Kernel or CNK. The CNK does not support file I/O directly; instead, system calls are packaged and forwarded to the I/O node. Experimentation with running Linux on the compute nodes is ongoing. | 90 | Currently, Blue Gene systems run two different kernels. The I/O nodes run Linux. The compute nodes run a lightweight kernel, the Compute Node Kernel or CNK. The CNK does not support file I/O directly; instead, system calls are packaged and forwarded to the I/O node. Experimentation with running Linux on the compute nodes is ongoing. |
| 87 | | 91 | |
| 88 | \subsection{Plan~9} | 92 | \subsection{Plan~9} |
| 89 | Plan~9\cite{Plan9} is a distributed operating system developed at Bell Labs. In Plan~9, the only components hardwired into the kernel are those which are absolutely necessary for basic operations (drivers); other components, which can be on the same or other computer, are run outside the kernel (servers). Drivers include hardware controllers, process management, and network protocol stacks. Servers include traditional functions such as file systems and nontraditional functions such as window managers and Grid management tools. Drivers and servers can be transparently intermixed and their location is irrelevant; a server can be reimplemented as a driver with little if any code changing (the TCP/IP stack was originally a server but was moved into the kernel as a driver). For the purposes of this paper, one can consider Plan~9 to be a Unix-like operating | 93 | Plan~9\cite{Plan9} is a distributed operating system developed at Bell Labs. In Plan~9, the only components hardwired into the kernel are those which are absolutely necessary for basic operations (drivers); other components, which can be on the same or other computer, are run outside the kernel (servers). Drivers include hardware controllers, process management, and network protocol stacks. Servers include traditional functions such as file systems and nontraditional functions such as window managers and Grid management tools. Drivers and servers can be transparently intermixed and their locations are |
| | 94 | irrelevant; a server can be reimplemented as a driver with little if any code modification (the TCP/IP stack was originally a server but was moved into the kernel as a driver). For the purposes of this paper, one can consider Plan~9 to be a Unix-like operating |
| 90 | system with a more compact code base than Unix systems, since a great deal of functionality is provided by user-level services, not kernel services. As mentioned, all file servers are external to the kernel; even the | 95 | system with a more compact code base than Unix systems, since a great deal of functionality is provided by user-level services, not kernel services. As mentioned, all file servers are external to the kernel; even the |
| 91 | RAMdisk | 96 | RAMdisk |
| 92 | device is implemented with a user-level process. | 97 | device is implemented with a user-level process. |
| @@ -108,7 +113,7 @@ We show a simplified version of the normal path in Figure \ref{ospath}, and an O · 15 unmodified lines |
| 108 | \end{figure} | 113 | \end{figure} |
| 109 | The kernel driver is disabled, or, in some cases, removed; the functions of the driver are replaced by | 114 | The kernel driver is disabled, or, in some cases, removed; the functions of the driver are replaced by |
| 110 | an application or library. | 115 | an application or library. |
| 111 | All HPC systems in the "Top 50"\cite{top500}, and in fact most HPC systems in the Top 500, use OS bypass. Applications can not | 116 | All HPC systems in the ``Top 50'', and in fact most HPC systems in the Top 500, use OS bypass. Applications can not |
| 112 | achieve the needed performance if the operating system is involved in data movement for networking. | 117 | achieve the needed performance if the operating system is involved in data movement for networking. |
| 113 | | 118 | |
| 114 | OS Bypass is the network equivalent of what systems such as X Windows do for graphics. | 119 | OS Bypass is the network equivalent of what systems such as X Windows do for graphics. |
| @@ -118,10 +123,10 @@ lowest possible level of hardware manipulation, requiring · 3 unmodified lines |
| 118 | application libraries to replicate much of the operating systems | 123 | application libraries to replicate much of the operating systems |
| 119 | capabilities in networking. | 124 | capabilities in networking. |
| 120 | | 125 | |
| 121 | HPC network software performance is frequently characterized in terms of "bits to the wire" (BTW) and "ping-pong latency". | 126 | HPC network software performance is frequently characterized in terms of ``bits to the wire'' (BTW) and ``ping-pong latency''. |
| 122 | Bits to The Wire is a measure of how long it takes, | 127 | Bits to the wire is a measure of how long it takes |
| 123 | from the time an application initiates | 128 | from the time an application initiates |
| 124 | network I/O, for the bits to appear on the physical wire. Ping-pong latency | 129 | network I/O for the bits to appear on the physical wire. Ping-pong latency |
| 125 | is time it take a program to send a very small packet (ideally, one bit) from | 130 | is time it take a program to send a very small packet (ideally, one bit) from |
| 126 | one node to another, and get a response (usually also a bit). | 131 | one node to another, and get a response (usually also a bit). |
| 127 | These numbers are important as they greatly impact the performance of collectives (such as a global sum), | 132 | These numbers are important as they greatly impact the performance of collectives (such as a global sum), |
| @@ -137,10 +142,10 @@ A problem with OS bypass is that the HPC network becomes a single-user device. B · 9 unmodified lines |
| 137 | owns the network, that network becomes unusable to any other program or to the kernel. This exclusivity requires, in turn, that all | 142 | owns the network, that network becomes unusable to any other program or to the kernel. This exclusivity requires, in turn, that all |
| 138 | HPC systems be provisioned with several networks, increasing cost and decreasing reliability. While the reduction in reliability is not obvious, one must consider | 143 | HPC systems be provisioned with several networks, increasing cost and decreasing reliability. While the reduction in reliability is not obvious, one must consider |
| 139 | that the two networks are not redundant; they are both needed for the application | 144 | that the two networks are not redundant; they are both needed for the application |
| 140 | to run. A failure in either network aborts the application. Additional hardware can make the system less reliable. | 145 | to run. A failure in either network aborts the application. |
| 141 | | 146 | |
| 142 | Our work on Plan~9 for HPC has been to move the communications back into the kernel. The motivation | 147 | Our work on Plan~9 for HPC has been to move the communications back into the kernel. The motivation |
| 143 | for this work follows on measurements of the amount of code that has been written over the years for OS Bypass layers that recreates the functions of an operating system; | 148 | for this work follows on measurements of the amount of code that has been written over the years for OS Bypass layers that recreates the functions of an operating system |
| 144 | and the difficulty the systems have in making correct decisions about concurrrency, allocation, physical to virtual mappings, and other | 149 | and the difficulty the systems have in making correct decisions about concurrrency, allocation, physical to virtual mappings, and other |
| 145 | areas that are easy to do in a kernel and very hard to do in a library. As a result the libraries tend to be large and complex: the IBM Deep Computing Messaging Facility for Blue Gene, which is used to support | 150 | areas that are easy to do in a kernel and very hard to do in a library. As a result the libraries tend to be large and complex: the IBM Deep Computing Messaging Facility for Blue Gene, which is used to support |
| 146 | higher-level libraries such as MPI, is 81,000 lines, as compared to 64,000 lines for the entire Plan~9 kernel for BG/P (as measured by David Wheeler's sloccount). | 151 | higher-level libraries such as MPI, is 81,000 lines, as compared to 64,000 lines for the entire Plan~9 kernel for BG/P (as measured by David Wheeler's sloccount). |
| @@ -152,19 +157,11 @@ MPI libraries\footnote{MPI libraries are typically much larger than the Plan~9 k · 5 unmodified lines |
| 152 | link in the DCMF. Any program which wishes to use the HPC network must be written as an MPI | 157 | link in the DCMF. Any program which wishes to use the HPC network must be written as an MPI |
| 153 | application. Not all applications can be written as MPI applications. Applications writers must recast their | 158 | application. Not all applications can be written as MPI applications. Applications writers must recast their |
| 154 | programs as MPI programs, even when that is not appropriate, because it is not practical | 159 | programs as MPI programs, even when that is not appropriate, because it is not practical |
| 155 | to reimplement the entire user-mode driver stack | 160 | to reimplement the entire user-mode driver stack. |
| 156 | Shells are not MPI applications; it makes | 161 | Shells are not MPI applications; it makes |
| 157 | no sense whatsoever to turn the shell into an MPI application, as it has uses outside of MPI, such | 162 | no sense whatsoever to turn the shell into an MPI application, as it has uses outside of MPI, such |
| 158 | as starting MPI applications! As we showed above, making the networks available as real devices can be very useful. | 163 | as starting MPI applications! As we showed above, making the networks available as real devices can be very useful. |
| 159 | | 164 | |
| 160 | %Making network resources available as kernel-based files | | |
| 161 | %makes them more accessible to all programs. Seperating the | | |
| 162 | %implementation from the usage reduces the chance that simple application bugs will lock up the network. | | |
| 163 | %Interrupts, errors, resources conflicts, and sharing can be managed by the kernel. That is why it | | |
| 164 | %is there in the first place. But if these benefits come at too high a cost in performance, then we will have to give up | | |
| 165 | %on using the kernel devices and forfeit this elegant model. The reason to use OS bypass is the cost of asking the kernel to | | |
| 166 | %perform network I/O. | | |
| 167 | | | |
| 168 | One might think that the drivers, in order to equal the performance of OS bypass, need to impose a very | 165 | One might think that the drivers, in order to equal the performance of OS bypass, need to impose a very |
| 169 | low overhead -- in fact, no overhead at all: how can a code path that goes through the kernel possibly equal an | 166 | low overhead -- in fact, no overhead at all: how can a code path that goes through the kernel possibly equal an |
| 170 | inlined write to a register? The overhead of a user level library can in fact be very high. As mentioned, the DCMF library is larger than Plan~9; the | 167 | inlined write to a register? The overhead of a user level library can in fact be very high. As mentioned, the DCMF library is larger than Plan~9; the |
| @@ -204,7 +201,7 @@ used in the context of virtual machines. Device virtualization requires hardwar · 33 unmodified lines |
| 204 | the addition of a so-called iommu\cite{iommu}. | 201 | the addition of a so-called iommu\cite{iommu}. |
| 205 | | 202 | |
| 206 | An older idea is to dynamically generate code as it is needed. For example, the code to read a certain file can | 203 | An older idea is to dynamically generate code as it is needed. For example, the code to read a certain file can |
| 207 | be generated on the fly, bypassing the layers of software stack. One implementaiton of this idea | 204 | be generated on the fly, bypassing the layers of software stack. One implementation of this idea |
| 208 | is found in Synthesis\cite{synthesis}. While the approach is intriguing, | 205 | is found in Synthesis\cite{synthesis}. While the approach is intriguing, |
| 209 | it has not proven to be practical, and the system itself was not widely used. | 206 | it has not proven to be practical, and the system itself was not widely used. |
| 210 | | 207 | |
| @@ -227,7 +224,7 @@ adds a great deal of complexity, which results in bugs and security holes that a · 16 unmodified lines |
| 227 | devices have taken on many of the attributes of an operating system, with threading, cache- and page-aligned resource allocation, | 224 | devices have taken on many of the attributes of an operating system, with threading, cache- and page-aligned resource allocation, |
| 228 | and failure and interrupt management. Multiple applications using multiple virtual network interfaces end up doing the same work, with the same | 225 | and failure and interrupt management. Multiple applications using multiple virtual network interfaces end up doing the same work, with the same |
| 229 | libraries, resulting in increased memory cost, higher power consumption, and a general waste of resources all around. In the end, the applications | 226 | libraries, resulting in increased memory cost, higher power consumption, and a general waste of resources all around. In the end, the applications |
| 230 | can not do as good a job as the kernel, as they are not running in priveleged mode. Applications and libraries do not have access to | 227 | can not do as good a job as the kernel, as they are not running in privileged mode. Applications and libraries do not have access to |
| 231 | virtual to physical page mappings, for example, and as a result they can not optimize memory layout as the kernel code. | 228 | virtual to physical page mappings, for example, and as a result they can not optimize memory layout as the kernel code. |
| 232 | | 229 | |
| 233 | \section{Our Approach} | 230 | \section{Our Approach} |
| @@ -256,12 +253,12 @@ In most cases, the steps outside the actual I/O itself are not expensive relativ · 22 unmodified lines |
| 256 | sending packets over an Ethernet, or writing a disk, the fd and address validation are insignificant, a few microseconds at most. The picture changes completely with a slow processor (as the PowerPC 450 is) and a fast network, as we have on Blue Gene. Then, the overhead of setting up the arguments alone can dominate the overall time. A global barrier operaion across 65536 nodes can be done in 125 nanoseconds | 253 | sending packets over an Ethernet, or writing a disk, the fd and address validation are insignificant, a few microseconds at most. The picture changes completely with a slow processor (as the PowerPC 450 is) and a fast network, as we have on Blue Gene. Then, the overhead of setting up the arguments alone can dominate the overall time. A global barrier operaion across 65536 nodes can be done in 125 nanoseconds |
| 257 | on Blue Gene; that is 106 instructions. On these measurements, the cost of I/O is made in 1.2-nanosecond increments, and every one counts. | 254 | on Blue Gene; that is 106 instructions. On these measurements, the cost of I/O is made in 1.2-nanosecond increments, and every one counts. |
| 258 | | 255 | |
| 259 | As can be seen above, there is a lot of repeated work for each system call. It is reasonable to ask just how much the arguments vary for each write system call. How much of this work is unnecesary because we are validating the same parameters, over and over? | 256 | As can be seen above, there is a lot of repeated work for each system call. It is reasonable to ask just how much the arguments vary for each write system call. How much of this work is unnecesary because we are validating the same parameters over and over? |
| 260 | We instrumented the Plan~9 kernel and monitored | 257 | We instrumented the Plan~9 kernel and monitored |
| 261 | applications using a trace device\cite{iwp9:tracedevice}. We measured all the I/O performed by all processes over | 258 | applications using a trace device\cite{iwp9:tracedevice}. We measured all the I/O performed by all processes over |
| 262 | a 30 minute interval. We learned that, in general, programs read and write a small | 259 | a 30 minute interval. We learned that, in general, programs read and write a small |
| 263 | set of files over and over, from a very small set of virtual addresses, with a very limited and small range of sizes. This result makes intuitive sense: consider programs on Unix which use stdio, for example: file I/O is performed | 260 | set of files over and over, from a very small set of virtual addresses, with a very limited and small range of sizes. This result makes intuitive sense: consider programs on Unix which use stdio, for example: file I/O is performed |
| 264 | to an internal buffer which does not change, and the buffer size is usually limited to a page size or smaller. Other I/O addresses are almost always from the stack (i.e. an auto variable). Our measurements confirmat this intuition, at least for Plan~9. | 261 | to an internal buffer which does not change, and the buffer size is usually limited to a page size or smaller. Other I/O addresses are almost always from the stack (i.e. an auto variable). Our measurements confirm this intuition, at least for Plan~9. |
| 265 | | 262 | |
| 266 | We learned that the bulk of the time for basic device I/O with very small write sizes -- the type of operation common to collective operations -- was taken up in two functions: the one that validated an open file descriptor, and the one that validated an I/O address. | 263 | We learned that the bulk of the time for basic device I/O with very small write sizes -- the type of operation common to collective operations -- was taken up in two functions: the one that validated an open file descriptor, and the one that validated an I/O address. |
| 267 | The measurements indicate that we could benefit from caching active file descriptors and virtual address ranges in each process structure. Caching virtual to real translation information for just 32 address ranges would eliminate all page table walks for almost all process I/O. Caching just 8 file descriptors would eliminate almost all file descriptor validation operations. Of course, this caching would not cover some extreme cases (Apache), but it would cover the most common. | 264 | The measurements indicate that we could benefit from caching active file descriptors and virtual address ranges in each process structure. Caching virtual to real translation information for just 32 address ranges would eliminate all page table walks for almost all process I/O. Caching just 8 file descriptors would eliminate almost all file descriptor validation operations. Of course, this caching would not cover some extreme cases (Apache), but it would cover the most common. |
| @@ -301,7 +298,7 @@ We will first digress into the nature of Curry functions, describe our changes t · 33 unmodified lines |
| 301 | performance improvements we have seen. | 298 | performance improvements we have seen. |
| 302 | | 299 | |
| 303 | \subsection{Currying} | 300 | \subsection{Currying} |
| 304 | The technique we are using is well known in mathematical circles, and is called currying. | 301 | The technique we are using, Currying, is well known in mathematical circles. |
| 305 | We will illustrate it by an example. | 302 | We will illustrate it by an example. |
| 306 | | 303 | |
| 307 | Given a function of two variables, $ f\left( x, y\right) = y/x$, | 304 | Given a function of two variables, $ f\left( x, y\right) = y/x$, |
| @@ -309,7 +306,7 @@ one may create a new function, $g\left( x\right)$, · 1 unmodified line |
| 309 | if $y$ is known, such that $g\left( x\right) = f\left( x, y\right)$. | 306 | if $y$ is known, such that $g\left( x\right) = f\left( x, y\right)$. |
| 310 | For example, if y is known to be 2, the function g might be $g\left( x\right) = f\left( x, 2\right)$. | 307 | For example, if y is known to be 2, the function g might be $g\left( x\right) = f\left( x, 2\right)$. |
| 311 | | 308 | |
| 312 | We are interested in applying this idea to two key system calls: read and write. Each takes a | 309 | We were interested in applying this idea to two key system calls: read and write. Each takes a |
| 313 | file descriptor, a pointer, a length, and an offset. | 310 | file descriptor, a pointer, a length, and an offset. |
| 314 | | 311 | |
| 315 | The application of currying was obvious: given a program which is calling a kernel function read or write function: $ f\left( fd, address, size\right) $, with | 312 | The application of currying was obvious: given a program which is calling a kernel function read or write function: $ f\left( fd, address, size\right) $, with |
| @@ -396,7 +393,7 @@ When a system call interrupt is generated, the kernel typically checks if the sy · 80 unmodified lines |
| 396 | The modifications described in the previous section can be considered as general purpose, in the sense | 393 | The modifications described in the previous section can be considered as general purpose, in the sense |
| 397 | that any device can be extended to take advantage of them. We have even created Curried pipes. | 394 | that any device can be extended to take advantage of them. We have even created Curried pipes. |
| 398 | | 395 | |
| 399 | In this section we consider specializations that are very specific to the Blue Gene Torus. These specializations extend the kernel in non-general ways, to accomodate an interface that is key to the performance of the machine. The extensions are inspired on Active Messages, and tailored to the needs of a graph application. | 396 | In this section we consider specializations that are very specific to the Blue Gene Torus. These specializations extend the kernel in non-general ways, to accomodate an interface that is key to the performance of the machine. The extensions are inspired by Active Messages\cite{von1992active}, and tailored to the needs of a graph application. |
| 400 | | 397 | |
| 401 | \subsubsection{The Graph Application: motivating intrusive changes} | 398 | \subsubsection{The Graph Application: motivating intrusive changes} |
| 402 | | 399 | |
| @@ -417,17 +414,17 @@ one machine. Such an intrusive change makes sense when the stringent requirement · 14 unmodified lines |
| 417 | performance must be accomodated. | 414 | performance must be accomodated. |
| 418 | | 415 | |
| 419 | The receive side data management is more complex. Data transfer is performed in an interrupt | 416 | The receive side data management is more complex. Data transfer is performed in an interrupt |
| 420 | handler in the kernel, requiring a mapping between user space memory ring and kernel interrupt address space. | 417 | handler in the kernel, requiring a mapping between the user space memory ring and kernel interrupt address space. |
| 421 | The traditional Linux approach to sharing buffers between kernel and user space is via pinning. Pinning is a complicated | 418 | The traditional Linux approach to sharing buffers between kernel and user space is via pinning. Pinning is a complicated |
| 422 | operation which consumes a great deal of code -- there are almost as many lines of code to support | 419 | operation which consumes a great deal of code -- there are almost as many lines of code to support |
| 423 | pinning in Linux as there are in our entire kernel. | 420 | pinning in Linux as there are in our entire kernel. |
| 424 | In our non-traditional approach, the physical and virtual addresses are the same, and are in addition backed by a | 421 | In our non-traditional approach, the physical and virtual addresses are the same, and are in addition backed by a |
| 425 | 256 Mbyte page table entry (TLB in PowerPC terms). | 422 | 256 Mbyte page table entry (TLB in PowerPC terms). |
| 426 | We call this address area the "P==V" space. In our kernel, it is used to back the so-called "BSS", or heap, area, of a program. It is implicitly | 423 | We call this address area the "P=V" space. In our kernel, it is used to back the so-called "BSS", or heap, area, of a program. It is implicitly |
| 427 | shared: any references to memory in this part of the virtual address space are backed by the same memory. | 424 | shared: any references to memory in this part of the virtual address space are backed by the same memory. |
| 428 | | 425 | |
| 429 | Only a few processes, and usually only one, need to use the P==V space. | 426 | Only a few processes, and usually only one, need to use the P=V space. |
| 430 | Our kernel limits the use of the P==V space to application processes which are compiled for the | 427 | Our kernel limits the use of the P=V space to application processes which are compiled for the |
| 431 | IBM Blue Gene "compute node kernel". These | 428 | IBM Blue Gene "compute node kernel". These |
| 432 | processes are run using an emulation environment\cite{plan9bgp}, and are set up with the P=V | 429 | processes are run using an emulation environment\cite{plan9bgp}, and are set up with the P=V |
| 433 | space as their heap segment. Standard runtime software such as malloc runs quite normally with this | 430 | space as their heap segment. Standard runtime software such as malloc runs quite normally with this |
| @@ -449,7 +446,6 @@ struct AmRing { · 15 unmodified lines |
| 449 | \end{verbatim} | 446 | \end{verbatim} |
| 450 | \caption{\label{ring}Shared memory ring for receive packets.} | 447 | \caption{\label{ring}Shared memory ring for receive packets.} |
| 451 | \end{figure} | 448 | \end{figure} |
| 452 | | | |
| 453 | The base is simply a pointer to the base of memory, which consists of a block of 256-byte Torus packets. | 449 | The base is simply a pointer to the base of memory, which consists of a block of 256-byte Torus packets. |
| 454 | The size and logN are different descriptions of the size, provided in each form for convenience; | 450 | The size and logN are different descriptions of the size, provided in each form for convenience; |
| 455 | the size must be 256 bytes or more, and always a power of 2. Prod | 451 | the size must be 256 bytes or more, and always a power of 2. Prod |
| @@ -503,7 +499,7 @@ functionality is moved into the network interface itself, as in Infiniband inter · 47 unmodified lines |
| 503 | Frequently, the performance of OS bypass is cited without taking into account the high overhead of these user-level operating systems, and the problems inherent in creating layers of redundant functions between the operating system and programs. | 499 | Frequently, the performance of OS bypass is cited without taking into account the high overhead of these user-level operating systems, and the problems inherent in creating layers of redundant functions between the operating system and programs. |
| 504 | | 500 | |
| 505 | This paper shows an alternative to the false choice of slow operating systems paths or fast user-level operating systems paths. It is possible to use a general-purpose operating system for I/O and still achieve high performance. While we are not yet equalling the user-level MPI libraries, we are coming from behind, as the user-level libraries and associated network hardware have benefited from 20 years of co-design. | 501 | This paper shows an alternative to the false choice of slow operating systems paths or fast user-level operating systems paths. It is possible to use a general-purpose operating system for I/O and still achieve high performance. While we are not yet equalling the user-level MPI libraries, we are coming from behind, as the user-level libraries and associated network hardware have benefited from 20 years of co-design. |
| 506 | We wonder what would be possible were the operating system and the hardware designed together, with high performance IO in mind. | 502 | We wonder what would be possible were the operating system and the hardware designed together, with high performance I/O in mind. |
| 507 | | 503 | |
| 508 | \section{Acknowledgements} | 504 | \section{Acknowledgements} |
| 509 | This work is support by the DOE Office of Advanced Scientific Computing Research. IBM has provided support from 2006 to the present. This research used resources of the Argonne Leadership Computing Facility | 505 | This work is support by the DOE Office of Advanced Scientific Computing Research. IBM has provided support from 2006 to the present. This research used resources of the Argonne Leadership Computing Facility |