| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2020-03-03 07:56+0000\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: Title == |
| 20 |
#: latency.adoc:3 |
| 21 |
#, no-wrap |
| 22 |
msgid "Optimizing DRBD latency" |
| 23 |
msgstr "优化DRBD延迟" |
| 24 |
|
| 25 |
#. type: Plain text |
| 26 |
#: latency.adoc:8 |
| 27 |
msgid "" |
| 28 |
"This chapter deals with optimizing DRBD latency. It examines some hardware " |
| 29 |
"considerations with regard to latency minimization, and details tuning " |
| 30 |
"recommendations for that purpose." |
| 31 |
msgstr "本章讨论优化DRBD延迟。它研究了与延迟最小化有关的一些硬件考虑,并详细介绍了为此目的而提出的优化建议。" |
| 32 |
|
| 33 |
#. type: Title === |
| 34 |
#: latency.adoc:10 |
| 35 |
#, no-wrap |
| 36 |
msgid "Hardware considerations" |
| 37 |
msgstr "硬件注意事项" |
| 38 |
|
| 39 |
#. type: Plain text |
| 40 |
#: latency.adoc:15 |
| 41 |
msgid "" |
| 42 |
"DRBD latency is affected by both the latency of the underlying I/O subsystem" |
| 43 |
" (disks, controllers, and corresponding caches), and the latency of the " |
| 44 |
"replication network." |
| 45 |
msgstr "DRBD延迟既受底层I/O子系统(磁盘、控制器和相应缓存)的延迟影响,也受复制网络的延迟影响。" |
| 46 |
|
| 47 |
#. type: Block title |
| 48 |
#: latency.adoc:16 |
| 49 |
#, no-wrap |
| 50 |
msgid "I/O subsystem latency" |
| 51 |
msgstr "I/O子系统延迟" |
| 52 |
|
| 53 |
#. type: Plain text |
| 54 |
#: latency.adoc:20 |
| 55 |
msgid "" |
| 56 |
"indexterm:[latency]For _rotating media_ the I/O subsystem latency is " |
| 57 |
"primarily a function of disk rotation speed. Thus, using fast-spinning disks" |
| 58 |
" is a valid approach for reducing I/O subsystem latency." |
| 59 |
msgstr "" |
| 60 |
"indexterm:[latency]对于 _旋转媒体_ ,I/O子系统延迟主要是磁盘旋转速度的函数。因此,使用快速旋转的磁盘是减少I/O子系统延迟的有效方法。" |
| 61 |
|
| 62 |
#. type: Plain text |
| 63 |
#: latency.adoc:29 |
| 64 |
msgid "" |
| 65 |
"For _solid state media_ (like SSDs) the Flash storage controller is the " |
| 66 |
"determining factor; the next most important thing is the amount of unused " |
| 67 |
"capacity. Using DRBD's <<s-trim-discard>> will help you provide the " |
| 68 |
"controller with the needed information which blocks it can recycle. That " |
| 69 |
"way, when a write requests comes in, it can use a block that got cleaned " |
| 70 |
"ahead-of-time and doesn't have to wait *now* until there's space " |
| 71 |
"availablefootnote:[On low-end hardware you can help that a bit by reserving " |
| 72 |
"some space - just keep 10% to 20% of the total space unpartitioned.]." |
| 73 |
msgstr "" |
| 74 |
"对于 _固态媒体_ (如固态硬盘),闪存控制器是决定因素;下一个最重要的因素是未使用的容量。使用DRBD的<<s-trim-" |
| 75 |
"discard>>将帮助您向控制器提供所需的信息,哪些块可以循环使用。这样,当一个写请求进入时,它可以使用一个提前清理过的块,而不必等待至 *现在* 直到有可用的空间为止。footnote:[在低端硬件上,您可以通过保留一些空间来帮助这一点,只需保留总空间的10%到20%就可以了。]" |
| 76 |
|
| 77 |
#. type: Plain text |
| 78 |
#: latency.adoc:40 |
| 79 |
msgid "" |
| 80 |
"Likewise, the use of a indexterm:[battery-backed write cache] " |
| 81 |
"indexterm:[BBU] battery-backed write cache (BBWC) reduces write completion " |
| 82 |
"times, also reducing write latency. Most reasonable storage subsystems come " |
| 83 |
"with some form of battery-backed cache, and allow the administrator to " |
| 84 |
"configure which portion of this cache is used for read and write operations." |
| 85 |
" The recommended approach is to disable the disk read cache completely and " |
| 86 |
"use all available cache memory for the disk write cache." |
| 87 |
msgstr "" |
| 88 |
"同样,使用indexterm:[battery-backed write cache]indexterm:[BBU]battery-backed " |
| 89 |
"write " |
| 90 |
"cache(BBWC)可以减少写入完成时间,还可以减少写入延迟。大多数合理的存储子系统都带有某种形式的电池备份缓存,并允许管理员配置该缓存的哪个部分用于读写操作。建议的方法是完全禁用磁盘读缓存,并将所有可用的缓存内存用于磁盘写缓存。" |
| 91 |
|
| 92 |
#. type: Block title |
| 93 |
#: latency.adoc:41 |
| 94 |
#, no-wrap |
| 95 |
msgid "Network latency" |
| 96 |
msgstr "网络延迟" |
| 97 |
|
| 98 |
#. type: Plain text |
| 99 |
#: latency.adoc:50 |
| 100 |
msgid "" |
| 101 |
"indexterm:[latency]Network latency is, in essence, the packet " |
| 102 |
"indexterm:[round-trip-time]indexterm:[RTT] round-trip time (RTT) between " |
| 103 |
"hosts. It is influenced by a number of factors, most of which are irrelevant" |
| 104 |
" on the dedicated, back-to-back network connections recommended for use as " |
| 105 |
"DRBD replication links. Thus, it is sufficient to accept that a certain " |
| 106 |
"amount of latency always exists in network links, which typically is on the " |
| 107 |
"order of 100 to 200 microseconds (μs) packet RTT for Gigabit Ethernet." |
| 108 |
msgstr "" |
| 109 |
"indexterm:[latency]网络延迟, 实际上是包在indexterm:[round-trip-" |
| 110 |
"time]indexterm:[RTT]主机之间的往返时间(RTT)。它受到许多因素的影响,其中大多数因素与推荐用作DRBD复制链路的专用背靠背网络连接无关。因此,接受网络链路中始终存在一定量的延迟就足够了,对于千兆位以太网,该延迟通常在100到200微秒(μs)的分组RTT上。" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: latency.adoc:56 |
| 114 |
msgid "" |
| 115 |
"Network latency may typically be pushed below this limit only by using " |
| 116 |
"lower-latency network protocols, such as running DRBD over Dolphin Express " |
| 117 |
"using Dolphin SuperSockets, or a 10GBe direct connection; these are " |
| 118 |
"typically in the 50µs range. Even better is InfiniBand, which provides even " |
| 119 |
"lower latencies." |
| 120 |
msgstr "" |
| 121 |
"网络延迟通常只能通过使用较低延迟的网络协议(例如使用Dolphin SuperSockets在Dolphin " |
| 122 |
"Express上运行DRBD)或10GBe直接连接来推送到该限制之下;这些协议通常在50微秒范围内。更好的是InfiniBand,它提供了更低的延迟。" |
| 123 |
|
| 124 |
#. type: Title === |
| 125 |
#: latency.adoc:59 |
| 126 |
#, no-wrap |
| 127 |
msgid "Latency overhead expectations" |
| 128 |
msgstr "延迟开销预期" |
| 129 |
|
| 130 |
#. type: Plain text |
| 131 |
#: latency.adoc:63 |
| 132 |
msgid "" |
| 133 |
"As for throughput, when estimating the latency overhead associated with " |
| 134 |
"DRBD, there are some important natural limitations to consider:" |
| 135 |
msgstr "至于吞吐量,在估计与DRBD相关联的延迟开销时,需要考虑一些重要的自然限制:" |
| 136 |
|
| 137 |
#. type: Plain text |
| 138 |
#: latency.adoc:65 |
| 139 |
msgid "DRBD latency is bound by that of the raw I/O subsystem." |
| 140 |
msgstr "DRBD延迟受原始I/O子系统的延迟限制。" |
| 141 |
|
| 142 |
#. type: Plain text |
| 143 |
#: latency.adoc:66 |
| 144 |
msgid "DRBD latency is bound by the available network latency." |
| 145 |
msgstr "DRBD延迟受可用网络延迟的约束。" |
| 146 |
|
| 147 |
#. type: Plain text |
| 148 |
#: latency.adoc:71 |
| 149 |
msgid "" |
| 150 |
"The _sum_ of the two establishes the theoretical latency _minimum_ incurred " |
| 151 |
"to DRBDfootnote:[for protocol C, because the other node(s) have to write to " |
| 152 |
"stable storage, too]. DRBD then adds to that latency a slight additional " |
| 153 |
"latency overhead, which can be expected to be less than 1 percent." |
| 154 |
msgstr "" |
| 155 |
"两者之和确定了DRBD所产生的理论延迟最小值 footnote:[对于 protocol C,因为其他节点也必须写入稳定存储]。然后,DRBD会在这个延迟上增加一点额外的延迟开销,预计这个开销将小于1%。" |
| 156 |
|
| 157 |
#. type: Plain text |
| 158 |
#: latency.adoc:76 |
| 159 |
msgid "" |
| 160 |
"Consider the example of a local disk subsystem with a write latency of 3ms " |
| 161 |
"and a network link with one of 0.2ms. Then the expected DRBD latency would " |
| 162 |
"be 3.2 ms or a roughly 7-percent latency increase over just writing to a " |
| 163 |
"local disk." |
| 164 |
msgstr "" |
| 165 |
"以本地磁盘子系统为例,其写延迟为3ms,网络链路为0.2ms。那么,预期的DRBD延迟将为3.2ms,或者仅写到本地磁盘的延迟大约增加7%。" |
| 166 |
|
| 167 |
#. type: Plain text |
| 168 |
#: latency.adoc:79 |
| 169 |
msgid "" |
| 170 |
"Latency may be influenced by a number of other factors, including CPU cache " |
| 171 |
"misses, context switches, and others." |
| 172 |
msgstr "延迟可能会受到许多其他因素的影响,包括CPU缓存未命中、上下文切换和其他因素。" |
| 173 |
|
| 174 |
#. type: Title === |
| 175 |
#: latency.adoc:82 |
| 176 |
#, no-wrap |
| 177 |
msgid "Latency vs. IOPs" |
| 178 |
msgstr "延迟与IOPs" |
| 179 |
|
| 180 |
#. type: Plain text |
| 181 |
#: latency.adoc:86 |
| 182 |
msgid "" |
| 183 |
"indexterm:[latency]indexterm:[IOPs]_IOPs_ is the abbreviation of \"__I/O " |
| 184 |
"operations per second__\"." |
| 185 |
msgstr "indexterm:[latency]indexterm:[IOPs]_IOPs_ 是 \"每秒I/O操作数\" 的缩写。" |
| 186 |
|
| 187 |
#. type: Plain text |
| 188 |
#: latency.adoc:92 |
| 189 |
msgid "" |
| 190 |
"Marketing typically doesn't like numbers that get smaller; press releases " |
| 191 |
"aren't written with \"__Latency reduced by 10µs, from 50µs to 40µs now!__\" " |
| 192 |
"in mind, they like \"__Performance increased by 25%, from 20000 to now 25000" |
| 193 |
" IOPs__\" much more. Therefore IOPs were invented - to get a number that " |
| 194 |
"says \"higher is better\"." |
| 195 |
msgstr "" |
| 196 |
"市场营销通常不喜欢数字变小;新闻稿的撰写不会描述成 \"延迟减少10微秒,从50微秒减少到40微秒!\"! - 记住,他们更喜欢 \"IOPs性能提高了25%,从20000提高到现在的25000\" 。因此,IOPs被发明出来,以得到一个 \"越高越好\" 的数字。" |
| 197 |
|
| 198 |
#. type: Plain text |
| 199 |
#: latency.adoc:100 |
| 200 |
msgid "" |
| 201 |
"So, in other words, IOPs are the reciprocal of latency. What you'll have to " |
| 202 |
"keep in mind is that the method given in <<s-measure-latency>> gives you the" |
| 203 |
" latency resp. the number of IOPs for a purely sequential, single-threaded " |
| 204 |
"IO load, while most other documentation will give numbers for some highly " |
| 205 |
"parallel loadfootnote:[Like in \"__16 threads, IO-depth of 32__\" - this " |
| 206 |
"means that 512 I/O-requests are being done in parallel!], because this gives" |
| 207 |
" much \"prettier\" numbers. With that kind of trick DRBD does offer you " |
| 208 |
"100000 IOPs, too!" |
| 209 |
msgstr "" |
| 210 |
"换句话说,IOPs是延迟的倒数。您需要记住的是,在<<s-measure-" |
| 211 |
"latency>>中给出的方法为您提供了延迟响应。纯顺序单线程IO加载的IOPs数,而大多数其他文档将给出一些高度并行加载的数字footnote:[如在 \"__16线程,IO深度为32__\" – 这意味着512个I/O请求是并行完成的!],因为这给了很多 \"漂亮\" 的数字。有了这种技巧,DRBD也能为您提供100000" |
| 212 |
" IOPs!" |
| 213 |
|
| 214 |
#. type: Plain text |
| 215 |
#: latency.adoc:107 |
| 216 |
msgid "" |
| 217 |
"So, please don't shy away from measuring serialized, single-threaded " |
| 218 |
"latency. If you want lots of IOPs, run the `fio` utility with `threads=8` " |
| 219 |
"and an `iodepth=16`, or some similar settings... But please keep in mind " |
| 220 |
"that these number will not have any meaning to your setup, unless you're " |
| 221 |
"driving a database with many tens or hundreds of client connections active " |
| 222 |
"at the same time." |
| 223 |
msgstr "" |
| 224 |
"所以,请不要回避测量序列化的单线程延迟。如果需要大量IOPs,请运行 `threads=8` 和 `iodepth=16` 的 `fio` 实用程序,或一些类似的设置。。。但是请记住,这些数字对您的设置没有任何意义,除非您正在驱动一个同时有数十或数百个客户端连接处于活动状态的数据库。" |
| 225 |
|
| 226 |
#. type: Title === |
| 227 |
#: latency.adoc:110 |
| 228 |
#, no-wrap |
| 229 |
msgid "Tuning recommendations" |
| 230 |
msgstr "调整建议" |
| 231 |
|
| 232 |
#. type: Title ==== |
| 233 |
#: latency.adoc:113 |
| 234 |
#, no-wrap |
| 235 |
msgid "Setting DRBD's CPU mask" |
| 236 |
msgstr "设置DRBD的CPU掩码" |
| 237 |
|
| 238 |
#. type: Plain text |
| 239 |
#: latency.adoc:118 |
| 240 |
msgid "" |
| 241 |
"DRBD allows for setting an explicit CPU mask for its kernel threads. This is" |
| 242 |
" particularly beneficial for applications which would otherwise compete with" |
| 243 |
" DRBD for CPU cycles." |
| 244 |
msgstr "DRBD允许为其内核线程设置显式CPU掩码。这对于那些在CPU周期上与DRBD竞争的应用程序尤其有利。" |
| 245 |
|
| 246 |
#. type: Plain text |
| 247 |
#: latency.adoc:126 |
| 248 |
msgid "" |
| 249 |
"The CPU mask is a number in whose binary representation the least " |
| 250 |
"significant bit represents the first CPU, the second-least significant bit " |
| 251 |
"the second, and so forth. A set bit in the bitmask implies that the " |
| 252 |
"corresponding CPU may be used by DRBD, whereas a cleared bit means it must " |
| 253 |
"not. Thus, for example, a CPU mask of 1 (`00000001`) means DRBD may use the " |
| 254 |
"first CPU only. A mask of 12 (`00001100`) implies DRBD may use the third and" |
| 255 |
" fourth CPU." |
| 256 |
msgstr "" |
| 257 |
"CPU掩码是其二进制表示中的最低有效位表示第一CPU、第二最低有效位表示第二CPU的数字,依此类推。位掩码中的设置位表示DRBD可以使用相应的CPU,而清除位表示它不能使用。因此,例如,CPU掩码1(`00000001`)意味着DRBD只能使用第一个CPU。掩码12(`00001100`)表示DRBD可以使用第三和第四CPU。" |
| 258 |
|
| 259 |
#. type: Plain text |
| 260 |
#: latency.adoc:129 |
| 261 |
msgid "An example CPU mask configuration for a resource may look like this:" |
| 262 |
msgstr "资源的CPU掩码配置示例如下:" |
| 263 |
|
| 264 |
#. type: delimited block - |
| 265 |
#: latency.adoc:139 |
| 266 |
#, no-wrap |
| 267 |
msgid "" |
| 268 |
"resource <resource> {\n" |
| 269 |
" options {\n" |
| 270 |
" cpu-mask 2;\n" |
| 271 |
" ...\n" |
| 272 |
" }\n" |
| 273 |
" ...\n" |
| 274 |
"}\n" |
| 275 |
msgstr "" |
| 276 |
"resource <resource> {\n" |
| 277 |
" options {\n" |
| 278 |
" cpu-mask 2;\n" |
| 279 |
" ...\n" |
| 280 |
" }\n" |
| 281 |
" ...\n" |
| 282 |
"}\n" |
| 283 |
|
| 284 |
#. type: Plain text |
| 285 |
#: latency.adoc:144 |
| 286 |
msgid "" |
| 287 |
"Of course, in order to minimize CPU competition between DRBD and the " |
| 288 |
"application using it, you need to configure your application to use only " |
| 289 |
"those CPUs which DRBD does not use." |
| 290 |
msgstr "当然,为了减少DRBD和使用它的应用程序之间的CPU竞争,您需要将应用程序配置为只使用DRBD不使用的那些CPU。" |
| 291 |
|
| 292 |
#. type: Plain text |
| 293 |
#: latency.adoc:148 |
| 294 |
msgid "" |
| 295 |
"Some applications may provide for this via an entry in a configuration file," |
| 296 |
" just like DRBD itself. Others include an invocation of the `taskset` " |
| 297 |
"command in an application init script." |
| 298 |
msgstr "" |
| 299 |
"一些应用程序可以通过配置文件中的一个条目来提供这一点,就像DRBD本身一样。其他方法包括在应用程序init脚本中调用 `taskset` 命令。" |
| 300 |
|
| 301 |
#. type: delimited block = |
| 302 |
#: latency.adoc:153 |
| 303 |
msgid "" |
| 304 |
"It makes sense to keep the DRBD threads running on the same L2/L3 caches." |
| 305 |
msgstr "保持DRBD线程在相同的L2/L3缓存上运行是有意义的。" |
| 306 |
|
| 307 |
#. type: delimited block = |
| 308 |
#: latency.adoc:157 |
| 309 |
msgid "" |
| 310 |
"But: the numbering of CPUs doesn't have to correlate with the physical " |
| 311 |
"partitioning. You can try the `lstopo` (or `hwloc-ls`) program for X11 or " |
| 312 |
"`hwloc-info -v -p` for console output to get an overview of the topology." |
| 313 |
msgstr "" |
| 314 |
"但是:CPU的编号并不一定与物理分区相关。您可以尝试X11的 `lstopo` (或 `hwloc ls` )程序或控制台输出的 `hwloc-info -v -p` " |
| 315 |
"程序,以获得拓扑的概述。" |
| 316 |
|
| 317 |
#. type: Title ==== |
| 318 |
#: latency.adoc:161 |
| 319 |
#, no-wrap |
| 320 |
msgid "Modifying the network MTU" |
| 321 |
msgstr "修改网络MTU" |
| 322 |
|
| 323 |
#. type: Plain text |
| 324 |
#: latency.adoc:167 |
| 325 |
msgid "" |
| 326 |
"It may be beneficial to change the replication network's maximum " |
| 327 |
"transmission unit (MTU) size to a value higher than the default of 1500 " |
| 328 |
"bytes. Colloquially, this is referred to as indexterm:[Jumbo frames] " |
| 329 |
"\"enabling Jumbo frames\"." |
| 330 |
msgstr "" |
| 331 |
"将复制网络的最大传输单元(MTU)大小更改为高于默认值1500字节的值可能是有益的。通俗地说,这称为indexterm:[Jumbo " |
| 332 |
" frames] \"启用Jumbo frames\"。" |
| 333 |
|
| 334 |
#. type: Plain text |
| 335 |
#: latency.adoc:169 |
| 336 |
msgid "The MTU may be changed using the following commands:" |
| 337 |
msgstr "可以使用以下命令更改MTU:" |
| 338 |
|
| 339 |
#. type: delimited block - |
| 340 |
#: latency.adoc:171 |
| 341 |
#, no-wrap |
| 342 |
msgid "# ifconfig <interface> mtu <size>\n" |
| 343 |
msgstr "# ifconfig <interface> mtu <size>\n" |
| 344 |
|
| 345 |
#. type: Plain text |
| 346 |
#: latency.adoc:173 |
| 347 |
msgid "or" |
| 348 |
msgstr "或" |
| 349 |
|
| 350 |
#. type: delimited block - |
| 351 |
#: latency.adoc:175 |
| 352 |
#, no-wrap |
| 353 |
msgid "# ip link set <interface> mtu <size>\n" |
| 354 |
msgstr "# ip link set <interface> mtu <size>\n" |
| 355 |
|
| 356 |
#. type: Plain text |
| 357 |
#: latency.adoc:179 |
| 358 |
msgid "" |
| 359 |
"_<interface>_ refers to the network interface used for DRBD replication. A " |
| 360 |
"typical value for _<size>_ would be 9000 (bytes)." |
| 361 |
msgstr "_<interface>_ 指用于DRBD复制的网络接口。_<size>_ 的典型值为9000(字节)。" |
| 362 |
|
| 363 |
#. type: Title ==== |
| 364 |
#: latency.adoc:181 |
| 365 |
#, no-wrap |
| 366 |
msgid "Enabling the deadline I/O scheduler" |
| 367 |
msgstr "启用deadline I/O调度器" |
| 368 |
|
| 369 |
#. type: Plain text |
| 370 |
#: latency.adoc:188 |
| 371 |
msgid "" |
| 372 |
"indexterm:[io scheduler] When used in conjunction with high-performance, " |
| 373 |
"write back enabled hardware RAID controllers, DRBD latency may benefit " |
| 374 |
"greatly from using the simple deadline I/O scheduler, rather than the CFQ " |
| 375 |
"scheduler. The latter is typically enabled by default." |
| 376 |
msgstr "" |
| 377 |
"indexterm:[I O " |
| 378 |
"scheduler]当与高性能、支持写回的硬件RAID控制器结合使用时,DRBD延迟可能从使用简单的deadline I/O scheduler而不是CFQ调度器中受益匪浅。后者通常在默认情况下启用。" |
| 379 |
|
| 380 |
#. type: Plain text |
| 381 |
#: latency.adoc:193 |
| 382 |
msgid "" |
| 383 |
"Modifications to the I/O scheduler configuration may be performed via the " |
| 384 |
"`sysfs` virtual file system, mounted at `/sys`. The scheduler configuration " |
| 385 |
"is in `/sys/block/__device__`, where _<device>_ is the backing device DRBD " |
| 386 |
"uses." |
| 387 |
msgstr "" |
| 388 |
"对I/O调度程序配置的修改可以通过挂载在 `/sys` 的 `sysfs` 虚拟文件系统执行。调度程序配置位于 `/sys/block/__device__` " |
| 389 |
"其中 _<device>_ 是DRBD使用的备份设备。" |
| 390 |
|
| 391 |
#. type: Plain text |
| 392 |
#: latency.adoc:195 |
| 393 |
msgid "Enabling the deadline scheduler works via the following command:" |
| 394 |
msgstr "Enabling the deadline scheduler works via the following command:" |
| 395 |
|
| 396 |
#. type: delimited block - |
| 397 |
#: latency.adoc:197 |
| 398 |
#, no-wrap |
| 399 |
msgid "# echo deadline > /sys/block/<device>/queue/scheduler\n" |
| 400 |
msgstr "# echo deadline > /sys/block/<device>/queue/scheduler\n" |
| 401 |
|
| 402 |
#. type: Plain text |
| 403 |
#: latency.adoc:201 |
| 404 |
msgid "" |
| 405 |
"You may then also set the following values, which may provide additional " |
| 406 |
"latency benefits:" |
| 407 |
msgstr "然后,您还可以设置以下值,这些值可以提供额外的延迟好处:" |
| 408 |
|
| 409 |
#. type: Plain text |
| 410 |
#: latency.adoc:203 |
| 411 |
msgid "Disable front merges:" |
| 412 |
msgstr "禁用前台合并:" |
| 413 |
|
| 414 |
#. type: delimited block - |
| 415 |
#: latency.adoc:206 |
| 416 |
#, no-wrap |
| 417 |
msgid "# echo 0 > /sys/block/<device>/queue/iosched/front_merges\n" |
| 418 |
msgstr "# echo 0 > /sys/block/<device>/queue/iosched/front_merges\n" |
| 419 |
|
| 420 |
#. type: Plain text |
| 421 |
#: latency.adoc:209 |
| 422 |
msgid "Reduce read I/O deadline to 150 milliseconds (the default is 500ms):" |
| 423 |
msgstr "将读取I/O deadline时间缩短到150毫秒(默认为500毫秒):" |
| 424 |
|
| 425 |
#. type: delimited block - |
| 426 |
#: latency.adoc:212 |
| 427 |
#, no-wrap |
| 428 |
msgid "# echo 150 > /sys/block/<device>/queue/iosched/read_expire\n" |
| 429 |
msgstr "# echo 150 > /sys/block/<device>/queue/iosched/read_expire\n" |
| 430 |
|
| 431 |
#. type: Plain text |
| 432 |
#: latency.adoc:216 |
| 433 |
msgid "" |
| 434 |
"Reduce write I/O deadline to 1500 milliseconds (the default is 3000ms):" |
| 435 |
msgstr "将写入I/O deadline时间缩短到1500毫秒(默认值为3000毫秒):" |
| 436 |
|
| 437 |
#. type: delimited block - |
| 438 |
#: latency.adoc:219 |
| 439 |
#, no-wrap |
| 440 |
msgid "# echo 1500 > /sys/block/<device>/queue/iosched/write_expire\n" |
| 441 |
msgstr "# echo 1500 > /sys/block/<device>/queue/iosched/write_expire\n" |
| 442 |
|
| 443 |
#. type: Plain text |
| 444 |
#: latency.adoc:226 |
| 445 |
msgid "" |
| 446 |
"If these values effect a significant latency improvement, you may want to " |
| 447 |
"make them permanent so they are automatically set at system startup. " |
| 448 |
"indexterm:[Debian GNU/Linux]Debian and indexterm:[Ubuntu Linux]Ubuntu " |
| 449 |
"systems provide this functionality via the `sysfsutils` package and the " |
| 450 |
"`/etc/sysfs.conf` configuration file." |
| 451 |
msgstr "" |
| 452 |
"如果这些值影响显著的延迟改进,则可能需要将它们永久化,以便在系统启动时自动设置它们。indexterm:[Debian " |
| 453 |
"GNU/Linux]Debian和indexterm:[Ubuntu " |
| 454 |
"Linux]Ubuntu系统通过 `sysfsutils` 包和 `/etc/sysfs.conf` 配置文件提供此功能。" |
| 455 |
|
| 456 |
#. type: Plain text |
| 457 |
#: latency.adoc:231 |
| 458 |
msgid "" |
| 459 |
"You may also make a global I/O scheduler selection by passing the `elevator`" |
| 460 |
" option via your kernel command line. To do so, edit your boot loader " |
| 461 |
"configuration (normally found in `/etc/default/grub` if you are using the " |
| 462 |
"GRUB bootloader) and add `elevator=deadline` to your list of kernel boot " |
| 463 |
"options." |
| 464 |
msgstr "" |
| 465 |
"还可以通过通过内核命令行传递 `elevator` 选项来选择全局I/O调度程序。为此,编辑引导加载程序配置(如果使用的是grub引导加载程序,通常可以在 `/etc/default/grub` 中找到),并将 `elevator=deadline` 添加到内核引导选项列表中。" |