This file is indexed.

/usr/share/doc/ganeti/html/design-move-instance-improvements.html is in ganeti-doc 2.16.0~rc2-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
<!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" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Instance move improvements &#8212; Ganeti 2.16.0~rc2 documentation</title>
    <link rel="stylesheet" href="_static/style.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2.16.0~rc2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Moving instances across node groups" href="design-multi-reloc.html" />
    <link rel="prev" title="Ganeti monitoring agent" href="design-monitoring-agent.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="design-multi-reloc.html" title="Moving instances across node groups"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="design-monitoring-agent.html" title="Ganeti monitoring agent"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="instance-move-improvements">
<h1><a class="toc-backref" href="#id1">Instance move improvements</a><a class="headerlink" href="#instance-move-improvements" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Created:</th><td class="field-body">2014-Apr-11</td>
</tr>
<tr class="field-even field"><th class="field-name">Status:</th><td class="field-body">Partially Implemented</td>
</tr>
<tr class="field-odd field"><th class="field-name">Ganeti-Version:</th><td class="field-body">2.12.0</td>
</tr>
</tbody>
</table>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#instance-move-improvements" id="id1">Instance move improvements</a><ul>
<li><a class="reference internal" href="#the-performance-of-ganeti-moves" id="id2">The performance of Ganeti moves</a><ul>
<li><a class="reference internal" href="#encryption-and-ganeti-security" id="id3">Encryption and Ganeti security</a></li>
<li><a class="reference internal" href="#compression" id="id4">Compression</a></li>
</ul>
</li>
<li><a class="reference internal" href="#zeroing-instance-disks" id="id5">Zeroing instance disks</a><ul>
<li><a class="reference internal" href="#zeroing-approaches" id="id6">Zeroing approaches</a></li>
<li><a class="reference internal" href="#implementation" id="id7">Implementation</a></li>
<li><a class="reference internal" href="#when-to-use-zeroing" id="id8">When to use zeroing</a></li>
</ul>
</li>
<li><a class="reference internal" href="#lock-reduction" id="id9">Lock reduction</a></li>
<li><a class="reference internal" href="#introduction-of-changes" id="id10">Introduction of changes</a></li>
</ul>
</li>
</ul>
</div>
<p>Ganeti provides tools for moving instances within and between clusters. Through
special export and import calls, a new instance is created with the disk data of
the existing one.</p>
<p>The tools work correctly and reliably, but depending on bandwidth and priority,
an instance disk of considerable size requires a long time to transfer. The
length of the transfer is inconvenient at best, but the problem becomes only
worse if excessive locking causes a move operation to be delayed for a longer
period of time, or to block other operations.</p>
<p>The performance of moves is a complex topic, with available bandwidth,
compression, and encryption all being candidates for choke points that bog down
a transfer. Depending on the environment a move is performed in, tuning these
can have significant performance benefits, but Ganeti does not expose many
options needed for such tuning. The details of what to expose and what tradeoffs
can be made will be presented in this document.</p>
<p>Apart from existing functionality, some beneficial features can be introduced to
help with instance moves. Zeroing empty space on instance disks can be useful
for drastically improving the qualities of compression, effectively not needing
to transfer unused disk space during moves. Compression itself can be improved
by using different tools. The encryption used can be weakened or eliminated for
certain moves. Using opportunistic locking during instance moves results in
greater parallelization. As all of these approaches aim to tackle two different
aspects of the problem, they do not exclude each other and will be presented
independently.</p>
<div class="section" id="the-performance-of-ganeti-moves">
<h2><a class="toc-backref" href="#id2">The performance of Ganeti moves</a><a class="headerlink" href="#the-performance-of-ganeti-moves" title="Permalink to this headline"></a></h2>
<p>In the current implementation, there are three possible factors limiting the
speed of an instance move. The first is the network bandwidth, which Ganeti can
exploit better by using compression. The second is the encryption, which is
obligatory, and which can throttle an otherwise fast connection. The third is
surprisingly the compression, which can cause the connection to be
underutilized.</p>
<p>Example 1: some numbers present during an intra-cluster instance move:</p>
<ul class="simple">
<li>Network bandwidth: 105MB/s, courtesy of a gigabit switch</li>
<li>Encryption performance: 40MB/s, provided by OpenSSL</li>
<li>Compression performance: 22.3MB/s input, 7.1MB/s gzip compressed output</li>
</ul>
<p>As can be seen in this example, the obligatory encryption results in 62% of
available bandwidth being wasted, while using compression further lowers the
throughput to 55% of what the encryption would allow. The following sections
will talk about these numbers in more detail, and suggest improvements and best
practices.</p>
<div class="section" id="encryption-and-ganeti-security">
<h3><a class="toc-backref" href="#id3">Encryption and Ganeti security</a><a class="headerlink" href="#encryption-and-ganeti-security" title="Permalink to this headline"></a></h3>
<p>Turning compression and encryption off would allow for an immediate improvement,
and while that is possible for compression, there are good reasons why
encryption is currently not a feature a user can disable.</p>
<p>While it is impossible to secure instance data if an attacker gains SSH access
to a node, the RAPI was designed to never allow user data to be accessed through
it in case of being compromised. If moves could be performed unencrypted, this
property would be broken. Instance moves can take place in environments which
may be hostile, and where unencrypted traffic could be intercepted. As they can
be instigated through the RAPI, an attacker could access all data on all
instances in a cluster by moving them unencrypted and intercepting the data in
flight. This is one of the few situations where the current speed of instance
moves could be considered a perk.</p>
<p>The performance of encryption can be increased by either using a less secure
form of encryption, including no encryption, or using a faster encryption
algorithm. The example listed above utilizes AES-256, one of the few ciphers
that Ganeti deems secure enough to use. AES-128, also allowed by Ganeti’s
current settings, is weaker but 46% faster. A cipher that is not allowed due to
its flaws, such as RC4, could offer a 208% increase in speed. On the other hand,
using an OS capable of utilizing the AES_NI chip present on modern hardware
can double the performance of AES, making it the best tradeoff between security
and performance.</p>
<p>Ganeti cannot and should not detect all the factors listed above, but should
rather give its users some leeway in what to choose. A precedent already exists,
as intra-cluster DRBD replication is already performed unencrypted, albeit on a
separate VLAN. For intra-cluster moves, Ganeti should allow its users to set
OpenSSL ciphers at will, while still enforcing high-security settings for moves
between clusters.</p>
<p>Thus, two settings will be introduced:</p>
<ul class="simple">
<li>a cluster-level setting called <code class="docutils literal"><span class="pre">--allow-cipher-bypassing</span></code>, a boolean that
cannot be set over RAPI</li>
<li>a gnt-instance move setting called <code class="docutils literal"><span class="pre">--ciphers-to-use</span></code>, bypassing the default
cipher list with given ciphers, filtered to ensure no other OpenSSL options
are passed in within</li>
</ul>
<p>This change will serve to address the issues with moving non-redundant instances
within the cluster, while keeping Ganeti security at its current level.</p>
</div>
<div class="section" id="compression">
<h3><a class="toc-backref" href="#id4">Compression</a><a class="headerlink" href="#compression" title="Permalink to this headline"></a></h3>
<p>Support for disk compression during instance moves was partially present before,
but cleaned up and unified under the <code class="docutils literal"><span class="pre">--compress</span></code> option only as of Ganeti
2.11. The only option offered by Ganeti is gzip with no options passed to it,
resulting in a good compression ratio, but bad compression speed.</p>
<p>As compression can affect the speed of instance moves significantly, it is
worthwhile to explore alternatives. To test compression tool performance, an 8GB
drive filled with data matching the expected usage patterns (taken from a
workstation) was compressed by using various tools with various settings. The
two top performers were <code class="docutils literal"><span class="pre">lzop</span></code> and, surprisingly, <code class="docutils literal"><span class="pre">gzip</span></code>. The improvement in
the performance of <code class="docutils literal"><span class="pre">gzip</span></code> was obtained by explicitly optimizing for speed
rather than compression.</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">gzip</span> <span class="pre">-6</span></code>: 22.3MB/s in, 7.1MB/s out</li>
<li><code class="docutils literal"><span class="pre">gzip</span> <span class="pre">-1</span></code>: 44.1MB/s in, 15.1MB/s out</li>
<li><code class="docutils literal"><span class="pre">lzop</span></code>: 71.9MB/s in, 28.1MB/s out</li>
</ul>
<p>If encryption is the limiting factor, and as in the example, limits the
bandwidth to 40MB/s, <code class="docutils literal"><span class="pre">lzop</span></code> allows for an effective 79% increase in transfer
speed. The fast <code class="docutils literal"><span class="pre">gzip</span></code> would also prove to be beneficial, but much less than
<code class="docutils literal"><span class="pre">lzop</span></code>. It should also be noted that as a rule of thumb, tools with a lower
compression ratio had a lesser workload, with <code class="docutils literal"><span class="pre">lzop</span></code> straining the CPU much
less than any of the competitors.</p>
<p>With the test results present here, it is clear that <code class="docutils literal"><span class="pre">lzop</span></code> would be a very
worthwhile addition to the compression options present in Ganeti, yet the
problem is that it is not available by default on all distributions, as the
option’s presence might imply. In general, Ganeti may know how to use several
tools, and check for their presence, but should add some way of at least hinting
at which tools are available.</p>
<p>Additionally, the user might want to use a tool that Ganeti did not account for.
Allowing the tool to be named is also helpful, both for cases when multiple
custom tools are to be used, and for distinguishing between various tools in
case of e.g. inter-cluster moves.</p>
<p>To this end, the <code class="docutils literal"><span class="pre">--compression-tools</span></code> cluster parameter will be added to
Ganeti. It contains a list of names of compression tools that can be supplied as
the parameter of <code class="docutils literal"><span class="pre">--compress</span></code>, and by default it contains all the tools
Ganeti knows how to use. The user can change the list as desired, removing
entries that are not or should not be available on the cluster, and adding
custom tools.</p>
<p>Every custom tool is identified by its name, and Ganeti expects the name to
correspond to a script invoking the compression tool. Without arguments, the
script compresses input on stdin, outputting it on stdout. With the -d argument,
the script does the same, only while decompressing. The -h argument is used to
check for the presence of the script, and in this case, only the error code is
examined. This syntax matches the <code class="docutils literal"><span class="pre">gzip</span></code> syntax well, which should allow most
compression tools to be adapted to it easily.</p>
<p>Ganeti will not allow arbitrary parameters to be passed to a compression tool,
and will restrict the names to contain only a small but assuredly safe subset of
characters - alphanumeric values and dashes and underscores. This minimizes the
risk of security issues that could arise from an attacker smuggling a malicious
command through RAPI. Common variations, like the speed/compression tradeoff of
<code class="docutils literal"><span class="pre">gzip</span></code>, will be handled by aliases, e.g. <code class="docutils literal"><span class="pre">gzip-fast</span></code> or <code class="docutils literal"><span class="pre">gzip-slow</span></code>.</p>
<p>It should also be noted that for some purposes - e.g. the writing of OVF files,
<code class="docutils literal"><span class="pre">gzip</span></code> is the only allowed means of compression, and an appropriate error
message should be displayed if the user attempts to use one of the other
provided tools.</p>
</div>
</div>
<div class="section" id="zeroing-instance-disks">
<h2><a class="toc-backref" href="#id5">Zeroing instance disks</a><a class="headerlink" href="#zeroing-instance-disks" title="Permalink to this headline"></a></h2>
<p>While compression lowers the amount of data sent, further reductions can be
achieved by taking advantage of the structure of the disk - namely, sending only
used disk sectors.</p>
<p>There is no direct way to achieve this, as it would require that the
move-instance tool is aware of the structure of the file system. Mounting the
filesystem is not an option, primarily due to security issues. A disk primed to
take advantage of a disk driver exploit could cause an attacker to breach
instance isolation and gain control of a Ganeti node.</p>
<p>An indirect way for this performance gain to be achieved is the zeroing of any
hard disk space not in use. While this primarily means empty space, swap
partitions can be zeroed as well.</p>
<p>Sequences of zeroes can be compressed and thus transferred very efficiently, all
without the host knowing that these are empty space. This approach can also be
dangerous if a sparse disk is zeroed in this way, causing ballooning. As Ganeti
does not seem to make special concessions for moving sparse disks, the only
difference should be the disk space utilization on the current node.</p>
<div class="section" id="zeroing-approaches">
<h3><a class="toc-backref" href="#id6">Zeroing approaches</a><a class="headerlink" href="#zeroing-approaches" title="Permalink to this headline"></a></h3>
<p>Zeroing is a feasible approach, but the node cannot perform it as it cannot
mount the disk. Only virtualization-based options remain, and of those, using
Ganeti’s own virtualization capabilities makes the most sense. There are two
ways of doing this - creating a new helper instance, temporary or persistent, or
reusing the target instance.</p>
<p>Both approaches have their disadvantages. Creating a new helper instance
requires managing its lifecycle, taking special care to make sure no helper
instance remains left over due to a failed operation. Even if this were to be
taken care of, disks are not yet separate entities in Ganeti, making the
temporary transfer of disks between instances hard to implement and even harder
to make robust. The reuse can be done by modifying the OS running on the
instance to perform the zeroing itself when notified via the new instance
communication mechanism, but this approach is neither generic, nor particularly
safe. There is no guarantee that the zeroing operation will not interfere with
the normal operation of the instance, nor that it will be completed if a
user-initiated shutdown occurs.</p>
<p>A better solution can be found by combining the two approaches - re-using the
virtualized environment, but with a specifically crafted OS image. With the
instance shut down as it should be in preparation for the move, it can be
extended with an additional disk with the OS image on it. By prepending the
disk and changing some instance parameters, the instance can boot from it. The
OS can be configured to perform the zeroing on startup, attempting to mount any
partitions with a filesystem present, and creating and deleting a zero-filled
file on them. After the zeroing is complete, the OS should shut down, and the
master should note the shutdown and restore the instance to its previous state.</p>
<p>Note that the requirements above are very similar to the notion of a helper VM
suggested in the OS install document. Some potentially unsafe actions are
performed within a virtualized environment, acting on disks that belong or will
belong to the instance. The mechanisms used will thus be developed with both
approaches in mind.</p>
</div>
<div class="section" id="implementation">
<h3><a class="toc-backref" href="#id7">Implementation</a><a class="headerlink" href="#implementation" title="Permalink to this headline"></a></h3>
<p>There are two components to this solution - the Ganeti changes needed to boot
the OS, and the OS image used for the zeroing. Due to the variety of filesystems
and architectures that instances can use, no single ready-to-run disk image can
satisfy the needs of all the Ganeti users. Instead, the instance-debootstrap
scripts can be used to generate a zeroing-capable OS image. This might not be
ideal, as there are lightweight distributions that take up less space and boot
up more quickly. Generating those with the right set of drivers for the
virtualization platform of choice is not easy. Thus we do not provide a script
for this purpose, but the user is free to provide any OS image which performs
the necessary steps: zero out all virtualization-provided devices on startup,
shutdown immediately. The cluster-wide parameter controlling the image to be
used would be called <code class="docutils literal"><span class="pre">--zeroing-image</span></code>.</p>
<p>The modifications to Ganeti code needed are minor. The zeroing functionality
should be implemented as an extension of the instance export, and exposed as the
<code class="docutils literal"><span class="pre">--zero-free-space</span> <span class="pre">option</span></code>. Prior to beginning the export, the instance
configuration is temporarily extended with a new read-only disk of sufficient
size to host the zeroing image, and the changes necessary for the image to be
used as the boot drive. The temporary nature of the configuration changes
requires that they are not propagated to other nodes. While this would normally
not be feasible with an instance using a disk template offering multi-node
redundancy, experiments with the code have shown that the restriction on
diverse disk templates can be bypassed to temporarily allow a plain
disk-template disk to host the zeroing image. Given that one of the planned
changes in Ganeti is to have instance disks as separate entities, with no
restriction on templates, this assumption is useful rather than harmful by
asserting the desired behavior. The image is dumped to the disk, and the
instance is started up.</p>
<p>Once the instance is started up, the zeroing will proceed until completion, when
a self-initiated shutdown will occur. The instance-shutdown detection
capabilities of 2.11 should prevent the watcher from restarting the instance
once this happens, allowing the host to take it as a sign the zeroing was
completed. Either way, the host waits until the instance is shut down, or a
timeout has been reached and the instance is forcibly shut down. As the time
needed to zero an instance is dependent on the size of the disk of the instance,
the user can provide a fixed and a per-size timeout, recommended to be set to
twice the maximum write speed of the device hosting the instance.</p>
<p>Better progress monitoring can be implemented with the instance-host
communication channel proposed by the OS install design document. The first
version will most likely use only the shutdown detection, and will be improved
to account for the available communication channel at a later time.</p>
<p>After the shutdown, the temporary disk is destroyed and the instance
configuration is reverted to its original state. The very same action is done if
any error is encountered during the zeroing process. In the case that the
zeroing is interrupted while the zero-filled file is being written, the file may
remain on the disk of the instance. The script that performs the zeroing will be
made to react to system signals by deleting the zero-filled file, but there is
little else that can be done to recover.</p>
</div>
<div class="section" id="when-to-use-zeroing">
<h3><a class="toc-backref" href="#id8">When to use zeroing</a><a class="headerlink" href="#when-to-use-zeroing" title="Permalink to this headline"></a></h3>
<p>The question of when it is useful to use zeroing is hard to answer because the
effectiveness of the approach depends on many factors. All compression tools
compress zeroes to almost nothingness, but compressing them takes time. If the
time needed to compress zeroes were equal to zero, the approach would boil down
to whether it is faster to zero unused space out, performing writes to disk, or
to transfer it compressed. For the example used above, the average compression
ratio, and write speeds of current disk drives, the answer would almost
unanimously be yes.</p>
<p>With a more realistic setup, where zeroes take time to compress, yet less time
than ordinary data, the gains depend on the previously mentioned tradeoff and
the free space available. Zeroing will definitely lessen the amount of bandwidth
used, but it can lead to the connection being underutilized due to the time
spent compressing data. It is up to the user to make these tradeoffs, but
zeroing should be seen primarily as a means of further reducing the amount of
data sent while increasing disk activity, with possible speed gains that should
not be relied upon.</p>
<p>In the future, the VM created for zeroing could also undertake other tasks
related to the move, such as compression and encryption, and produce a stream
of data rather than just modifying the disk. This would lessen the strain on
the resources of the hypervisor, both disk I/O and CPU usage, and allow moves to
obey the resource constraints placed on the instance being moved.</p>
</div>
</div>
<div class="section" id="lock-reduction">
<h2><a class="toc-backref" href="#id9">Lock reduction</a><a class="headerlink" href="#lock-reduction" title="Permalink to this headline"></a></h2>
<p>An instance move as executed by the move-instance tool consists of several
preparatory RAPI calls, leading up to two long-lasting opcodes: OpCreateInstance
and OpBackupExport. While OpBackupExport locks only the instance, the locks of
OpCreateInstance require more attention.</p>
<p>When executed, this opcode attempts to lock all nodes on which the instance may
be created and obtain shared locks on the groups they belong to. In the case
that an IAllocator is used, this means all nodes must be locked. Any operation
that requires a node lock to be present can delay the move operation, and there
is no shortage of these.</p>
<p>The concept of opportunistic locking has been introduced to remedy exactly this
situation, allowing the IAllocator to lock as many nodes as possible. Depending
whether the allocation can be made on these nodes, the operation either proceeds
as expected, or fails noting that it is temporarily infeasible. The failure case
would change the semantics of the move-instance tool, which is expected to fail
only if the move is impossible. To yield the benefits of opportunistic locking
yet satisfy this constraint, the move-instance tool can be extended with the
–opportunistic-tries and –opportunistic-try-delay options. A number of
opportunistic instance creations are attempted, with a delay between attempts.
The delay is slightly altered every time to avoid timing issues. Should all
attempts fail, a normal instance creation is requested, which blocks until all
the locks can be acquired.</p>
<p>While it may seem excessive to grab so many node locks, the early release
mechanism is used to make the situation less dire, releasing all nodes that were
not chosen as candidates for allocation. This is taken to the extreme as all the
locks acquired are released prior to the start of the transfer, barring the
newly-acquired lock over the new instance. This works because all operations
that alter the node in a way which could affect the transfer:</p>
<ul class="simple">
<li>are prevented by the instance lock or instance presence, e.g. gnt-node remove,
gnt-node evacuate,</li>
<li>do not interrupt the transfer, e.g. a PV on the node can be set as
unallocatable, and the transfer still proceeds as expected,</li>
<li>do not care, e.g. a gnt-node powercycle explicitly ignores all locks.</li>
</ul>
<p>This invariant should be kept in mind, and perhaps verified through tests.</p>
<p>All in all, there is very little space to reduce the number of locks used, and
the only improvement that can be made is introducing opportunistic locking as an
option of move-instance.</p>
</div>
<div class="section" id="introduction-of-changes">
<h2><a class="toc-backref" href="#id10">Introduction of changes</a><a class="headerlink" href="#introduction-of-changes" title="Permalink to this headline"></a></h2>
<p>All the changes noted will be implemented in Ganeti 2.12, in the way described
in the previous chapters. They will be implemented as separate changes, first
the lock reduction, then the instance zeroing, then the compression
improvements, and finally the encryption changes.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Instance move improvements</a><ul>
<li><a class="reference internal" href="#the-performance-of-ganeti-moves">The performance of Ganeti moves</a><ul>
<li><a class="reference internal" href="#encryption-and-ganeti-security">Encryption and Ganeti security</a></li>
<li><a class="reference internal" href="#compression">Compression</a></li>
</ul>
</li>
<li><a class="reference internal" href="#zeroing-instance-disks">Zeroing instance disks</a><ul>
<li><a class="reference internal" href="#zeroing-approaches">Zeroing approaches</a></li>
<li><a class="reference internal" href="#implementation">Implementation</a></li>
<li><a class="reference internal" href="#when-to-use-zeroing">When to use zeroing</a></li>
</ul>
</li>
<li><a class="reference internal" href="#lock-reduction">Lock reduction</a></li>
<li><a class="reference internal" href="#introduction-of-changes">Introduction of changes</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="design-monitoring-agent.html"
                        title="previous chapter">Ganeti monitoring agent</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="design-multi-reloc.html"
                        title="next chapter">Moving instances across node groups</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/design-move-instance-improvements.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="design-multi-reloc.html" title="Moving instances across node groups"
             >next</a></li>
        <li class="right" >
          <a href="design-monitoring-agent.html" title="Ganeti monitoring agent"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2018, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Google Inc..
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.7.
    </div>
  </body>
</html>