2 月 102019
 

https://developers.ripple.com/capacity-planning.html
https://developers.ripple.com/history-sharding.html
https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg

Node Size参数

The node_size parameter determines the size of database caches. Larger database caches decrease disk I/O requirements at a cost of higher memory requirements. Ripple recommends you always use the largest database cache your available memory can support. See the following table for recommended settings.

配置文件中的node_size参数决定了可用数据库缓存的大小。较大数据库缓存以更多内存开销为代价来降低磁盘IO要求。Ripple建议使用尽可能高的内存配置以提供更多数据库缓存。

Recommendation
Available RAM for rippled node_size value Notes
< 8GB tiny Not recommended
8GB low
16GB medium
32GB huge Recommended for production servers

Node DB Type
节点数据库类型
The type field in the node_db section of the rippled.cfg file sets the type of key-value store that rippled uses to persist the XRP Ledger in the ledger store. You can set the value to either rocksdb or nudb.
配置文件rippled.cfg中node_db区段的type字段,指定了用于rippled总账数据存储的持久化键值存储类型。用户可以设置该值为rocksdb或nudb。

rippled offers a history sharding feature that allows you to store a randomized range of ledgers in a separate shard store. You may want to configure the shard store to use a different type of key-value store than the ledger store. For more information about how to use this feature, see History Sharding.

rippled提供的历史分片特性允许用户在一个独立的分片存储中存储随机范围内的总账数据。用户可能希望配置分片存储使用一个不同类型的键值存储来存储总账数据。更多信息,应参阅“历史分片”部分。

RocksDB vs NuDB
比较
RocksDB requires approximately one-third less disk storage than NuDB and provides a corresponding improvement in I/O latency. However, this comes at a cost of increased memory utilization as storage size grows. NuDB, on the other hand, has nearly constant performance and memory footprint regardless of storage.
RocksDB比NuDB少占用越三分之一的磁盘存储,且相应改善了I/O延迟。但是,随着存储容量的增加,内存开销也变大。相反,NuDB具有几乎恒定的性能和内存占用,而无关存储容量变化。

rippled servers that operate as validators should keep only a few days’ worth of data or less. Ripple recommends using RocksDB for validators. For all other uses, Ripple recommends using NuDB for the ledger store.
作为Validitors的rippled服务器,应仅保留几天或者更少的数据。Ripple建议Validators使用RocksDB,除此之外的场景,Ripple建议使用NuDB用于总账数据存储。

RocksDB has performance-related configuration options you can modify to achieve maximum transaction processing throughput. (NuDB does not have performance-related configuration options.) Here is an example of the recommended configuration for a rippled server using RocksDB:
RocksDB具有性能相关的配置选项,用户可以修改这些参数以达到最大交易处理吞吐量。(NuDB不具有性能相关的配置选项。)以下为有关RocksDB的一个推荐配置示例。

[node_db]

type=rocksdb
open_files=512
file_size_mb=64
file_size_mult=2
filter_bits=12
cache_mb=512
path={path_to_ledger_store}

XRP Ledger Network Data Integrity
XRP总账网络的数据完整性
The history of all ledgers is shared by servers agreeing to keep particular ranges of historical ledgers. This makes it possible for servers to confirm that they have all the data they agreed to maintain, and produce proof trees or ledger deltas. Since rippled servers that are configured with history sharding randomly select the shards that they store, the entire history of all closed ledgers is stored in a normal distribution curve, increasing the probability that the XRP Ledger Network evenly maintains the history.

Shard Store Configuration
分片存储配置
To configure your rippled to store shards of ledger history, add a shard_db section to your rippled.cfg file.
要配置rippled启用历史总账分片存储功能,需要在rppled.cfg中添加shard_db配置段。

Shard Configuration Example
分片配置示例
The following snippet from an example rippled.cfg file shows the configuration fields for adding sharding to a rippled server:

[shard_db]

type=NuDB
path=/var/lib/rippled/db/shards/nudb
max_size_gb=50

Tip:Ripple recommends using NuDB for the shard store (type=NuDB). NuDB uses fewer file handles per shard than RocksDB. RocksDB uses memory that scales with the size of data it stores, which may require excessive memory overhead.

提示:Ripple建议将NuDB用于分片存储(type=NuDB)。NuDB比RocksDB在每个分片上使用更少的文件句柄。RocksDB使用的内存随着数据存储的增长而增长,会导致更多的内存开销。

Tip:While both validator and tracking (or stock) rippled servers can be configured to use history shard stores, Ripple recommends adding history sharding only for non-validator rippled servers to reduce overhead for validators. If you run a validator and want to manage ledger history using sharding, run a separate rippled server with sharding enabled.
提示:虽然Validator和Stock Server都可以配置为开启历史分片存储,但Ripple建议仅在非Validator服务器上开启,以减轻Validator负载和开销。如果用户当前已运行Validator并希望使用分片管理历史总账数据,建议额外运行一个独立的开启分片的rippled服务器。

For more information, reference the [shard_db] example in the rippled.cfg configuration example.
更多信息,请参照rippled.cfg配置文件中的[shard_db] 区段示例。

Sizing the Shard Store
调整分片存储
Determining a suitable size for the shard store involves careful consideration. You should consider the following when deciding what size your shard store should be:

Although redundant, it is possible to hold full ledger history in the ledger store and the history shard store.
An effective configuration might limit the ledger store only to recent history.
The ledger store history size should at minimum be twice the ledgers per shard, due to the fact that the current shard may be chosen to be stored and it would be wasteful to reacquire that data.
The time to acquire, number of file handles, and memory cache usage is directly affected by sizing.
Each shard contains 2^14 ledgers (16384).
A shard occupies approximately 200 MB to 4 GB based on the age of the shard. Older shards are smaller because there was less activity in the XRP Ledger at the time.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)