At least one embodiment of the present invention pertains to network storage systems, and more particularly, to a network storage server that includes shared read-only memory space among multiple user space processes.
A storage server is a computer system that is used to store and retrieve data on behalf of one or more clients on a network. A storage server operates on behalf of one or more clients to store and manage data in a set of mass storage devices, such as magnetic or optical storage-based disks or tapes. In conventional network storage systems, the mass storage devices can be organized into one or more groups of drives (e.g., redundant array of inexpensive drives (RAID)).
A storage server can be configured to service file-level requests from clients, as in the case of file servers used in a network attached storage (NAS) environment. Alternatively, a storage server can be configured to service block-level requests from clients, as done by storage servers used in a storage area network (SAN) environment. Further, some storage servers are capable of servicing both file-level and block-level requests, as done by certain storage servers made by NetApp, Inc. of Sunnyvale, Calif.
It is desirable to provide a fault tolerant storage system. Fault-tolerance or graceful degradation is the property that enables a system to continue operating properly in the event of the failure of (or one or more faults within) some of its components. One way of providing fault tolerance in a storage system is by redundancy, i.e. providing multiple identical instances of the same system/data and switching to one of the remaining instances in case of a failure (failover). Implementations of RAID, redundant array of independent disks are examples of a fault-tolerant storage device that uses data redundancy. Another way of providing fault tolerance is by fault isolation. When a failure occurs, the system must be able to isolate the failure to the offending component.
One or more embodiments of the present invention are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:
A method and system for sharing a read-only address space among multiple processes to improve network storage server performance are described. References in this specification to “an embodiment”, “one embodiment”, or the like, mean that the particular feature, structure or characteristic being described is included in at least one embodiment of the present invention. Occurrences of such phrases in this specification do not necessarily all refer to the same embodiment.
In one embodiment, multiple storage servers can operate as a group to provide fault tolerance. Fault tolerance is a functionality to enable a system to continue operation, possibly at a reduced level (also known as graceful degradation), rather than failing completely, when some part of the system fails. To accomplish fault tolerance, multiple storage servers can be connected to hardware devices through hypervisor so that one server can continue to operate when the other server is inoperable for some reason. A hypervisor or virtual machine monitor is a virtualization platform that allows multiple operating systems to run on a host computer at the same time. However, this can cause system latency from hypervisor processing and contention among multiple storage servers to access hardware devices. These undesirable effects can prevent the storage system from performing at the maximum efficiency.
As described below, fault isolation capabilities made available by user space can be provided in a high-performance embedded network storage system while retaining high performance of kernel level processes. A user space is the memory area where user mode applications work. The kernel is the central component of computer operating systems (OS). The kernel's responsibilities include managing the system's resources (the communication between hardware and software components). By giving user space processes direct access to specific devices (e.g., Network Interface Cards and storage adapters), processes in user space can initiate Input/Output requests without issuing system calls (and entering kernel mode).
The multiple user space processes can initiate requests serviced by a user space device driver by sharing a read-only address space that maps the entire physical memory one-to-one. In addition, a user space process can initiate communication with another user space process by use of transmit and receive queues that work nearly identically to transmit and receive queues used by hardware devices. A mechanism of ensuring that virtual addresses that work in one address space reference the same physical page in another address space can be used to accomplish better efficiency.
Refer now to
Storage of data in the storage devices 16 is managed by each storage server 20. For example, a storage server 20 receives and responds to various read/write requests from the clients 11, directed to data stored in or to be stored in the storage devices 16. The mass storage devices 16 can be, for example, conventional magnetic or optical disks or tape drives; alternatively, they can be non-volatile solid-state memory, such as flash memory. The mass storage devices 16 can be organized as a Redundant Array of Inexpensive Disks/Devices (RAID), in which case the storage server 20 accesses the storage devices 16 using one or more well-known RAID protocols.
The storage server 20 can be a file-level server such as used in a NAS environment, a block-level storage server such as used in a SAN environment, or a storage server which is capable of providing both file-level and block-level service. Further, the storage server 20 has a distributed architecture. For example, the storage server 20 includes physically separate network modules, e.g., N-module 13 and disk module, e.g., D-module 14, which communicate with each other over an external interconnect.
The N-Module 13 includes functionality that enables the storage server 20 to connect to clients 11 over a computer network 12, while the D-module 14 connects to one or more storage devices 16, e.g. disks of a disk array. D-module 14 also includes storage management functions, such as a file system manager or other form of data layout engine. The storage servers 20 are interconnected by a cluster switching fabric 15 which, in the illustrative embodiment, can include a Gigabit Ethernet switch. An exemplary distributed file system architecture is generally described in U.S. Patent Application Publication No. U.S. 2002/0116593 titled METHOD AND SYSTEM FOR RESPONDING TO FILE SYSTEM REQUESTS, by M. Kazar et al. published Aug. 22, 2002. It should be noted that while there is shown an equal number of N and D-Modules in the illustrative cluster 10, there can be differing numbers of N- and/or D-Modules in accordance with various embodiments of the present invention. For example, there can be a plurality of N-Modules and/or D-Modules interconnected in a cluster configuration 10 that does not reflect a one-to-one correspondence between the N- and D-Modules. As such, the description of a storage server 20 comprising one N-Module and one D-Module should be taken as illustrative only.
The clients 11 can be general-purpose computers configured to interact with the storage server 20 in accordance with a client/server model of information delivery. That is, each client 11 can request the services of the storage server, and the storage server can return the results of the services requested by the client, for example by exchanging packets over the network 12. A client 11 can issue packets according to file-based access protocols, such as the Common Internet File System (CIFS) protocol or Network File System (NFS) protocol, over the Transmission Control Protocol/Internet Protocol (TCP/IP) when accessing information in the form of files and directories. Alternatively, the client can issue packets according to block-based access protocols, such as the Small Computer Systems Interface (SCSI) protocol encapsulated over TCP (iSCSI) and SCSI encapsulated over Fibre Channel (FCP), when accessing information in the form of blocks.
The interconnect 24 shown in
The processor(s) 21a,b can include central processing units (CPUs) of the storage server (storage server) 20 and, thus, control the overall operation of the storage server 20. In certain embodiments, the processor(s) 21 accomplish this by executing software or firmware stored in memory 22. The processor(s) 21 can be, or can include, one or more programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application specific integrated circuits (ASICs), programmable logic devices (PLDs), or the like, or a combination of such devices. Illustratively, one processor 21a can execute the functions of the N-Module 13 on the storage server, while the other processor 21b can execute the functions of the D-Module 14.
The memory 22 illustratively comprises storage locations that are addressable by the processors and adapters for storing software program code and data structures associated with the present invention. The processor and adapters can, in turn, comprise processing elements and/or logic circuitry configured to execute the software code and manipulate the data structures. The memory 22 is or includes the main memory of the storage server 20. The memory 22 represents any form of random access memory (RAM), read-only memory (ROM), flash memory, or the like, or a combination of such devices. In use, the memory 22 can contain, among other things, at least a portion of the storage operating system 23 of the storage server 20. A storage operating system 23 functionally organizes the storage server 20 by, inter alia, invoking storage operations in support of the storage service implemented by the storage server 20. It will be apparent to those skilled in the art that other processing and memory means, including various types of computer readable media, can be used for storing and executing program instructions pertaining to the invention described herein.
The network adapter 25 comprises a plurality of ports adapted to couple the storage server 20 to one or more clients 11 over point-to-point links, wide area networks, virtual private networks implemented over a public network (Internet) or a shared local area network, for example. The network adapter 25 thus can comprise the mechanical, electrical and signaling circuitry needed to connect the storage server 20 to the network 12 or 15. Illustratively, the computer network 12 or 15 can be embodied as an Ethernet network or a Fibre Channel (FC) network. Each client 11 can communicate with the storage server over network 12 or 15 by exchanging discrete frames or packets of data according to pre-defined protocols, such as TCP/IP.
The storage adapter 26 cooperates with the storage operating system 23 executing on the storage server 20 to access information requested by the clients 11 and to write data in response to clients' requests. The information can be stored on any type of attached array of writable storage device media such as video tape, optical, DVD, magnetic tape, bubble memory, electronic random access memory, micro-electro mechanical and any other similar media adapted to store information, including data and parity information. However, as illustratively described herein, the information is preferably stored on the storage devices 16, e.g. disks. The storage adapter 26 comprises a plurality of ports having input/output (I/O) interface circuitry that couples to the disks over an I/O interconnect arrangement, such as a conventional high-performance, FC link topology.
Storage of information on storage devices 16 can be implemented as one or more storage “volumes” that comprise a collection of physical storage disks cooperating to define an overall logical arrangement of volume block number (VBN) space on the volume(s). Each logical volume is generally, although not necessarily, associated with its own file system. The disks that form a logical volume/file system are typically organized as one or more groups, wherein each group can be operated as a Redundant Array of Independent (or Inexpensive) Disks (RAID).
One method to provide a fault tolerant system is to use a hypervisor to allow multiple storage Operating Systems (OS's) to operate in a redundant manner. A hypervisor or virtual machine monitor is a virtualization platform that allows multiple operating systems to run on a host computer at the same time. Hypervisors can be classified in two types:
1. Software that runs directly on a given hardware platform (as an operating system control program). A guest operating system thus runs at the second level above the hardware. A variation of this is embedding the hypervisor in the firmware of the platform.
2. Software that runs within an operating system environment. A “guest” operating system thus runs at the third level above the hardware.
A “guest” operating system could access services directly from the (higher-level) control Program—analogous to making a “supervisor call” to the (same level) operating system.
To provide a fault tolerant storage system by fault isolation, multiple storage OS's 31 are connected to hardware devices 33 through hypervisor 32 so that one storage OS can continue to operate when another OS is inoperable for some reason. However, this system configuration can cause contention among multiple storage OS's 31 to access hardware devices 33 and latency caused by OS having to go through hypervisor, preventing the storage system from performing at the maximum efficiency.
Another method of providing fault tolerance is using symmetric multiprocessing. Symmetric multiprocessing, or SMP, is a multiprocessor computer architecture where two or more identical processors are connected to a single shared main memory. SMP systems allow any processor to work on any task no matter where the data for that task are located in memory; with proper operating system support, SMP systems can easily move tasks between processors to balance the workload efficiently. SMP has been a model for certain system designs, but its basic design was to leverage a large amount of work over a small number of processors. When there is relatively little work to be performed by a large number of processors, then the system design should change. SMP systems are complicated to write and debug; single threaded applications are easier to design and debug. The SMP model suggests pushing more and more functionality into the kernel, or else that component will incur a Translation Lookaside Buffer (TLB) miss when it switches to the kernel for services. However, putting too much functionality into the kernel layer requires users to reboot systems upon upgrade of even the simplest subsystem.
Excessive Symmetric Multi-Processing (XSMP) is one embodiment of the present invention. XSMP is designed around the notion of the embedded system but with the features of fault isolation present. An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions. An example is a dedicated network storage server. As an embedded system, creating a high degree of isolation between separate instances of operating systems as with a hypervisor is not necessary.
XSMP is a system structure which efficiently utilizes processors and benefits from fault isolation. The model is structural, and many systems can be constructed using the model. One embodiment of XSMP is a system where multiple processors work efficiently in an asymmetric manner, passing data via high performance synchronous, non-blocking communication queues. One or more processors are assigned to performing work on each task and each task has its own address space and runs at a processor level above the kernel space, e.g., in user space. This model is made efficient with processors spinning on the receipt of data from other processors. While busy wait loops are typically shunned in system design, the rules are different when the number of processors is large.
In general, a processing system is composed of various software components (or processes). Each component is comprised of an address space and execution context. XSMP can be implemented using trusted components, shared address space (not necessarily writable by all components), a synchronous non-blocking communication mechanism between components (based on simple, low over-heard producer, consumer queues), one or more dedicated CPU cores with each component, and minimal functionality provided by the underlying O/S or hypervisor. In XSMP, the components do not use interrupts when dealing with devices or other components. In XSMP, components can generate an address which maps to the same data from other components. Also, synchronous non-blocking mechanism maintains locality: by not using a signaling mechanism, user code does not begin executing a signal handler asynchronously.
The idea of creating isolation is valuable from the point of view of creating resiliency in the face of software bugs. However, with performance being such an important part of system design, it's necessary to specifically address the data flow from one process (component or module) to another. The XSMP architecture is a way of designing a system to attain both fault isolation and high performance. The fault isolation is achieved by assigning major functional areas their own address space.
XSMP processes have a view on all of main memory. The benefit of this is so that virtual addresses to data in one address space can be passed to another address space. For example, a process will perform a virtual to physical address translation and then hand the physical address to another process. However, because there is a mapping of all main memory in virtual address space, the high order address bits are set so that the physical address becomes a valid virtual address that points to exactly the same location. XSMP processes have their Memory Management Unit (MMU) page tables visible within their address space: the page table is viewable through the read-only address space of all of main memory.
Also, in XSMP, communication between components is implemented by using full-duplex producer/consumer communication queue. Each component's functionality is derived by the contents and order of its in-bound queues. The output of the component is reflected in the out-bound queues.
At the same time, latency and contention among processes to access hardware devices is less of an issue because each process can independently request to access hardware devices, subject to the efficiency of hardware devices themselves. By isolating each process using shared read-only address space that maps the entire physical memory, fault tolerant system can be implemented without sacrificing performance efficiency.
For example, assume a machine with 1 GB of physical memory with a 30 bit address range and the address range is 0×0000_0000 to 0×3FFF_FFFF. Further, assume a virtual address 0×0012—3000, the physical address that backs 0×0012—3000 is 0×3456—7000, and a mapping for physical memory starting at address 0×C000—0000, i.e., if the two high order address bits are set, then the virtual address maps directly to physical memory with the same offset as the low order 30 bits. If the high order two address bits are set, then the address becomes: 0×F456—7000.
Processes begin as normal processes, but as soon as a process requests XSMP services, then the kernel 46 tags it as an XSMP process. In one embodiment, the XSMP process features include:
1. Physically contiguous memory on a per page directory basis. In an Intel PAE environment (36 bit physical addressing extension) that would be a 2 MB basis. In a non-PAE environment, it is a 4 MB basis. On other processor architectures, the basis can be different.
2. The MMU is mapped into the process as read-only. With this feature, processes can perform virtual to physical address translation.
3. Read-only address access to the entire physical address range. The high order N bits of the virtual address of the RO address space is non-zero. This allows other processes that receive the RO address of one process to be able to identify the source process of that address. However, in another embodiment, the high order bits of the RO address do not need to contain the process identification of the originating XSMP process from which the RO address was computed.
4. An XSMP process specific data structure for kernel to process communication. In this mode there is a region of memory where the kernel can communicate information with the XSMP process, including termination of other XSMP processes, requests for resource changes (e.g. increase/decrease in memory, request for add/delete of processors), etc. However, there is certain kernel to process communication which is unavoidably synchronous and can not be issued through communication channels. For example, if a process executes a divide by 0, the processor will take an exception and run kernel code. One method is for processes to either install a signal handler for divide by 0 (and other traps) to handle the error or to not handle the error in which case the kernel will immediately terminated the XSMP process.
In the design of XSMP, synchronous non-blocking I/O is used to achieve high performance. Synchronous non-blocking I/O is a send of a request to another process (or system component) and then polling for a response, as opposed to blocking. The blocking involves waiting for an interrupt. The polling occurs in the context of the process scheduler. For a cooperatively based system, interrupts only serve to cause the scheduling of a process. That process will run no sooner than the next time the scheduler runs (and there can be higher priority processes, for example). Thus, if the scheduler is written to check a list of completion notifications, then it has the same effect as an interrupt without the TLB effects and other CPU instruction obstruction.
At 601, a reference to a VA is made in a process. The VA is produced by a source XSMP process when the process needs to make the address of a memory region to be visible to another XSMP process. An example is when a memory buffer is to be written to disk or transmitted over the network. The address of the buffer is a virtual address constructed by the source XSMP process.
At 602, the VA is converted to a PA using a mapping structure. The PA is constructed by software using processes including “walking the page table” which is a process well understood by one skilled in the art of operating system theory. (Generally, this is a process of looking up page table elements in the page table using as indexes into the various tables components of the virtual address.) Another way of converting a virtual address to a physical address is to use a recursive page table entry.
At 603, a read-only memory address is created by the XSMP process by taking the physical address, which is the output of 601 and then taking on the high order bits. Those high order bits may be the same across all processes or they may be different to distinguish the source XSMP process from which the RO address originated. For example, assume that in a 64 bit address space, a process is given reference to a virtual memory address for data. Further, assume that the virtual addresses 0×0000_Fxxx_xxxx_xxxx map all of physical memory. Once a process converts an address from its regular VA to PA, then the process can prepend the bits 0×0000_F to the high-order bits of the address (which would necessarily not have any of those bits set, because physical addresses are well below that address) to create an RO version of the address to the data referenced.
Then at 604, the process which has performed this operation shares this new RO address with one or more other processes. For example, at 605, the receiving process of the RO address will have the RO address space present, if the process is XSMP enabled. The receiving process can read the same data as the sender process had read.
Another aspect of XSMP is that a kernel which supports the XSMP architecture needs to give additional support to the applications that run on XSMP. For example, XSMP processes are assumed to have their own separate threading model and scheduler. In one embodiment, XSMP uses a cooperatively scheduled threading model. When a process needs to be categorized as an XSMP process, that process will request additional XSMP services from the kernel. The application can make all of its own scheduling decisions and will not yield the CPU to the kernel during normal operation, including not executing interrupt service routines (ISRs) on a processor running an XSMP process. Also, XSMP processes will have direct access to and modify its own MMU page tables (the real page tables the CPU is looking at). This allows the process to perform virtual to physical translations and to map and unmap pages that have come from other domains. However, it should be noted that in another embodiment, a system can deliver interrupts to XSMP processes, and/or XSMP processes do not modify the MMU page tables.
Therefore, the kernel in one embodiment of XSMP has the following aspects:
1. There is no interrupt generation for maintaining locality: interrupt service routines are not executed on CPUs running components.
2. Synchronous non-blocking kernel communication: Components do not have to switch into the kernel via a system trap. In addition, components are designed such that component to kernel transitions are minimal, and many kernel requests can be made without blocking, waiting for a response.
3. Notifications of started/terminated components using unobtrusive notifications (i.e., not signals): Components can need to be aware of status changes among other components within the system; the notifications do not require interrupt or signal notification, but can be communicated via other existing methods.
All XSMP processes either receive requests from other processes (XSMP or not), generate requests for other processes, or directly control an adapter driver. An XSMP process registers itself with the kernel so that other processes can find that process. The notification about other XSMP processes is via a request queue from the kernel.
An XSMP process can ask the kernel for references to other processes that have registered themselves. Also, in one embodiment, the kernel does not assign interrupts to execute on any processors handed to XSMP processes. This includes the timer interrupt. Therefore, the processors running XSMP processes run XSMP processes until such time as the process calls into the kernel or crashes (e.g., divide by 0, touching an illegal address, issuing an illegal instruction). In addition, an XSMP processes can have write access to their MMU structures.
Therefore, in one embodiment of XSMP, context-switch free component model is used: components do not jump around because of signals, nor does the CPU executing component code arbitrarily begin executing interrupt service routines on behalf of the kernel. By including the MMU page tables in the address space of the component, the component can translate a virtual address to a physical address without a context switch to the kernel. However, it should be noted that in another embodiment of XSMP, a system can deliver interrupts to the XSMP process.
Thus, a method and system for sharing a read-only address space among multiple user space processes to improve network storage server performance are described. The techniques introduced above can be implemented in special-purpose hardwired circuitry, in software and/or firmware in conjunction with programmable circuitry, or in a combination thereof. Special-purpose hardwired circuitry can be in the form of, for example, one or more application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), etc.
Software or firmware to implement the techniques introduced here can be stored on a machine-readable medium and can be executed by one or more general-purpose or special-purpose programmable microprocessors. A “machine-readable medium”, as the term is used herein, includes any mechanism that provides (i.e., stores and/or transmits) information in a form accessible by a machine (e.g., a computer, network device, personal digital assistant (PDA), manufacturing tool, any device with a set of one or more processors, etc.). For example, a machine-accessible medium includes recordable/non-recordable media (e.g., read-only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.), etc.
Although the present invention has been described with reference to specific exemplary embodiments, it will be recognized that the invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. Accordingly, the specification and drawings are to be regarded in an illustrative sense rather than a restrictive sense.
Number | Date | Country | |
---|---|---|---|
Parent | 12143592 | Jun 2008 | US |
Child | 14196136 | US |