blob: 9a624d1e8b24d6195fc8a9a9c1cedb8088017c93 [file] [log] [blame]
import{_ as i,r as n,o as d,c,b as a,d as e,a as t,w as l,e as r}from"./app-Bp5kEZWW.js";const h={},p=r('<h1 id="background" tabindex="-1"><a class="header-anchor" href="#background"><span>Background</span></a></h1><p>The database is specified by the user display.<br> Use the statement &quot;CREATE DATABASE&quot; to create the database.<br> Each database has a corresponding StorageGroupProcessor.</p><p>To ensure eventually consistency, a insert lock (exclusive lock) is used to synchronize each insert request in each database.<br> So the server side parallelism of data ingestion is equal to the number of database.</p><h1 id="problem" tabindex="-1"><a class="header-anchor" href="#problem"><span>Problem</span></a></h1><p>From background, we can infer that the parallelism of data ingestion of IoTDB is max(num of client, server side parallelism), which equals to max(num of client, num of database)</p><p>The concept of database usually is related to real world entity such as factory, location, country and so on.<br> The number of databases may be small which makes the parallelism of data ingestion of IoTDB insufficient. We can&#39;t jump out of this dilemma even we start hundreds of client for ingestion.</p><h1 id="solution" tabindex="-1"><a class="header-anchor" href="#solution"><span>Solution</span></a></h1><p>Our idea is to group devices into buckets and change the granularity of synchronization from database level to device buckets level.</p>',8),u=a("br",null,null,-1),m={href:"http://root.sg",target:"_blank",rel:"noopener noreferrer"},g={href:"http://root.sg",target:"_blank",rel:"noopener noreferrer"},b=r(`<h1 id="usage" tabindex="-1"><a class="header-anchor" href="#usage"><span>Usage</span></a></h1><p>To use data region, you can set this config below:</p><div class="language-text line-numbers-mode" data-ext="text" data-title="text"><pre class="language-text"><code>data_region_num
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Recommended value is [data region number] = [CPU core number] / [user-defined database number]</p>`,4);function f(_,y){const o=n("ExternalLinkIcon"),s=n("RouteLink");return d(),c("div",null,[p,a("p",null,[e("In detail, we use hash to group different devices into buckets called data region."),u,e(` For example, one device called "root.sg.d"(assume it's database is "`),a("a",m,[e("root.sg"),t(o)]),e('") is belonged to data region "'),a("a",g,[e("root.sg"),t(o)]),e('.[hash("root.sg.d") mod num_of_data_region]"')]),b,a("p",null,[e("For more information, you can refer to "),t(s,{to:"/UserGuide/V1.0.x/Reference/DataNode-Config-Manual.html"},{default:l(()=>[e("this page")]),_:1}),e(".")])])}const k=i(h,[["render",f],["__file","DataRegion.html.vue"]]),T=JSON.parse('{"path":"/UserGuide/V1.0.x/Data-Modeling/DataRegion.html","title":"Background","lang":"en-US","frontmatter":{"description":"Background The database is specified by the user display. Use the statement \\"CREATE DATABASE\\" to create the database. Each database has a corresponding StorageGroupProcessor. To...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://iotdb.apache.org/zh/UserGuide/V1.0.x/Data-Modeling/DataRegion.html"}],["meta",{"property":"og:url","content":"https://iotdb.apache.org/UserGuide/V1.0.x/Data-Modeling/DataRegion.html"}],["meta",{"property":"og:site_name","content":"IoTDB Website"}],["meta",{"property":"og:title","content":"Background"}],["meta",{"property":"og:description","content":"Background The database is specified by the user display. Use the statement \\"CREATE DATABASE\\" to create the database. Each database has a corresponding StorageGroupProcessor. To..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2023-07-10T03:11:17.000Z"}],["meta",{"property":"article:modified_time","content":"2023-07-10T03:11:17.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Background\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2023-07-10T03:11:17.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1688958677000,"updatedTime":1688958677000,"contributors":[{"name":"CritasWang","email":"critas@outlook.com","commits":1}]},"readingTime":{"minutes":1.18,"words":353},"filePathRelative":"UserGuide/V1.0.x/Data-Modeling/DataRegion.md","localizedDate":"July 10, 2023","autoDesc":true}');export{k as comp,T as data};