Optimizing Node Performance with PBSS and PebbleDB: A Quick Guide

We’re excited to announce that PebbleDB and the Path-Based State Scheme (PBSS) are now available for Bor! This database solution for Bor offers significant benefits, including reduced disk space usage and a more efficient state storage model, outperforming the traditional hash-based scheme. Best of all, it eliminates the need for offline pruning, streamlining your operations for enhanced performance.

This guide provides instructions on how to configure your node to use PBSS (Path-Based Storage Scheme) and PebbleDB for enhanced performance and storage management.

Key Configuration Flags:

  • db.engine: Used to select the database engine.
    • Options: leveldb (current default) or pebble.
  • state.scheme: Defines the storage scheme for the node.
    • Options: hash (current default) or path.

Example Configuration:

To configure your node to run with PBSS and PebbleDB, follow these steps:

  • For CLI users: Add the following flags when running the node:
--db.engine pebble --state.scheme path
  • For TOML configuration users: Add the following lines to your TOML config file:
db.engine = "pebble"
“state.scheme” = "path"

Important Note:

If this is the first time you are switching to a different database engine or storage scheme, your existing datadir will become incompatible. In this case, the node will need to resync from the genesis block, using a new datadir.

Alternatively, you can use a snapshot for faster syncing. The snapshot is available here.

Some advantages of using PBSS over hash-based schemes:

  • The PBSS database grows at a rate 4 times slower.
  • 15% decrease in RAM used by PBSS nodes.
  • Reduction in average chain execution for 99% of the blocks by 60% with PBSS.
  • State pruning is not required with PBSS which was a big issue with hash-based schemes.
  • Bor should not go into repairing mode after an unclean shutdown.

Disadvantages of using PBSS:

  • No support for Archive nodes.
2 Likes

I would appreciate some feedback if anyone is using pebbleDB without problems. Works great on Geth, we’ve been running for about 1.5 years.

1 Like