mirror of https://gitee.com/bigwinds/arangodb
85 lines
5.8 KiB
HTML
85 lines
5.8 KiB
HTML
<html><head><title>ArangoDB Manual</title> <style media="screen" type="text/css" style="display:none">body{background-color:white;font:13px Helvetica,arial,freesans,clean,sans-serif;line-height:1.4;color:#333;}#access{font-size:16px;margin-left:12px;display:block;margin-left:10px;margin-right:10px;background-color:#F3F1EE!important;}#access a{border-right:1px solid #DBDEDF;color:#A49F96;display:block;line-height:38px;padding:0 10px;text-decoration:none;}#navigation ul{text-transform:uppercase;list-style:none;margin:0;}#navigation li{float:left;position:relative;}#container{width:920px;margin:0 auto;}a{color:#4183C4;text-decoration:none;}.contents h2{font-size:24px;border-bottom:1px solid #CCC;color:black;}.contents h1{font-size:33px;border-bottom:1px solid #CCC;color:black;}.clearfix:after{content:".";display:block;clear:both;font-size:0;height:0;visibility:hidden;}/**/ *:first-child+html .clearfix{min-height:0;}/**/ * html .clearfix{height:1%;}</style></head><body><div id="container"><img src="images/logo_arangodb.png" width="397" height="67" alt="ArangoDB"><div id="access" role="navigation"><div id="navigation"><ul id="menu-ahome" class="menu"><li><a href="Home.html">Table of contents</a></li> <li><a href="http://www.arangodb.org">ArangoDB homepage</a></li></ul></div><div class="clearfix"></div></div><div>
|
|
<!-- Generated by Doxygen 1.7.5.1 -->
|
|
</div>
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<h1>Administrating ArangoDB </h1> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<div class="textblock"><hr/>
|
|
<ul>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html">Administrating ArangoDB</a> <ul>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html#DbaManualBasicsDurability">Mostly Memory/Durability</a> </li>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html#DbaManualBasicsMvcc">AppendOnly/MVCC</a> </li>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html#DbaManualBasicsConfig">Configuration</a> <ul>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html#DbaManualBasicsConfigGlobal">Global Configuration</a> </li>
|
|
<li>
|
|
<a class="el" href="DbaManualBasics.html#DbaManualBasicsConfigCollection">Per Collection Configuration</a> </li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
<h2><a class="anchor" id="DbaManualBasicsDurability"></a>
|
|
Mostly Memory/Durability</h2>
|
|
<p>Database documents are stored in memory-mapped files. Per default, these memory-mapped files are synced regularly but not instantly. This is often a good tradeoff between storage performance and durability. If this level of durabiity is too low for an application, the server can also sync all modifications to disk instantly. This will give full durability but will come with a performance penalty as each data modification will trigger a sync I/O operation.</p>
|
|
<h2><a class="anchor" id="DbaManualBasicsMvcc"></a>
|
|
AppendOnly/MVCC</h2>
|
|
<p>Instead of overwriting existing documents, a completely new version of the document is generated. The two benefits are:</p>
|
|
<ul>
|
|
<li>Objects can be stored coherently and compactly in the main memory.</li>
|
|
<li>Objects are preserved-isolated writing and reading transactions allow accessing these objects for parallel operations.</li>
|
|
</ul>
|
|
<p>The system collects obsolete versions as garbage, recognizing them as forsaken. Garbage collection is asynchronous and runs parallel to other processes.</p>
|
|
<h2><a class="anchor" id="DbaManualBasicsConfig"></a>
|
|
Configuration</h2>
|
|
<h3><a class="anchor" id="DbaManualBasicsConfigGlobal"></a>
|
|
Global Configuration</h3>
|
|
<p>There are certain default values, which you can store in the configuration file or supply on the command line.</p>
|
|
<hr/>
|
|
<code><b>--database.maximal-journal-size <em>size</em></b></code><hr/>
|
|
Maximal size of journal in bytes. Can be overwritten when creating a new collection. Note that this also limits the maximal size of a single document.</p>
|
|
<p>The default is <code>32MB</code>. </p>
|
|
<hr/>
|
|
<code><b>--database.force-sync-shapes <em>boolean</em></b></code><hr/>
|
|
Force syncing of shape data to disk when writing shape information. If turned off, syncing will still happen for shapes of collections that have a waitForSync value of <code>true</code>. If turned on, syncing of shape data will always happen, regards of the value of waitForSync.</p>
|
|
<p>The default is <code>true</code>. </p>
|
|
<h3><a class="anchor" id="DbaManualBasicsConfigCollection"></a>
|
|
Per Collection Configuration</h3>
|
|
<p>You can configure the durability behavior on a per collection basis. Use the ArangoDB shell to change these properties.</p>
|
|
<hr/>
|
|
<code><b><em>collection</em>.properties()</b></code><hr/>
|
|
Returns an object containing all collection properties.</p>
|
|
<ul>
|
|
<li><code>waitForSync</code>: If <code>true</code> creating a document will only return after the data was synced to disk.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>journalSize</code> : The size of the journal in bytes.</li>
|
|
</ul>
|
|
<hr/>
|
|
<code><b><em>collection</em>.properties(<em>properties</em>)</b></code><hr/>
|
|
Changes the collection properties. <em>properties</em> must be a object with one or more of the following attribute(s):</p>
|
|
<ul>
|
|
<li><code>waitForSync</code>: If <code>true</code> creating a document will only return after the data was synced to disk.</li>
|
|
</ul>
|
|
<ul>
|
|
<li><code>journalSize</code> : The size of the journal in bytes.</li>
|
|
</ul>
|
|
<p>Note that it is not possible to change the journal size after the journal or datafile has been created. Changing this parameter will only effect newly created journals. Also note that you cannot lower the journal size to less then size of the largest document already stored in the collection.</p>
|
|
<p><b>Examples</b><br/>
|
|
</p>
|
|
<p>Read all properties</p>
|
|
<div class="fragment"><pre class="fragment">arango> db.examples.properties()
|
|
{ "waitForSync" : false, "journalSize" : 33554432 }
|
|
</pre></div><p>Change a property</p>
|
|
<div class="fragment"><pre class="fragment">arango> db.examples.properties({ waitForSync : false })
|
|
{ "waitForSync" : false, "journalSize" : 33554432 }
|
|
</pre></div> </div></div>
|
|
</div></body></html>
|