Memory Systems : Cache, DRAM, Disk
Total Page:16
File Type:pdf, Size:1020Kb
CHAPTER 24 Storage Subsystems Up to this point, the discussions in Part III of this with how multiple drives within a subsystem can be book have been on the disk drive as an individual organized together, cooperatively, for better reliabil- storage device and how it is directly connected to a ity and performance. This is discussed in Sections host system. This direct attach storage (DAS) para- 24.1–24.3. A second aspect deals with how a storage digm dates back to the early days of mainframe subsystem is connected to its clients and accessed. computing, when disk drives were located close to Some form of networking is usually involved. This is the CPU and cabled directly to the computer system discussed in Sections 24.4–24.6. A storage subsystem via some control circuits. This simple model of disk can be designed to have any organization and use any drive usage and confi guration remained unchanged of the connection methods discussed in this chapter. through the introduction of, fi rst, the mini computers Organization details are usually made transparent to and then the personal computers. Indeed, even today user applications by the storage subsystem presenting the majority of disk drives shipped in the industry are one or more virtual disk images, which logically look targeted for systems having such a confi guration. like disk drives to the users. This is easy to do because However, this simplistic view of the relationship logically a disk is no more than a drive ID and a logical between the disk drive and the host system does not address space associated with it. The storage subsys- tell the whole story for today’s higher end computing tem software understands what organization is being environment. Sometime around the 1990s, computing used and knows how to map the logical addresses evolved from being computation-centric to storage- of the virtual disk to the addresses of the underlying centric. The motto is: “He who holds the data holds the physical devices. This concept is described as virtual- answer.” Global commerce, fueled by explosive growth ization in the storage community. in the use of the Internet, demands 24/7 access to an ever-increasing amount of data. The decentralization of departmental computing into networked individual 24.1 Data Striping workstations requires effi cient sharing of data. Storage When a set of disk drives are co-located, such as all subsystems, basically a collection of disk drives, and being mounted in the same rack, solely for the purpose perhaps some other backup storage devices such as of sharing physical resources such as power and cool- tape and optical disks, that can be managed together, ing, there is no logical relationship between the drives. evolved out of necessity. The management software can Each drive retains its own identity, and to the user it either be run in the host computer itself or may reside exhibits the same behavioral characteristics as those in a dedicated processing unit serving as the storage discussed in previous chapters. A term has been coined controller. In this chapter, welcome to the alphabet to describe this type of storage subsystems—JBOD, for soup world of storage subsystems, with acronyms like just-a-bunch of disks. There is nothing more to be said DAS, NAS, SAN, iSCSI, JBOD, RAID, MAID, etc. about JBOD in the remainder of this chapter. There are two orthogonal aspects of storage sub- The simplest organizational relationship that systems to be discussed here. One aspect has to do can be established for a set of drives is that of data 763 764 Memory Systems: Cache, DRAM, Disk striping. With data striping, a set of K drives are ganged Disk 1 Disk 2 Disk 3 together to form a data striping group or data striping array, and K is referred to as the stripe width. The data e1 e2 e3 striping group is a logical entity whose logical address e4 f1 f2 space is sectioned into fi xed-sized blocks called stripe units. The size of a stripe unit is called the stripe size f3 f4 f5 and is usually specifi able in most storage subsystems by the administrator setting up the stripe array. These f6 f7 g1 stripe units are assigned to the drives in the striping array in a round-robin fashion. This way, if a user’s fi le h1 h2 is larger than the stripe size, it will be broken up and stored in multiple drives. Figure 24.1 illustrates how four user fi les of different sizes are stored in a striping array of width 3. File e takes up four stripe units and FIGURE 24.1: An example of a data striping array with a stripe spans all three disks of the array, with Disk 1 holding width = 3. Four user files e, f, g, and h of different sizes are two units, while Disks 2 and 3 hold one unit each. File shown. f continues with seven stripe units and also spans all three disks with multiple stripe units in each disk. File where SPT is the number of sectors per track. When g is a small fi le requiring only one stripe unit and is all data striping is used, the I/O time is contained in one disk. File h is a medium size fi le and spans two of the three disks in the array. seek time 1 R ϫ K/(K 1 1) 1 FS R/K SPT The purpose of data striping is to improve perfor- (EQ 24.2) mance. The initial intent for introducing striping was so that data could be transferred in parallel to/from Assuming the seek times are the same in both multiple drives, thus cutting down data transfer time. cases, data striping is faster than non-striping when Clearly, this makes sense only if the amount of data transfer is large. To access the drives in parallel, all R/2 1 f R/SPT . R K/(K 1 1) 1 f R/K SPT drives involved must perform a seek operation and (EQ 24.3) take a rotational latency overhead. Assuming the cyl- inder positions of all the arms are roughly in sync, the which happens when seek times for all drives are about the same. However, since most arrays do not synchronize the rotation f . K SPT/2(K 1 1) (EQ 24.4) of their disks,1 the average rotational latency for the last drive out of K drives to be ready is R K/(K ϩ 1), Thus, the stripe size should be chosen to be at least where R is the time for one disk revolution. This is SPT/2(K 1 1) sectors in size3 so that smaller fi les do higher than the latency of R/2 for a single drive. Let not end up being striped. FS be the number of sectors of a fi le. The I/O comple- That, however, is only part of the story. With striping, tion time without data striping is2 all the drives are tied up servicing a single command. Furthermore, the seek and rotational latency overhead seek time 1 R/2 1 FS ϫ R/SPT (EQ 24.1) of one command must be paid by every one of the 1Actually, synchronizing the rotation of the disks would not necessarily help either, since the fi rst stripe unit of a fi le in each of the drives may not be the same stripe unit in all the drives. As File f in Figure 24.1 illustrates, f1 and f2 are the sec- ond stripe unit in Disks 2 and 3, but f3 is the third stripe unit in Disk 1. 2Track skew is ignored in this simple analysis. 3Later, in Section 24.3.2, there is an opposing argument for using a smaller stripe size. Chapter 24 STORAGE SUBSYSTEMS 765 drives involved. In other words, the overhead is paid slow response times due to long queueing delays,4 for K times. On the other hand, if striping is not used, even though many other drives are sitting idle. With then each drive can be servicing a different command. data striping, due to the way logical address space is The seek and latency overhead of each command are spread among the drives, each user’s fi les are likely paid for by only one disk, i.e., one time only. Thus, no to be more or less evenly distributed to all the drives matter what the stripe size and the request size are, instead of all concentrated in one drive. As a result, data striping will never have a better total throughput the workload to a subsystem at any moment in time for the storage subsystem as a whole when compared is likely to be roughly divided evenly among all the to non-striping. In the simplest case where all com- drives. It is this elimination of hot drives in a storage mands are of the same size f, the throughput for data subsystem that makes data striping a useful strat- striping is inversely proportional to Equation 24.1, egy for performance improvement when supporting while that for non-striping is inversely proportional to multiple users. Equation 24.2 times K. Only when both seek time and rotational latency are zero, as in sequential access, can the two be equal. Thus, as long as there are multiple I/Os that can keep individual disks busy, parallel trans- 24.2 Data Mirroring fer offers no throughput advantage. If the host system The technique of using data striping as an organiza- has only a single stream of long sequential accesses as tion is purely for improving performance.