blob: 95286d6a65f020354b6c04a059e5fa85d43fe58e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pegasus | Benchmark</title>
<link rel="stylesheet" href="/assets/css/app.css">
<link rel="shortcut icon" href="/assets/images/favicon.ico">
<link rel="stylesheet" href="/assets/css/utilities.min.css">
<link rel="stylesheet" href="/assets/css/docsearch.v3.css">
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/all.min.js"></script>
<script src="/assets/js/docsearch.v3.js"></script>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Benchmark | Pegasus</title>
<meta name="generator" content="Jekyll v4.3.3" />
<meta property="og:title" content="Benchmark" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Benchmark tools and configurations" />
<meta property="og:description" content="Benchmark tools and configurations" />
<meta property="og:site_name" content="Pegasus" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2024-04-22T13:02:52+00:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Benchmark" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2024-04-22T13:02:52+00:00","datePublished":"2024-04-22T13:02:52+00:00","description":"Benchmark tools and configurations","headline":"Benchmark","mainEntityOfPage":{"@type":"WebPage","@id":"/overview/benchmark/"},"url":"/overview/benchmark/"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<nav class="navbar is-primary">
<div class="container">
<!--container will be unwrapped when it's in docs-->
<div class="navbar-brand">
<a href="/" class="navbar-item ">
<!-- Pegasus Icon -->
<img src="/assets/images/pegasus.svg">
</a>
<div class="navbar-item">
<a href="/docs" class="button is-primary is-outlined is-inverted">
<span class="icon"><i class="fas fa-book"></i></span>
<span>Docs</span>
</a>
</div>
<div class="navbar-item is-hidden-desktop">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-primary is-outlined is-inverted" href="/zh/overview/benchmark/"><strong></strong></a>
</div>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<!-- Appears in mobile mode only -->
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable ">
<a href=""
class="navbar-link ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-users"></i>
</span>
<span>
ASF
</span>
</a>
<div class="navbar-dropdown">
<a href="https://www.apache.org/"
class="navbar-item ">
Foundation
</a>
<a href="https://www.apache.org/licenses/"
class="navbar-item ">
License
</a>
<a href="https://www.apache.org/events/current-event.html"
class="navbar-item ">
Events
</a>
<a href="https://www.apache.org/foundation/sponsorship.html"
class="navbar-item ">
Sponsorship
</a>
<a href="https://www.apache.org/security/"
class="navbar-item ">
Security
</a>
<a href="https://privacy.apache.org/policies/privacy-policy-public.html"
class="navbar-item ">
Privacy
</a>
<a href="https://www.apache.org/foundation/thanks.html"
class="navbar-item ">
Thanks
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable ">
<a href="/community"
class="navbar-link ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-user-plus"></i>
</span>
<span>
Community
</span>
</a>
<div class="navbar-dropdown">
<a href="/community/#contact-us"
class="navbar-item ">
Contact Us
</a>
<a href="/community/#contribution"
class="navbar-item ">
Contribution
</a>
<a href="https://cwiki.apache.org/confluence/display/PEGASUS/Coding+guides"
class="navbar-item ">
Coding Guides
</a>
<a href="https://github.com/apache/incubator-pegasus/issues?q=is%3Aissue+is%3Aopen+label%3Atype%2Fbug"
class="navbar-item ">
Bug Tracking
</a>
<a href="https://cwiki.apache.org/confluence/display/INCUBATOR/PegasusProposal"
class="navbar-item ">
Apache Proposal
</a>
</div>
</div>
<a href="/blogs"
class="navbar-item ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-rss"></i>
</span>
<span>Blog</span>
</a>
<a href="/docs/downloads"
class="navbar-item ">
<span class="icon" style="margin-right: .25em">
<i class="fas fa-fire"></i>
</span>
<span>Releases</span>
</a>
</div>
<div class="navbar-item is-hidden-mobile">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<a class="button is-primary is-outlined is-inverted" href="/zh/overview/benchmark/"><strong></strong></a>
</div>
</div>
</div>
</nav>
<section class="section">
<div class="container">
<div class="columns is-multiline">
<div class="column is-one-fourth">
<aside class="menu">
<p class="menu-label"></p>
<ul class="menu-list">
<li>
<a href="/overview"
class="">
Overview
</a>
</li>
<li>
<a href="/overview/background"
class="">
Background
</a>
</li>
<li>
<a href="/overview/architecture"
class="">
Architecture
</a>
</li>
<li>
<a href="/overview/data-model"
class="">
Data Model
</a>
</li>
<li>
<a href="/overview/benchmark"
class="">
Benchmark
</a>
</li>
<li>
<a href="/docs/build/compile-by-docker"
class="">
Installation
</a>
</li>
<li>
<a href="/overview/onebox"
class="">
Onebox
</a>
</li>
</ul>
</aside>
</div>
<div class="column is-half">
<div class="content">
<h1 id="Benchmark">Benchmark</h1>
<h2 id="benchmark-tools-and-configurations">Benchmark tools and configurations</h2>
<ul>
<li>Testing by Pegasus Java client drive in <a href="https://github.com/xiaomi/pegasus-ycsb">YCSB</a></li>
<li>Set <code class="language-plaintext highlighter-rouge">requestdistribution=zipfian</code>, which means the discrete probability distribution whose rank-frequency distribution is an inverse power law relation, see <a href="https://en.wiktionary.org/wiki/Zipfian_distribution#English">Zipfian distribution</a>.</li>
</ul>
<h3 id="benchmark-result-explanation">Benchmark result explanation</h3>
<ul>
<li>Case: The cases are read-only testing <code class="language-plaintext highlighter-rouge">Read</code>, write only testing <code class="language-plaintext highlighter-rouge">Write</code>, and read and write combined testing <code class="language-plaintext highlighter-rouge">Read &amp; Write</code></li>
<li>Threads: written in the form of <code class="language-plaintext highlighter-rouge">a * b</code>, where <code class="language-plaintext highlighter-rouge">a</code> represents the number of client instances (i.e., the number of instances YCSB runs on), and <code class="language-plaintext highlighter-rouge">b</code> represents the number of threads (i.e., the value of the <code class="language-plaintext highlighter-rouge">threadcount</code> options in YCSB)</li>
<li>RW Ratio: Read / write operation ratio, which is the ratio of <code class="language-plaintext highlighter-rouge">readpromotion</code> to <code class="language-plaintext highlighter-rouge">updatepromotion</code> or <code class="language-plaintext highlighter-rouge">insertpromotion</code> in YCSB options</li>
<li>Duration: Total testing time in hours</li>
<li>R-QPS: Read operations per second</li>
<li>R-AVG-Lat, R-P99-Lat, R-P999-Lat: average, P99, P999 latency of read operations, in microseconds</li>
<li>W-QPS: Write operations per second</li>
<li>W-AVG-Lat, W-P99-Lat, W-P999-Lat: average, P99, P999 latency of write operations, in microseconds</li>
</ul>
<h2 id="benchmark-on-different-versions">Benchmark on different versions</h2>
<h3 id="240">2.4.0</h3>
<h4 id="test-environment">Test environment</h4>
<h5 id="hardware">Hardware</h5>
<ul>
<li>CPU: Intel® Xeon® Silver 4210 * 2 2.20 GHz / 3.20 GHz</li>
<li>Memory: 128 GB</li>
<li>Disk: SSD 480 GB * 8</li>
<li>Network card: Bandwidth 10 Gb</li>
</ul>
<h5 id="cluster-scale">Cluster scale</h5>
<ul>
<li>The count of replica server nodes: 5</li>
<li>The partitions count of the test table: 64</li>
</ul>
<h4 id="benchmark-results">Benchmark results</h4>
<ul>
<li>Single data size: 1KB</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 15</td>
<td>0:1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>56,953</td>
<td>787</td>
<td>1,786</td>
</tr>
<tr>
<td>Read</td>
<td>3 * 50</td>
<td>1:0</td>
<td>360,642</td>
<td>413</td>
<td>984</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>1:1</td>
<td>62,572</td>
<td>464</td>
<td>5,274</td>
<td>62,561</td>
<td>985</td>
<td>3,764</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>16,844</td>
<td>372</td>
<td>3,980</td>
<td>50,527</td>
<td>762</td>
<td>1,551</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:30</td>
<td>1,861</td>
<td>381</td>
<td>3,557</td>
<td>55,816</td>
<td>790</td>
<td>1,688</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>3:1</td>
<td>140,484</td>
<td>351</td>
<td>3,277</td>
<td>46,822</td>
<td>856</td>
<td>2,044</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 50</td>
<td>30:1</td>
<td>336,106</td>
<td>419</td>
<td>1,221</td>
<td>11,203</td>
<td>763</td>
<td>1,276</td>
</tr>
</tbody>
</table>
<h3 id="230">2.3.0</h3>
<h4 id="test-environment-1">Test environment</h4>
<p>Same as 2.4.0</p>
<h4 id="benchmark-results-1">Benchmark results</h4>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 15</td>
<td>0:1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>42,386</td>
<td>1,060</td>
<td>6,628</td>
</tr>
<tr>
<td>Read</td>
<td>3 * 50</td>
<td>1:0</td>
<td>331,623</td>
<td>585</td>
<td>2,611</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>1:1</td>
<td>38,766</td>
<td>1,067</td>
<td>15,521</td>
<td>38,774</td>
<td>1,246</td>
<td>7,791</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>13,140</td>
<td>819</td>
<td>11,460</td>
<td>39,428</td>
<td>863</td>
<td>4,884</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:30</td>
<td>1,552</td>
<td>937</td>
<td>9,524</td>
<td>46,570</td>
<td>930</td>
<td>5,315</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>3:1</td>
<td>93,746</td>
<td>623</td>
<td>6,389</td>
<td>31,246</td>
<td>996</td>
<td>5,543</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 50</td>
<td>30:1</td>
<td>254,534</td>
<td>560</td>
<td>2,627</td>
<td>8,481</td>
<td>901</td>
<td>3,269</td>
</tr>
</tbody>
</table>
<h3 id="1123">1.12.3</h3>
<h4 id="test-environment-2">Test environment</h4>
<h5 id="hardware-1">Hardware</h5>
<ul>
<li>CPU: Intel® Xeon® CPU E5-2620 v3 @ 2.40 GHz</li>
<li>Memory: 128 GB</li>
<li>Disk: SSD 480 GB * 8</li>
<li>Network card: Bandwidth 10 Gb</li>
</ul>
<p>Other testing environments are the same as 2.4.0</p>
<h4 id="benchmark-results-2">Benchmark results</h4>
<ul>
<li>Single data size: 320B</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>0:1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>41,068</td>
<td>728</td>
<td>3,439</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>16,011</td>
<td>242</td>
<td>686</td>
<td>48,036</td>
<td>851</td>
<td>4,027</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>279,818</td>
<td>295</td>
<td>873</td>
<td>9,326</td>
<td>720</td>
<td>3,355</td>
</tr>
</tbody>
</table>
<ul>
<li>Single data size: 1KB</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>0:1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>40,732</td>
<td>1,102</td>
<td>4,216</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>14,355</td>
<td>476</td>
<td>2,855</td>
<td>38,547</td>
<td>1,016</td>
<td>4,135</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 20</td>
<td>3:1</td>
<td>87,480</td>
<td>368</td>
<td>4,170</td>
<td>29,159</td>
<td>940</td>
<td>4,170</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 50</td>
<td>1:0</td>
<td>312,244</td>
<td>479</td>
<td>1,178</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<h3 id="1122">1.12.2</h3>
<h4 id="test-environment-3">Test environment</h4>
<p>The testing environment is the same as 1.12.3</p>
<h4 id="benchmark-results-3">Benchmark results</h4>
<ul>
<li>Single data size: 320B</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>0:1</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>40,439</td>
<td>739</td>
<td>2,995</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>16,022</td>
<td>309</td>
<td>759</td>
<td>48,078</td>
<td>830</td>
<td>3,995</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>244,392</td>
<td>346</td>
<td>652</td>
<td>8,137</td>
<td>731</td>
<td>2,995</td>
</tr>
</tbody>
</table>
<h3 id="1116">1.11.6</h3>
<h4 id="test-environment-4">Test environment</h4>
<ul>
<li>Test interfaces: <code class="language-plaintext highlighter-rouge">multi_get()</code> and <code class="language-plaintext highlighter-rouge">batch_set()</code></li>
<li>A hashkey contains 3 sortkeys</li>
<li>Single <code class="language-plaintext highlighter-rouge">batch_set()</code> call will set 3 hashkeys</li>
<li>Single data size: 3KB</li>
<li>The partitions count of the test table: 128</li>
<li>rocksdb_block_cache_capacity = 40G</li>
<li>
<p>Other testing environments are the same as 1.12.3</p>
</li>
<li>
<h4 id="benchmark-results-4">Benchmark results</h4>
</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>Max cache hit rate</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>R-P999-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
<th>W-P999-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>20:1</td>
<td>1</td>
<td>10%</td>
<td>150K</td>
<td>263</td>
<td>808</td>
<td>12,615</td>
<td>8k</td>
<td>1,474</td>
<td>7,071</td>
<td>26,342</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 7</td>
<td>20:1</td>
<td>2</td>
<td>17%</td>
<td>75K</td>
<td>226</td>
<td>641</td>
<td>5,331</td>
<td>4K</td>
<td>1,017</td>
<td>4,583</td>
<td>14,983</td>
</tr>
</tbody>
</table>
<h3 id="1111">1.11.1</h3>
<h4 id="test-environment-5">Test environment</h4>
<p>The testing environment is the same as 1.12.3</p>
<h4 id="benchmark-results-5">Benchmark results</h4>
<ul>
<li>Single data size: 20KB * 2 replicas</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 10</td>
<td>0:1</td>
<td>0.78</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>14,181</td>
<td>2,110</td>
<td>15,468</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>0.52</td>
<td>4,024</td>
<td>5,209</td>
<td>41247</td>
<td>12,069</td>
<td>1,780</td>
<td>14,495</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>0.76</td>
<td>105,841</td>
<td>816</td>
<td>9613</td>
<td>3,527</td>
<td>1,107</td>
<td>4,155</td>
</tr>
<tr>
<td>Read</td>
<td>6 * 100</td>
<td>1:0</td>
<td>1.04</td>
<td>162,150</td>
<td>1,868</td>
<td>6733</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<ul>
<li>Single data size: 20KB * 3 replicas</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 10</td>
<td>0:1</td>
<td>1.16</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>9,603</td>
<td>3,115</td>
<td>20,468</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>0.69</td>
<td>3,043</td>
<td>5,657</td>
<td>38,783</td>
<td>9,126</td>
<td>3,140</td>
<td>27,956</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>0.89</td>
<td>90,135</td>
<td>937</td>
<td>13,324</td>
<td>3,002</td>
<td>1,185</td>
<td>4,816</td>
</tr>
<tr>
<td>Read</td>
<td>6 * 100</td>
<td>1:0</td>
<td>1.08</td>
<td>154,869</td>
<td>1,945</td>
<td>7,757</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<ul>
<li>Single data size: 10KB * 2 replicas</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 10</td>
<td>0:1</td>
<td>0.78</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>14,181</td>
<td>2,110</td>
<td>15,468</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>0.52</td>
<td>4,024</td>
<td>5,209</td>
<td>41247</td>
<td>12,069</td>
<td>1,780</td>
<td>14,495</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>0.76</td>
<td>105,841</td>
<td>816</td>
<td>9613</td>
<td>3,527</td>
<td>1,107</td>
<td>4,155</td>
</tr>
<tr>
<td>Read</td>
<td>6 * 100</td>
<td>1:0</td>
<td>1.04</td>
<td>162,150</td>
<td>1,868</td>
<td>6733</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<ul>
<li>Single data size: 10KB * 3 replicas</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 10</td>
<td>0:1</td>
<td>1.16</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>9,603</td>
<td>3,115</td>
<td>20,468</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>0.69</td>
<td>3,043</td>
<td>5,657</td>
<td>38,783</td>
<td>9,126</td>
<td>3,140</td>
<td>27,956</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>0.89</td>
<td>90,135</td>
<td>937</td>
<td>13,324</td>
<td>3,002</td>
<td>1,185</td>
<td>4,816</td>
</tr>
<tr>
<td>Read</td>
<td>6 * 100</td>
<td>1:0</td>
<td>1.08</td>
<td>154,869</td>
<td>1,945</td>
<td>7,757</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<h3 id="1110">1.11.0</h3>
<h4 id="test-environment-6">Test environment</h4>
<p>The testing environment is the same as 1.12.3</p>
<h4 id="benchmark-results-6">Benchmark results</h4>
<ul>
<li>Single data size: 320B</li>
</ul>
<table>
<thead>
<tr>
<th>Case</th>
<th>threads</th>
<th>Read/Write</th>
<th>duration</th>
<th>R-QPS</th>
<th>R-AVG-Lat</th>
<th>R-P99-Lat</th>
<th>W-QPS</th>
<th>W-AVG-Lat</th>
<th>W-P99-Lat</th>
</tr>
</thead>
<tbody>
<tr>
<td>Write</td>
<td>3 * 10</td>
<td>0:1</td>
<td>1.89</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>44,039</td>
<td>679</td>
<td>3,346</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 15</td>
<td>1:3</td>
<td>1.24</td>
<td>16,690</td>
<td>311</td>
<td>892</td>
<td>50,076</td>
<td>791</td>
<td>4,396</td>
</tr>
<tr>
<td>Read &amp; Write</td>
<td>3 * 30</td>
<td>30:1</td>
<td>1.04</td>
<td>311,633</td>
<td>264</td>
<td>511</td>
<td>10,388</td>
<td>619</td>
<td>2,468</td>
</tr>
<tr>
<td>Read</td>
<td>6 * 100</td>
<td>1:0</td>
<td>0.17</td>
<td>978,884</td>
<td>623</td>
<td>1,671</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>Read</td>
<td>12 * 100</td>
<td>1:0</td>
<td>0.28</td>
<td>1,194,394</td>
<td>1,003</td>
<td>2,933</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<h2 id="benchmark-in-different-scenarios">Benchmark in different scenarios</h2>
<p>Unless otherwise specified, the testing environment is as follows:</p>
<ul>
<li>The testing environment is the same as 1.12.3</li>
<li>Single data size: 1KB</li>
<li>Client:
<ul>
<li>Number of nodes: 3</li>
<li>version: 1.11.10-thrift-0.11.0-inlined-release</li>
</ul>
</li>
<li>Server:
<ul>
<li>Number of nodes: 5</li>
<li>Version: 1.12.3</li>
<li>The partitions count of the test table: 64</li>
<li>配置: <code class="language-plaintext highlighter-rouge">rocksdb_limiter_max_write_megabytes_per_sec = 500</code>, <code class="language-plaintext highlighter-rouge">rocksdb_limiter_enable_auto_tune = false</code></li>
</ul>
</li>
</ul>
<h3 id="cluster-throughput-capability">Cluster throughput capability</h3>
<p>This test aims to compare the latency changes in the same cluster under different client request throughput.</p>
<blockquote>
<p>NOTE: RocksDB rate-limiter is not enabled</p>
</blockquote>
<p><img src="/assets/images/benchmark/5-node-write.png" alt="5-node-write" /></p>
<p><img src="/assets/images/benchmark/5-node-read.png" alt="5-node-read" /></p>
<p>From the above figure, it can be seen that the maximum writing throughput is about 43K, and the maximum reading throughput is about 370K.
You can estimate the corresponding latency based on reading/writing throughput.</p>
<h3 id="whether-to-enable-rocksdb-rate-limiter">Whether to enable RocksDB rate-limiter</h3>
<blockquote>
<p>The testing scenario: set <code class="language-plaintext highlighter-rouge">threads</code> as 3 * 20, with IPS of approximately 44K</p>
</blockquote>
<p>Pegasus uses RocksDB as the storage engine, when write data accumulated, it will trigger more compaction operations, occupy more disk IO, and cause more long tails.
This test demonstrates that after enabling the RocksDB rate-limiter, the compaction load can be reduced, significantly reducing the occurrence of long tails.</p>
<p>The following figures show the IO usage and P99 write latency for three scenarios:</p>
<ul>
<li><code class="language-plaintext highlighter-rouge">rocksdb_limiter_max_write_megabytes_per_sec = 0</code></li>
<li><code class="language-plaintext highlighter-rouge">rocksdb_limiter_max_write_megabytes_per_sec = 500</code> and <code class="language-plaintext highlighter-rouge">rocksdb_limiter_enable_auto_tune = false</code></li>
<li>
<p><code class="language-plaintext highlighter-rouge">rocksdb_limiter_max_write_megabytes_per_sec = 500</code> and <code class="language-plaintext highlighter-rouge">rocksdb_limiter_enable_auto_tune = true</code></p>
</li>
<li>
<p>Disk IO usage:
<img src="/assets/images/benchmark/io-no-limit.png" alt="io-no-limit" />
<img src="/assets/images/benchmark/io-limit-500MB.png" alt="io-limit-500MB" />
<img src="/assets/images/benchmark/io-limit-500MB-auto.png" alt="io-limit-500MB-auto" /></p>
</li>
<li>P99 latency:
<img src="/assets/images/benchmark/no-limit-set.png" alt="no-limit-set" />
<img src="/assets/images/benchmark/500-limit-set.png" alt="500-limit-set" />
<img src="/assets/images/benchmark/500-limit-auto-set.png" alt="500-limit-auto-set" /></li>
</ul>
<p>It can be observed that when RocksDB rate-limiter enabled, the disk IO utilization rate has been reduced, and write latency has also been greatly alleviated.</p>
<p><img src="/assets/images/benchmark/limit.png" alt="limit" />
We obtained the results from YCSB benchmark:</p>
<ul>
<li>When rate-limiter enabled, the throughput increased by about 5%</li>
<li>When both rate-limiter and auto-tune enabled, the throughput increased by about 20%</li>
<li>When rate-limiter enabled, only the latency in extreme situations (P999/P9999) has a significant improvement, but the improvement is not significant for most requests</li>
</ul>
<p>However, it should be noted that:</p>
<p>The auto-tune function may trigger <a href="https://github.com/facebook/rocksdb/wiki/Write-Stalls">write stall</a> issues in scenarios which a single piece of data is larger, please evaluate whether to enable auto-tune reasonably in your environment.</p>
<h3 id="cluster-scale-1">Cluster scale</h3>
<p>This test aims to observe the impact of different number of replica servers on read and write throughput.</p>
<blockquote>
<p>The testing cases are read-only and write-only</p>
</blockquote>
<p><img src="/assets/images/benchmark/node-qps-write.png" alt="node-write" /></p>
<p><img src="/assets/images/benchmark/node-qps-read.png" alt="node-read" /></p>
<p>As can be seen from the figure:</p>
<ul>
<li>Write throughput improves more than read throughput when the cluster scales out</li>
<li>The throughput is not improved linearly when the cluster scales out</li>
</ul>
<p>You can reasonably estimate the throughput of a cluster in different scales based on this test.</p>
<h3 id="different-partition-count-of-table">Different partition count of table</h3>
<p>This test aims to observe the impact of different partition count of a table on performance.</p>
<blockquote>
<p>The testing scenario is:
Only read: <code class="language-plaintext highlighter-rouge">threads</code> configured as 3 * 50
Only write: <code class="language-plaintext highlighter-rouge">threads</code> configured as 3 * 40</p>
</blockquote>
<p><img src="/assets/images/benchmark/partition.png" alt="partition" /></p>
<p>As can be seen from the figure:</p>
<ul>
<li>Increasing partition count can improve read throughput</li>
<li>But it also reduces write throughput</li>
</ul>
<p>Therefore, please evaluate the partition count according to your application requirements reasonably.</p>
<p>In addition, if the partition count is too small, it may cause issues such as large single partition and data skew between disks. In production environment, it is recommended to keep the size of a single partition less than 10GB if there are no special requirements.</p>
</div>
</div>
<div class="column is-one-fourth is-hidden-mobile" style="padding-left: 3rem">
<p class="menu-label">
<span class="icon">
<i class="fa fa-bars" aria-hidden="true"></i>
</span>
Table of contents
</p>
<ul class="menu-list">
<li><a href="#Benchmark">Benchmark</a>
<ul>
<li><a href="#benchmark-tools-and-configurations">Benchmark tools and configurations</a>
<ul>
<li><a href="#benchmark-result-explanation">Benchmark result explanation</a></li>
</ul>
</li>
<li><a href="#benchmark-on-different-versions">Benchmark on different versions</a>
<ul>
<li><a href="#240">2.4.0</a>
<ul>
<li><a href="#test-environment">Test environment</a>
<ul>
<li><a href="#hardware">Hardware</a></li>
<li><a href="#cluster-scale">Cluster scale</a></li>
</ul>
</li>
<li><a href="#benchmark-results">Benchmark results</a></li>
</ul>
</li>
<li><a href="#230">2.3.0</a>
<ul>
<li><a href="#test-environment-1">Test environment</a></li>
<li><a href="#benchmark-results-1">Benchmark results</a></li>
</ul>
</li>
<li><a href="#1123">1.12.3</a>
<ul>
<li><a href="#test-environment-2">Test environment</a>
<ul>
<li><a href="#hardware-1">Hardware</a></li>
</ul>
</li>
<li><a href="#benchmark-results-2">Benchmark results</a></li>
</ul>
</li>
<li><a href="#1122">1.12.2</a>
<ul>
<li><a href="#test-environment-3">Test environment</a></li>
<li><a href="#benchmark-results-3">Benchmark results</a></li>
</ul>
</li>
<li><a href="#1116">1.11.6</a>
<ul>
<li><a href="#test-environment-4">Test environment</a></li>
<li><a href="#benchmark-results-4">Benchmark results</a></li>
</ul>
</li>
<li><a href="#1111">1.11.1</a>
<ul>
<li><a href="#test-environment-5">Test environment</a></li>
<li><a href="#benchmark-results-5">Benchmark results</a></li>
</ul>
</li>
<li><a href="#1110">1.11.0</a>
<ul>
<li><a href="#test-environment-6">Test environment</a></li>
<li><a href="#benchmark-results-6">Benchmark results</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#benchmark-in-different-scenarios">Benchmark in different scenarios</a>
<ul>
<li><a href="#cluster-throughput-capability">Cluster throughput capability</a></li>
<li><a href="#whether-to-enable-rocksdb-rate-limiter">Whether to enable RocksDB rate-limiter</a></li>
<li><a href="#cluster-scale-1">Cluster scale</a></li>
<li><a href="#different-partition-count-of-table">Different partition count of table</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content is-small has-text-centered">
<div style="margin-bottom: 20px;">
<a href="http://incubator.apache.org">
<img src="/assets/images/egg-logo.png"
width="15%"
alt="Apache Incubator"/>
</a>
</div>
Copyright &copy; 2023 <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br><br>
Apache Pegasus is an effort undergoing incubation at The Apache Software Foundation (ASF),
sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
until a further review indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects. While incubation status is
not necessarily a reflection of the completeness or stability of the code, it does indicate that the
project has yet to be fully endorsed by the ASF.
<br><br>
Apache Pegasus, Pegasus, Apache, the Apache feather logo, and the Apache Pegasus project logo are either
registered trademarks or trademarks of The Apache Software Foundation in the United States and other
countries.
</div>
</div>
</footer>
<script src="/assets/js/app.js" type="text/javascript"></script>
</body>
</html>