📄 vinum-access-bottlenecks.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Access Bottlenecks</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="The Vinum Volume Manager" href="vinum-vinum.html" /><link rel="PREVIOUS" title="Disks Are Too Small" href="vinum-intro.html" /><link rel="NEXT" title="Data Integrity" href="vinum-data-integrity.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="vinum-intro.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 17 The Vinum Volume Manager</td><td width="10%" align="right" valign="bottom"><a href="vinum-data-integrity.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="VINUM-ACCESS-BOTTLENECKS" name="VINUM-ACCESS-BOTTLENECKS">17.3Access Bottlenecks</a></h1><p>Modern systems frequently need to access data in a highly concurrent manner. Forexample, large FTP or HTTP servers can maintain thousands of concurrent sessions and havemultiple 100 Mbit/s connections to the outside world, well beyond the sustainedtransfer rate of most disks.</p><p>Current disk drives can transfer data sequentially at up to 70 MB/s, but thisvalue is of little importance in an environment where many independent processes access adrive, where they may achieve only a fraction of these values. In such cases it is moreinteresting to view the problem from the viewpoint of the disk subsystem: the importantparameter is the load that a transfer places on the subsystem, in other words the timefor which a transfer occupies the drives involved in the transfer.</p><p>In any disk transfer, the drive must first position the heads, wait for the firstsector to pass under the read head, and then perform the transfer. These actions can beconsidered to be atomic: it does not make any sense to interrupt them.</p><p><a id="VINUM-LATENCY" name="VINUM-LATENCY"></a> Consider a typical transfer of about10 kB: the current generation of high-performance disks can position the heads in anaverage of 3.5 ms. The fastest drives spin at 15,000 rpm, so the averagerotational latency (half a revolution) is 2 ms. At 70 MB/s, the transfer itselftakes about 150 μs, almost nothing compared to the positioning time. In such acase, the effective transfer rate drops to a little over 1 MB/s and is clearlyhighly dependent on the transfer size.</p><p>The traditional and obvious solution to this bottleneck is ``more spindles'': ratherthan using one large disk, it uses several smaller disks with the same aggregate storagespace. Each disk is capable of positioning and transferring independently, so theeffective throughput increases by a factor close to the number of disks used.</p><p>The exact throughput improvement is, of course, smaller than the number of disksinvolved: although each drive is capable of transferring in parallel, there is no way toensure that the requests are evenly distributed across the drives. Inevitably the load onone drive will be higher than on another.</p><p>The evenness of the load on the disks is strongly dependent on the way the data isshared across the drives. In the following discussion, it is convenient to think of thedisk storage as a large number of data sectors which are addressable by number, ratherlike the pages in a book. The most obvious method is to divide the virtual disk intogroups of consecutive sectors the size of the individual physical disks and store them inthis manner, rather like taking a large book and tearing it into smaller sections. Thismethod is called <span class="emphasis"><i class="EMPHASIS">concatenation</i></span> andhas the advantage that the disks are not required to have any specific sizerelationships. It works well when the access to the virtual disk is spread evenly aboutits address space. When access is concentrated on a smaller area, the improvement is lessmarked. <a href="vinum-access-bottlenecks.html#VINUM-CONCAT">Figure 17-1</a> illustratesthe sequence in which storage units are allocated in a concatenated organization.</p><p></p><div class="FIGURE"><a id="VINUM-CONCAT" name="VINUM-CONCAT"></a><p><b>Figure 17-1. Concatenated Organization</b></p><p><img src="vinum/vinum-concat.png" /></p></div><br /><br /><p>An alternative mapping is to divide the address space into smaller, equal-sizedcomponents and store them sequentially on different devices. For example, the first 256sectors may be stored on the first disk, the next 256 sectors on the next disk and so on.After filling the last disk, the process repeats until the disks are full. This mappingis called <span class="emphasis"><i class="EMPHASIS">striping</i></span> or <acronymclass="ACRONYM">RAID-0</acronym> <a id="AEN26016" name="AEN26016"href="#FTN.AEN26016"><span class="footnote">[1]</span></a>. Striping requires somewhatmore effort to locate the data, and it can cause additional I/O load where a transfer isspread over multiple disks, but it can also provide a more constant load across thedisks. <a href="vinum-access-bottlenecks.html#VINUM-STRIPED">Figure 17-2</a> illustratesthe sequence in which storage units are allocated in a striped organization.</p><p></p><div class="FIGURE"><a id="VINUM-STRIPED" name="VINUM-STRIPED"></a><p><b>Figure 17-2. Striped Organization</b></p><p><img src="vinum/vinum-striped.png" /></p></div><br /><br /></div><h3 class="FOOTNOTES">Notes</h3><table border="0" class="FOOTNOTES" width="100%"><tr><td align="LEFT" valign="TOP" width="5%"><a id="FTN.AEN26016" name="FTN.AEN26016"href="vinum-access-bottlenecks.html#AEN26016"><span class="footnote">[1]</span></a></td><td align="LEFT" valign="TOP" width="95%"><p><acronym class="ACRONYM">RAID</acronym> stands for <span class="emphasis"><iclass="EMPHASIS">Redundant Array of Inexpensive Disks</i></span> and offers various formsof fault tolerance, though the latter term is somewhat misleading: it provides noredundancy.</p></td></tr></table><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="vinum-intro.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="vinum-data-integrity.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Disks Are Too Small</td><td width="34%" align="center" valign="top"><a href="vinum-vinum.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Data Integrity</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -