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 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
|
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mailbox Distribution — Cyrus IMAP 3.10.2 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/cyrus.css" type="text/css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Delayed Delete" href="delayed-delete.html" />
<link rel="prev" title="Mailbox Annotations (METADATA)" href="mailbox-annotations.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home">
Cyrus IMAP
</a>
<div class="version">
3.10.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Cyrus IMAP</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../download.html">Download</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../quickstart.html">Quickstart Guide</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../../overview.html">Overview</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../features.html">Features</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../features.html#security-and-authentication">Security and Authentication</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../features.html#mailbox-management">Mailbox Management</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="automatic-creation-of-mailboxes.html">Automatic Creation of Mailboxes</a></li>
<li class="toctree-l4"><a class="reference internal" href="namespaces.html">Mailbox Namespaces</a></li>
<li class="toctree-l4"><a class="reference internal" href="virtual-domains.html">Virtual Domains</a></li>
<li class="toctree-l4"><a class="reference internal" href="mailbox-annotations.html">Mailbox Annotations (METADATA)</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">Mailbox Distribution</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../features.html#message-management">Message Management</a></li>
<li class="toctree-l3"><a class="reference internal" href="../features.html#calendar-and-contact-dav-collection-management">Calendar and Contact (DAV) Collection Management</a></li>
<li class="toctree-l3"><a class="reference internal" href="../features.html#storage">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="../features.html#load-management">Load Management</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../overview_and_concepts.html">Concepts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../setup.html">Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../operations.html">Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../developers.html">Developers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../support.html">Support/Community</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Cyrus SASL</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="http://www.cyrusimap.org/sasl">Cyrus SASL</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">Cyrus IMAP</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../../overview.html">Overview</a></li>
<li class="breadcrumb-item"><a href="../features.html">Features</a></li>
<li class="breadcrumb-item active">Mailbox Distribution</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/cyrusimap/cyrus-imapd/blob/master/docsrc/imap/concepts/features/mailbox-distribution.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="mailbox-distribution">
<span id="imap-features-mailbox-distribution"></span><h1>Mailbox Distribution<a class="headerlink" href="#mailbox-distribution" title="Permalink to this heading"></a></h1>
<p>Prior to Cyrus IMAP version 2.5.0, when creating a mailbox, should no
target partition have been specified, the mailbox is either created on:</p>
<ul class="simple">
<li><p>the configured <code class="docutils literal notranslate"><span class="pre">defaultserver</span></code>, or</p></li>
<li><p>the server that is found to have the most free disk space, and</p></li>
<li><p>the configured <code class="docutils literal notranslate"><span class="pre">defaultpartition</span></code>, or</p></li>
<li><p>the most fitting partition if <code class="docutils literal notranslate"><span class="pre">defaultpartition</span></code> is not
configured.</p></li>
</ul>
<p>New configuration options are available since Cyrus IMAP 2.5.0, that
allow more weighted and better balanced backend and partition
selection.</p>
<section id="partition-selection-mode">
<h2>Partition Selection Mode<a class="headerlink" href="#partition-selection-mode" title="Permalink to this heading"></a></h2>
<p>Among the partitions, how the most fitting one is selected depends on
the configured selection mode, using the <code class="docutils literal notranslate"><span class="pre">partition_select_mode</span></code>
setting in <a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a>.</p>
<p class="rubric">Available Selection Modes</p>
<aside class="sidebar">
<p class="sidebar-title">Example Scenario for Selection Modes</p>
<p>Suppose that the partitions configured are:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Partition</p></th>
<th class="head"><p>Total</p></th>
<th class="head"><p>Free</p></th>
<th class="head"><p>%</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">part1</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>400 GB</p></td>
<td><p>40%</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">part2</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>600 GB</p></td>
<td><p>60%</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">part3</span></code></p></td>
<td><p>100 GB</p></td>
<td><p>30 GB</p></td>
<td><p>30%</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">part4</span></code></p></td>
<td><p>100 GB</p></td>
<td><p>70 GB</p></td>
<td><p>70%</p></td>
</tr>
</tbody>
</table>
</aside>
<ul>
<li><p><strong>random</strong></p>
<p>Choice is (pseudo-)random. Each partition has the same probability
of being selected.</p>
</li>
<li><p><strong>freespace-most</strong></p>
<p>The partition which has the most absolute free space (counted in KiB
units) is selected.</p>
<p>In the example scenario, <code class="docutils literal notranslate"><span class="pre">part2</span></code> would be selected as most
fitting, since 600 GB of free space is the biggest of all
partitions.</p>
</li>
<li><p><strong>freespace-percent-most</strong></p>
<p>The partition which has the most relative free space (counted in
percentiles) is selected.</p>
<p>In the example scenario, <code class="docutils literal notranslate"><span class="pre">part4</span></code> would be selected as most
fitting, since 70% of free space is the biggest of all partitions.</p>
</li>
<li><p><strong>freespace-percent-weighted</strong></p>
<p>For each partition, the percentage of free space is its weight. Then
a weighted choice is performed to select one of those partitions.</p>
<p>As such, the more free space the partition has, the higher its
chances to be selected.</p>
<p>In the example scenario, the weight of each partition would be:</p>
<ul class="simple">
<li><p>40 for <code class="docutils literal notranslate"><span class="pre">part1</span></code></p></li>
<li><p>60 for <code class="docutils literal notranslate"><span class="pre">part2</span></code></p></li>
<li><p>30 for <code class="docutils literal notranslate"><span class="pre">part3</span></code></p></li>
<li><p>70 for <code class="docutils literal notranslate"><span class="pre">part4</span></code></p></li>
</ul>
<p>The sum of all weights being 200, the probability for each
partition to be selected as most fitting is:</p>
<ul class="simple">
<li><p>20% for <code class="docutils literal notranslate"><span class="pre">part1</span></code></p></li>
<li><p>30% for <code class="docutils literal notranslate"><span class="pre">part2</span></code></p></li>
<li><p>15% for <code class="docutils literal notranslate"><span class="pre">part3</span></code></p></li>
<li><p>35% for <code class="docutils literal notranslate"><span class="pre">part4</span></code></p></li>
</ul>
<p>Out of 20 (hypothetically empty) mailboxes to be created,
chances are:</p>
<ul class="simple">
<li><p>4 are created on <code class="docutils literal notranslate"><span class="pre">part1</span></code></p></li>
<li><p>6 are created on <code class="docutils literal notranslate"><span class="pre">part2</span></code></p></li>
<li><p>3 are created on <code class="docutils literal notranslate"><span class="pre">part3</span></code></p></li>
<li><p>7 are created on <code class="docutils literal notranslate"><span class="pre">part4</span></code></p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In <code class="docutils literal notranslate"><span class="pre">freespace-percent-weighted</span></code> mode, partitions percentage
usages converge towards 100%. So if they have different usages,
those differences will stay and only really diminish upon
reaching 100% of usage.</p>
<p>You may also observe growing differences between partitions
usage when those partitions do not have the same total disk
space.</p>
</div>
</li>
</ul>
<p><strong>freespace-percent-weighted-delta</strong></p>
<blockquote>
<div><p>As for <code class="docutils literal notranslate"><span class="pre">freespace-percent-weighted</span></code>, a weight is associated to
each partition. It is computed as follows:</p>
<div class="math notranslate nohighlight">
\[free - leastfree + 0.5\]</div>
<p>Then a weighted choice is performed to select one of those
partitions.</p>
<p>As such, considering the percentages of usage, the more the
partition is lagging behind the most used partition (which is the
one with the lowest <strong>percentage</strong> of free space), the higher its
chances are to be selected.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The added 0.5 in partitions weight causes the selection to get
smoother the more partitions get close to each other.</p>
</div>
<p>In the example scenario, the weight of each partition would be:</p>
<ul class="simple">
<li><p>For <code class="docutils literal notranslate"><span class="pre">part1</span></code>: <span class="math notranslate nohighlight">\(40 - 30 + 0.5 = 10.5\)</span></p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part2</span></code>: <span class="math notranslate nohighlight">\(60 - 30 + 0.5 = 30.5\)</span></p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part3</span></code>: <span class="math notranslate nohighlight">\(30 - 30 + 0.5 = 00.5\)</span></p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part4</span></code>: <span class="math notranslate nohighlight">\(70 - 30 + 0.5 = 40.5\)</span></p></li>
</ul>
<p>The sum of all weights amounting to 82, the probability for each
partition to be selected as most fitting would be:</p>
<ul class="simple">
<li><p>For <code class="docutils literal notranslate"><span class="pre">part1</span></code>: 12.8%</p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part2</span></code>: 37.2%</p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part3</span></code>: 00.6%</p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">part4</span></code>: 49.4%</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In <code class="docutils literal notranslate"><span class="pre">freespace-percent-weighted-delta</span></code> mode, partitions
percentage usages converge towards the most used one, after
which partitions usages grow equally.</p>
</div>
</div></blockquote>
<section id="special-cases">
<h3>Special Cases<a class="headerlink" href="#special-cases" title="Permalink to this heading"></a></h3>
<section id="q-what-happens-when-two-partitions-are-equal-as-most-fitting">
<h4>Q: What happens when two partitions are equal as most fitting?<a class="headerlink" href="#q-what-happens-when-two-partitions-are-equal-as-most-fitting" title="Permalink to this heading"></a></h4>
<p>Suppose you are using the <code class="docutils literal notranslate"><span class="pre">freespace-most</span></code> selection mode, that two
(or more) partitions have the same free size, and that this freespace
happens to be the biggest one of all configured partitions.</p>
<p>In that case, only one of those partitions will be selected. You may not
know in advance which one will be: it depends of the order in which
configured partitions are stored in memory (<code class="docutils literal notranslate"><span class="pre">hashtable</span></code>). In
particular, it may not be the first one that appears listed in your
<a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a> configuration file.</p>
<p>Also note that since the selected partition will now have less free
space, it shall not be seen as most fitting next time.</p>
</section>
<section id="q-what-happens-when-two-partitions-point-to-the-same-device">
<h4>Q: What happens when two partitions point to the same device?<a class="headerlink" href="#q-what-happens-when-two-partitions-point-to-the-same-device" title="Permalink to this heading"></a></h4>
<p>Suppose you are using the <code class="docutils literal notranslate"><span class="pre">freespace-most</span></code> or
<code class="docutils literal notranslate"><span class="pre">freespace-percent-most</span></code> selection mode, and that two (or more)
partitions actually point to a different directory on the same
filesystem.</p>
<p>In that case, only one of those partitions will be checked, as if the
others were not configured. Cyrus IMAP uses the device id of the
partition hierarchy for this. You may not know in advance which one will
be: it depends of the order in which configured partitions are stored in
memory (<code class="docutils literal notranslate"><span class="pre">hashtable</span></code>). In particular, it may not be the first one that
appears listed in your <a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a> configuration file.</p>
</section>
</section>
<section id="excluding-partitions">
<h3>Excluding Partitions<a class="headerlink" href="#excluding-partitions" title="Permalink to this heading"></a></h3>
<p><strong>partition_select_exclude</strong></p>
<blockquote>
<div><p>Partitions listed in the <code class="docutils literal notranslate"><span class="pre">partition_select_exclude</span></code> setting in
<a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a> are permanently excluded from being
selected.</p>
<p>Listed partition's names are separated by spaces and/or commas. Only
configured partition names (and not paths) are expected.</p>
<p>With the following configuration in <a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a>,
<code class="docutils literal notranslate"><span class="pre">parta</span></code> and <code class="docutils literal notranslate"><span class="pre">partb</span></code> would be permanently excluded from being
selected:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">partition</span><span class="o">-</span><span class="n">part1</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">part1</span>
<span class="n">partition</span><span class="o">-</span><span class="n">part2</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">part2</span>
<span class="n">partition</span><span class="o">-</span><span class="n">part3</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">part3</span>
<span class="n">partition</span><span class="o">-</span><span class="n">part4</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">part4</span>
<span class="n">partition</span><span class="o">-</span><span class="n">parta</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">parta</span>
<span class="n">partition</span><span class="o">-</span><span class="n">partb</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">partb</span>
<span class="n">partition_mode_exclude</span><span class="p">:</span> <span class="n">parta</span> <span class="n">partb</span>
</pre></div>
</div>
</div></blockquote>
<p><strong>partition_select_soft_usage_limit</strong></p>
<blockquote>
<div><p>When using a selection mode other than <code class="docutils literal notranslate"><span class="pre">random</span></code>, partitions are
automatically excluded if their usage percentage is beyond the
<code class="docutils literal notranslate"><span class="pre">partition_select_soft_usage_limit</span></code> integer setting.</p>
<p>If all partitions are beyond the configured value, this feature is
automatically deactivated. A partition is thus selected as if the
setting was not configured.</p>
<p>In the example scenario, setting <code class="docutils literal notranslate"><span class="pre">partition_mode_soft_usage_limit</span></code>
to <code class="docutils literal notranslate"><span class="pre">50</span></code> would exclude partitions <code class="docutils literal notranslate"><span class="pre">part1</span></code> and <code class="docutils literal notranslate"><span class="pre">part3</span></code> since
their disk usages are 60% and 70% respectively.</p>
<p>But setting the option to <code class="docutils literal notranslate"><span class="pre">20</span></code> would have no immediate effect on
the selection of a partition, since the usage of all partitions is
beyond 20%.</p>
</div></blockquote>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p><strong>Exclusion is not absolute</strong></p>
<p>Partitions are only excluded when creating a new user mailbox
according to the configured selection mode.</p>
<p>If you explicitly specify an excluded partition, the mailbox will
be created on that partition.</p>
<p>Mailboxes previously created on such partitions are of course still
accessible, and subfolders are by default still created on the same
partition as the parent folder.</p>
</div>
</section>
<section id="partition-s-usage-information-reset">
<h3>Partition's Usage Information Reset<a class="headerlink" href="#partition-s-usage-information-reset" title="Permalink to this heading"></a></h3>
<p>By default, partition's usage information is retrieved only once -- when
the service first initializes.</p>
<p>If you tend to use the same service instance for a long lapse of time
and performs a large amount of mailbox creations, it may be useful to
configure the <code class="docutils literal notranslate"><span class="pre">partition_select_usage_reinit</span></code> setting so that
each partition's usage information is refreshed after the configured
number of creation requests.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This only concerns selection modes other than <cite>random`</cite>.</p>
</div>
</section>
</section>
<section id="backend-selection-mode-cyrus-imap-murder">
<h2>Backend Selection Mode (Cyrus IMAP Murder)<a class="headerlink" href="#backend-selection-mode-cyrus-imap-murder" title="Permalink to this heading"></a></h2>
<p>Upon creating a user mailbox, if the target server is not given as
extra parameter, the mailbox is created on either;</p>
<ul class="simple">
<li><p>the configured <code class="docutils literal notranslate"><span class="pre">defaultserver</span></code> backend</p></li>
<li><p>the most fitting backend (partition) among the servers listed in the
<code class="docutils literal notranslate"><span class="pre">serverlist</span></code> setting, if <code class="docutils literal notranslate"><span class="pre">defaultserver</span></code> is not configured.</p></li>
</ul>
<p class="rubric">Related Settings</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">serverlist_select_mode</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">serverlist_select_usage_reinit</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">serverlist_select_soft_usage_limit</span></code></p></li>
</ul>
<section id="available-selection-modes-on-frontend">
<h3>Available Selection Modes on Frontend<a class="headerlink" href="#available-selection-modes-on-frontend" title="Permalink to this heading"></a></h3>
<p><strong>random</strong></p>
<blockquote>
<div><p>The selection is (pseudo-)random. Each backend has the same
probability of being selected.</p>
</div></blockquote>
<aside class="sidebar">
<p class="sidebar-title">Example Scenario for Selection Modes</p>
<p>Suppose that the partitions configured are:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Backend</p></th>
<th class="head"><p>Partition</p></th>
<th class="head"><p>Total</p></th>
<th class="head"><p>Free</p></th>
<th class="head"><p>%</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">be1</span></code></p></td>
<td></td>
<td><p>2000 GB</p></td>
<td><p>1000 GB</p></td>
<td><p>50%</p></td>
</tr>
<tr class="row-odd"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part1</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>500 GB</p></td>
<td><p>50%</p></td>
</tr>
<tr class="row-even"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part2</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>500 GB</p></td>
<td><p>50%</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">be2</span></code></p></td>
<td></td>
<td><p>2000 GB</p></td>
<td><p>900 GB</p></td>
<td><p>45%</p></td>
</tr>
<tr class="row-even"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part1</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>200 GB</p></td>
<td><p>20%</p></td>
</tr>
<tr class="row-odd"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part2</span></code></p></td>
<td><p>1000 GB</p></td>
<td><p>700 GB</p></td>
<td><p>70%</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">be3</span></code></p></td>
<td></td>
<td><p>200 GB</p></td>
<td><p>110 GB</p></td>
<td><p>55%</p></td>
</tr>
<tr class="row-odd"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part1</span></code></p></td>
<td><p>100 GB</p></td>
<td><p>30 GB</p></td>
<td><p>30%</p></td>
</tr>
<tr class="row-even"><td></td>
<td><p><code class="docutils literal notranslate"><span class="pre">part2</span></code></p></td>
<td><p>100 GB</p></td>
<td><p>80 GB</p></td>
<td><p>80%</p></td>
</tr>
</tbody>
</table>
</aside>
<p><strong>freespace-most</strong></p>
<blockquote>
<div><p>The backend which has the most absolute free space (counted in KiB
units) is selected.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The considered free space is the sum of the free space on all
available partitions on the backend.</p>
</div>
<p>In the example scenario, <code class="docutils literal notranslate"><span class="pre">be1</span></code> would be selected as most fitting,
since 1000 GB of free space is the most of all backends.</p>
</div></blockquote>
<p><strong>freespace-percent-most</strong></p>
<blockquote>
<div><p>On each backend, only the partition with the most percentage of free
space is considered. The selected backend is the one whose partition
has the highest percentage of free space.</p>
<p>In the example scenario, <code class="docutils literal notranslate"><span class="pre">be3</span></code> would be selected as most fitting,
since it has a partition with 80% of free space which is the
highest of all backends.</p>
</div></blockquote>
<p><strong>freespace-percent-weighted</strong></p>
<blockquote>
<div><p>On each backend, only the partition with the most percentage of free
space is considered: this is the backend weight. Then a weighted
choice is performed to select one of the backends.</p>
<p>In the example scenario, the weight of each backend would be:</p>
<ul class="simple">
<li><p>50 for <code class="docutils literal notranslate"><span class="pre">be1</span></code></p></li>
<li><p>70 for <code class="docutils literal notranslate"><span class="pre">be2</span></code></p></li>
<li><p>80 for <code class="docutils literal notranslate"><span class="pre">be3</span></code></p></li>
</ul>
<p>The sum of all weights being 200, the probability for each backend
to be selected as most fitting would be:</p>
<ul class="simple">
<li><p>25% for <code class="docutils literal notranslate"><span class="pre">be1</span></code></p></li>
<li><p>35% for <code class="docutils literal notranslate"><span class="pre">be2</span></code></p></li>
<li><p>40% for <code class="docutils literal notranslate"><span class="pre">be3</span></code></p></li>
</ul>
</div></blockquote>
<p><strong>freespace-percent-weighted-delta</strong></p>
<blockquote>
<div><p>On each backend, only the partition with the most percentage of free
space is considered.</p>
<p>Like with <code class="docutils literal notranslate"><span class="pre">freespace-percent-weighted</span></code>, a weight is associated to
each backend. It is computed as follows:</p>
<div class="math notranslate nohighlight">
\[free - leastfree + 0.5\]</div>
<p>Then a weighted choice is performed to select one of the backends.</p>
<p>In the example scenario, the weight of each backend would be:</p>
<ul class="simple">
<li><p>For <code class="docutils literal notranslate"><span class="pre">be1</span></code>: <span class="math notranslate nohighlight">\(50 - 50 + 0.5 = 0.5\)</span></p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">be2</span></code>: <span class="math notranslate nohighlight">\(70 - 50 + 0.5 = 20.5\)</span></p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">be3</span></code>: <span class="math notranslate nohighlight">\(80 - 50 + 0.5 = 30.5\)</span></p></li>
</ul>
<p>Then the probability for each backend to be selected as most fitting would be:</p>
<ul class="simple">
<li><p>1.0% for <code class="docutils literal notranslate"><span class="pre">be1</span></code></p></li>
<li><p>39.8% for <code class="docutils literal notranslate"><span class="pre">be2</span></code></p></li>
<li><p>59.2% for <code class="docutils literal notranslate"><span class="pre">be3</span></code></p></li>
</ul>
</div></blockquote>
</section>
<section id="excluding-backends">
<h3>Excluding Backends<a class="headerlink" href="#excluding-backends" title="Permalink to this heading"></a></h3>
<p>When using a selection mode other than <code class="docutils literal notranslate"><span class="pre">random</span></code>, backends are
automatically excluded if their considered usage percentage is beyond
the <code class="docutils literal notranslate"><span class="pre">serverlist_select_soft_usage_limit</span></code> integer setting.</p>
</section>
<section id="backend-s-usage-information-reset">
<h3>Backend's Usage Information Reset<a class="headerlink" href="#backend-s-usage-information-reset" title="Permalink to this heading"></a></h3>
<p>By default backends usage data are retrieved only once upon service
initialization.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This only concerns selection modes other than <code class="docutils literal notranslate"><span class="pre">random</span></code>.</p>
</div>
<p>If you tend to use the same service instance for a long lapse of time
and performs a large amounts of mailbox creations, it may be useful to
configure the <code class="docutils literal notranslate"><span class="pre">serverlist_select_usage_reinit</span></code> so that the backend's
disk usage information is refreshed after the configured number of
creation requests.</p>
<p>Back to <a class="reference internal" href="../features.html#imap-features"><span class="std std-ref">Features</span></a></p>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="mailbox-annotations.html" class="btn btn-neutral float-left" title="Mailbox Annotations (METADATA)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="delayed-delete.html" class="btn btn-neutral float-right" title="Delayed Delete" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 1993–2025, The Cyrus Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
|