Beringei - 高性能内存存储引擎

BertDrago 8年前
   <h2>Beringei</h2>    <p>A high performance, in memory time series storage engine</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f457ef72a3c00b777e5312dd4b3a0b04.png"></p>    <p>In the fall of 2015, we published the paper “Gorilla: A Fast, Scalable, In-Memory Time Series Database” at VLDB 2015. Beringei is the open source representation of the ideas presented in this paper.</p>    <p>Beringei is a high performance time series storage engine. Time series are commonly used as a representation of statistics, gauges, and counters for monitoring performance and health of a system.</p>    <h2>Features</h2>    <p>Beringei has the following features:</p>    <ul>     <li>Support for very fast, in-memory storage, backed by disk for persistence. Queries to the storage engine are always served out of memory for extremely fast query performance, but backed to disk so the process can be restarted or migrated with very little down time and no data loss.</li>     <li>Extremely efficient streaming compression algorithm. Our streaming compression algorithm is able to compress real world time series data by over 90%. The delta of delta compression algorithm used by Beringei is also fast - we see that a single machine is able to compress more than 1.5 million datapoints/second.</li>     <li>Reference sharded service implementation, including a client implementation.</li>     <li>Reference http service implementation that enables direct Grafana integration.</li>    </ul>    <h2>How can I use Beringei?</h2>    <p>Beringei can be used in one of two ways.</p>    <ol>     <li>We have created a simple, sharded service, and reference client implementation, that can store and serve time series query requests.</li>     <li>You can use Beringei as an embedded library to handle the low-level details of efficiently storing time series data. Using Beringei in this way is similar to RocksDB - the Beringei library can be the high performance storage system underlying your performance monitoring solution.</li>    </ol>    <h2>Requirements</h2>    <p>Beringei is tested and working on:</p>    <ul>     <li>Ubuntu 16.10</li>    </ul>    <p>We also depend on these open source projects:</p>    <ul>     <li><a href="/misc/goto?guid=4959731110007509534" rel="nofollow,noindex">fbthrift</a></li>     <li><a href="/misc/goto?guid=4958342824155322654" rel="nofollow,noindex">folly</a></li>     <li><a href="/misc/goto?guid=4959731110152246154" rel="nofollow,noindex">wangle</a></li>     <li><a href="/misc/goto?guid=4958853823362552213" rel="nofollow,noindex">proxygen</a></li>     <li><a href="/misc/goto?guid=4959652556716741716" rel="nofollow,noindex">gtest</a></li>     <li><a href="/misc/goto?guid=4959731110332133459" rel="nofollow,noindex">gflags</a></li>    </ul>    <h2>Building Beringei</h2>    <p>Our instructions are for Ubuntu 16.10 - but you will probably be able to modify the install scripts and directions to work with other linux distros.</p>    <ul>     <li> <p>Run sudo ./setup_ubuntu.sh .</p> </li>     <li> <p>Build beringei.</p> </li>    </ul>    <pre>  mkdir build && cd build && cmake .. && make`</pre>    <ul>     <li>Generate a beringei configuration file.</li>    </ul>    <pre>  ./beringei/tools/beringei_configuration_generator --host_names $(hostname) --file_path /tmp/beringei.json</pre>    <ul>     <li>Start beringei.</li>    </ul>    <pre>  ./beringei/service/beringei_main \      -beringei_configuration_path /tmp/beringei.json \      -create_directories \      -sleep_between_bucket_finalization_secs 60 \      -allowed_timestamp_behind 300 \      -bucket_size 600 \      -buckets $((86400/600)) \      -logtostderr \      -v=2</pre>    <ul>     <li>Send data.</li>    </ul>    <pre>  while [[ 1 ]]; do      ./beringei/tools/beringei_put \          -beringei_configuration_path /tmp/beringei.json \          testkey ${RANDOM} \          -logtostderr -v 3      sleep 30  done</pre>    <ul>     <li>Read the data back.</li>    </ul>    <pre>  ./beringei/tools/beringei_get \      -beringei_configuration_path /tmp/beringei.json \      testkey \      -logtostderr -v 3</pre>    <p> </p>    <p> </p>    <p> </p>