Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-17098 - Added info on pluggable storage #856

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/_data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
url: sql-reference/operators-and-functions
- title: REST API
url: rest/rest-api
- title: Data Region Configuration
url: config/data-region
- title: Binary Client Protocol
url: binary-protocol
- title: Native Persistence
Expand Down
74 changes: 74 additions & 0 deletions docs/_docs/config/data-region.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
= Data Region Configuration

You can set configuration for data regions by using HOCON format. You can configure your data regions to run either RocksDB or B+Tree storage, and fine-tune their performance. A cluster can have several data regions, and you can select the preferred storage type for each.

We recommend to use B+ Tree storage for read-heavy workloads, and RocksDB for write-heavy workloads.


=== RocksDB Region Configuration

Below is the list of properties for link:https://rocksdb.org/[RocksDB] data regions:

[cols="1,1,3",opts="header", stripes=none]
|===
|Property|Default|Description
|name|| The name of the data region.
|size| `256 * 1024 * 1024` | Size of the offheap cache.
|writeBufferSize | `64 * 1024 * 1024` | Size of the write buffer.
|cache| `lru` | The type of the cache to use. Currently only lru is supported.
|numShardBits| `-1` | The number of parts the cache is sharded to.


== Page Memory Region Configuration

Page memory keeps data in B+Tree format. You can set up the following configuration parameters:

[cols="1,1,3",opts="header", stripes=none]
|===
|name|| The name of the data region.
|persistent|`false`| Specifies if the data region is persistent.
|initSize|`256 * 1024 * 1024`| Sets the initial space allocated to the data region.
|maxSize|`256 * 1024 * 1024`| Sets the maximum space that can be allocated to the data region.
|evictionMode|`DISABLED`| Sets the eviction algorithm to use.
|replacementMode|`CLOCK`| Sets the page replacement algorithm.
|evictionThreshold|`0.9`| Configures when the eviction process starts.
|emptyPagesPoolSize|100| The maximum number of empty pages Ignite will try to keep.
|checkpointPageBufSize|0| Sets the size of the page buffer.
|lazyMemoryAllocation|true|If enabled, memory will not be allocated until necessary.


== Configuration Example

The example below configures two data regions, one using RocksDB storage, and another using page memory:

----
ignite config set --type cluster \
"{
rocksDb.regions: [{
name: lsm_region,
size: 256000000,
cache: lru
}],

pageMemory.regions: [{
name: btree_region,
persistent: false,
maxSize: 256000000,
lazyMemoryAllocation: true
}]
}"
----
125 changes: 92 additions & 33 deletions docs/_docs/images/svg/create_table_bnf1.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.