Hyperledger Besu performance tuning: when a slow node needs diagnosis before changes
A Besu node that falls behind, restarts or runs out of memory on a permissioned network forces one question before anyone edits a configuration file: is the bottleneck storage, memory or the host layout? Changing heap size, swap settings or database flags without that answer often moves the problem rather than removing it. The first step is to identify which resource is saturated during the slow period, using host metrics and Besu's own metrics for the same time window.
Besu's performance and JVM memory documentation names a small set of settings. It suggests about 5 GB of Java heap, the OpenJ9 JVM on x86_64 Linux when RAM is constrained, and jemalloc as the native memory allocator. For hosts with 32 GB of RAM or more, it suggests setting Xplugin-rocksdb-high-spec-enabled to true. The documentation also explains that G1GC options are enabled by default to reduce memory footprint, and that the besu-untuned start script runs without them. These are starting points, not a verified profile for your hardware, chain size or transaction load, so confirm each one against your own measurements and the Besu performance troubleshooting guide before changing it.
This section covers diagnosis and tuning of a node that already runs, not sizing a new network. Capacity planning for validator count, node roles and hardware belongs with the private network design work. Before you change anything on a live node, record the Besu version, JDK version, JVM flags, the database type in use and the host's disk, swap and co-located workloads, then ask your platform team whether a backup exists, because some database upgrades cannot be reversed by an older Besu version. Each tuning change should be made one at a time and measured against the same block import and sync behavior.
How to diagnose a slow Besu node before changing settings
This sequence narrows a slow Besu node down to disk, swap, heap or a competing process so that configuration changes target the actual cause rather than guesses.
Confirm the symptom with Besu metrics
Start by confirming that the slowdown is real and measurable. Enable metrics with the
--metrics-enabledoption, which exposes a Prometheus endpoint on the default port 9545, and record block import rate, peer count and RPC latency over a period when the node is slow and when it is healthy. Compare the node against its peers on the same network. A good result is a steady block import rate that matches the other validators or nodes. A bad result is a node that falls behind the chain head or whose import rate drops in step with a resource signal. Only move to the host checks once you have a baseline to compare against.Check disk I/O latency and free space
Next, check the host volume that holds the Besu data directory. Look at read and write latency, queue depth and utilization with your host tooling (for example iostat or your monitoring agent's disk panels), and confirm free space and inode headroom on that volume. A good result is low, steady write latency during block import and enough free space that the database is not competing for the last gigabytes. A bad result is latency spikes that line up with the slow periods or a volume close to full. Storage that is shared with other workloads, or network-attached storage with variable latency, is a common cause here, so record the storage type. If disk is the bottleneck, the Besu performance troubleshooting guide is the next read.
Check swap activity
Check whether the host is swapping. Review swap-in and swap-out rates and the amount of swap in use over the same window you used for the metrics. A good result is no sustained swap activity while Besu is running. A bad result is continuous paging, because the JVM and the database then wait on disk for memory that should be in RAM. Swapping can look like a disk problem in latency graphs, so treat it as a separate check. If the host swaps, do not raise heap settings yet, since a larger heap on a host that is already short of memory makes paging worse. The Besu performance troubleshooting guide covers how these signals relate.
Review heap usage and JVM logs
Review heap occupancy and garbage collection behavior next. Use the JVM metrics that Besu exports and read the Besu log for out-of-memory messages, long pauses or repeated collections. The Besu JVM memory guide describes the default heap guidance and the G1GC options that Besu enables by default to reduce memory footprint. A good result is heap usage that rises and falls with load and collections that finish quickly. A bad result is heap near its ceiling for long periods, frequent full collections or an out-of-memory error. Heap dump generation is disabled by default. If you need one for analysis, enable it with -XX:+HeapDumpOnOutOfMemoryError, and plan disk space for a dump that can be as large as the allocated heap.
Check co-located processes for competing demand
Finally, identify every other process on the host that uses memory, disk or CPU. Compare the list of running services, scheduled jobs, backups, log shippers and other nodes against the resource signals you have already recorded. A good result is a host where Besu is the main consumer and background jobs run outside its peak windows. A bad result is a backup, index build, container runtime or second blockchain client that uses the same disk or memory during the slow periods. Note the times of conflict and check them against the Besu metrics. Record each finding before changing any setting, because a fix that moves the competing process often solves the problem without touching Besu configuration.
Which tuning levers fit small, mid and large-memory hosts
On hosts where RAM is tight, Besu's performance guidance points to two levers: running on OpenJ9 on x86_64 Linux and using jemalloc as the native memory allocator. The reason given is memory footprint. Both change how the JVM and native memory behave, so they are not drop-in switches to flip on a host that is already working. Confirm the JVM build and allocator choice against the current Besu documentation before changing either.
- OpenJ9 on x86_64 Linux: Besu suggests this JVM when RAM is constrained. Check that your Besu release and your JDK build support it, since the 26.6.0 release notes require JDK 25 to build and run.
- jemalloc: Besu suggests it as an allocator option. Measure resident memory before and after, because the benefit depends on allocation patterns.
- Risk of applying without measuring: A JVM or allocator change can shift memory use in ways that look like a leak or a stall, making later diagnosis harder.
- Heap sizing first: Confirm the heap is not set so high that the operating system starts swapping, since swap will hurt sync and block processing more than a smaller heap.
Before changing the JVM or allocator, record heap, native memory, swap activity and sync rate for a representative period so you can tell whether the change helped.
For a standard host, the main lever is the Java heap. Besu suggests about 5 GB of heap as a starting point. The reason is to keep garbage collection pauses and memory footprint in a range the node can sustain, while leaving room for the operating system, the database and any co-located processes. Treat this as a starting point to validate, not a fixed rule for every workload.
- Heap size: Set the maximum heap so the JVM does not need the rest of the host's memory. Leave headroom for native memory and the OS page cache used by the database.
- G1GC defaults: Besu enables G1GC options by default to reduce footprint. The besu-untuned start script runs without them, so changing the start script changes GC behavior.
- Risk of oversizing: A heap larger than the workload needs can lengthen GC cycles and push the host into swap.
- Risk of undersizing: A heap that is too small causes frequent collections and, under load, out-of-memory errors.
- Co-located processes: Check that monitoring agents, other JVMs or containers on the same host are counted in the memory budget.
Confirm the heap setting against the Besu JVM memory documentation and watch GC time and swap activity after each change.
Besu's performance documentation says that with 32 GB of RAM or more, the RocksDB high-spec option applies. Set Xplugin-rocksdb-high-spec-enabled to true on hosts in this class. The reason given is to let the database use the larger memory budget. Because this changes database memory and I/O behavior, it should be enabled deliberately and checked against disk performance, not applied because the host is large.
- Configuration key: Set
Xplugin-rocksdb-high-spec-enabledto true only after confirming your host meets the stated memory threshold. - Disk first: A larger memory budget does not fix slow storage. Check disk I/O latency and queue depth before and after the change.
- Heap and cache balance: Large RocksDB memory use must be balanced against the JVM heap so the host does not swap.
- Risk of applying without measuring: The option can increase memory pressure on a host shared with other workloads, which may appear as unrelated latency.
- Version check: Confirm the option's behavior in the release you run, because flags can change across the monthly releases.
Record sync speed, block processing time and host memory before and after enabling the flag, and keep the change only if the measurements support it.
Hosts on ARM architectures need separate confirmation. The levers above are described for specific platforms in Besu's documentation, and the OpenJ9 and jemalloc guidance does not automatically carry over to ARM builds. Glibc version also matters for native libraries, so check the glibc version on your host against the Besu release notes and the vendor documentation for your JDK before choosing a configuration.
- Architecture check: Confirm that the JVM build, allocator and Besu release you plan to run are supported on your ARM host.
- Glibc version: Compare the host glibc version with the requirements in the Besu release notes for the version you run.
- Release notes: Read the notes for each release you upgrade through, since platform support changes between versions.
- Risk of mismatched builds: A native library built against a different glibc can fail at start or behave unpredictably under load.
- Test host first: Validate any ARM configuration on a non-production node that mirrors the production host's memory and disk profile.
Before changing any lever on an ARM host, obtain written confirmation of platform support from the vendor documentation and the release notes for the exact version in use.
Tuning options and when each one fits
This table compares the main JVM, memory allocator and RocksDB levers for a Besu node and the conditions under which each one fits. Read each row against your host's RAM and the symptoms you are seeing, and treat the suggested values as starting points to validate on your own hardware.
| Option | What it changes | When it fits | Trade-off or risk |
|---|---|---|---|
| Java heap size (about 5 GB suggested) | Sets the maximum memory the JVM can use for Besu's objects | Starting point for most nodes, as suggested in the Besu performance docs | Too small causes out-of-memory errors; too large leaves less RAM for the database and OS |
| OpenJ9 on x86_64 Linux | Swaps the JVM implementation for a lower-footprint option | Hosts with constrained RAM on x86_64 Linux, per the Besu performance docs | Confirm support and behavior for your Besu version and JDK before switching |
| jemalloc | Replaces the default native memory allocator | Suggested by Besu docs for performance tuning of native memory use | Adds a library dependency to deploy and verify on every host image |
| Xplugin-rocksdb-high-spec-enabled set to true | Enables RocksDB settings intended for larger-memory hosts | Hosts with 32 GB of RAM or more, per the Besu performance docs | Not suitable for smaller hosts; confirm the setting in your release's documentation |
| G1GC options (enabled by default) | Reduces memory footprint through the default garbage collector settings | Default behavior; keep unless testing shows a specific reason to change | Using the besu-untuned start script removes these options, so confirm which script your service uses |
| HeapDumpOnOutOfMemoryError (-XX:+HeapDumpOnOutOfMemoryError) | Writes a heap dump file when the JVM runs out of memory | Enable on nodes where you need evidence for memory error analysis | Disabled by default; a dump can be as large as the allocated heap, so plan disk space and retention |
Why disk I/O and swap often cause the slowdown
Most slow Besu nodes are limited by the host before the client itself. Disk latency, swap, memory overcommit, storage class and noisy neighbours all starve the same database and JVM that Besu depends on, so each check below should run before anyone changes heap or client settings.
Disk latency under sync and block import
Besu reads and writes its database continuously while syncing and importing blocks, so slow storage shows up as a node that falls behind the chain head even when CPU is idle. Measure the device's read and write latency during sync using host tools such as iostat, and compare it with the latency your own baseline recorded on a healthy node. Watch for latency spikes, not only averages, because short stalls cause the visible lag. Set alert thresholds from your own baseline rather than from a generic figure.
Free disk space and database growth
A node that runs low on free space can slow down, stop writing state, or fail to start after an upgrade. Besu's database grows over time, and a database upgrade needs room for the new files, so the margin you keep matters more than the current usage. Check free space and growth rate on the data volume, and confirm the headroom you need with the release notes for the version you run before each upgrade.
Swap pressure on the Besu host
When the operating system moves JVM heap or database pages into swap, every read that misses memory waits on disk, and block processing slows sharply. The symptom is high swap-in and swap-out activity with a node that periodically stalls. Check swap usage and paging rates on the host during peak sync. Keep the JVM heap comfortably inside physical memory and confirm swap behavior with your operations team before accepting any swap configuration.
Memory overcommit on shared hosts
On hypervisors and container hosts, the sum of memory promised to all guests can exceed what the physical host holds. When the host reclaims memory from a Besu guest, the JVM and database lose pages they expected to keep, which looks like random slowdowns. Check the hypervisor's memory reservation settings and whether the guest's memory is ballooned or swapped by the host. Reserve memory for Besu nodes so the host cannot reclaim it.
Storage class and volume choice
Network-attached volumes, local NVMe and spinning disks give very different latency and throughput, and cloud volume tiers differ in burst behavior. A volume that performs well in a test can slow down once a sustained sync starts consuming its burst credits. Ask your storage team for the sustained IOPS and latency figures of each class you plan to use, and benchmark the node's own sync workload on the chosen class before go-live.
Noisy neighbours on virtual machines
Other workloads sharing the same physical disks or network paths can consume I/O that a Besu node expects, producing slowdowns that appear only at certain times of day. The symptom is latency that correlates with other tenants' batch jobs rather than with Besu activity. Check I/O wait and disk queue depth at the host level during the slow periods, and ask whether the platform can isolate Besu storage or schedule heavy neighbours away from it.
Heap dumps after memory errors: what to enable and what they cost
Heap dump generation is off by default in Besu, so a node that runs out of memory will not leave behind a dump unless you enable it. Add -XX:+HeapDumpOnOutOfMemoryError to the JVM options before you need it, because a dump cannot be captured after the fact. Set the output location with the companion JVM option that controls the dump path, and confirm the path in the Besu JVM memory documentation for your version. The cost is disk space: a dump can be as large as the allocated heap, so a node with a large heap needs free space equal to that heap on the volume that receives the dump, plus margin. Check that this volume is not the same one holding the chain database, or a full dump can stop the node from writing blocks.
Treat every heap dump as sensitive data. The heap holds whatever the node had in memory at the moment of failure, which can include account data, transaction content and, depending on how the node was configured, key material. Restrict the dump directory to the service account that runs Besu and to a small set of incident responders, and do not let dumps land on shared logging volumes or world-readable paths. Before copying a dump off the host, decide who may receive it, how it is transferred and where it is stored, and record that decision in the incident process. Ask your security team whether dumps fall under your data retention and encryption rules.
Confirm the dump location, size limits and retention period with your incident response process before go-live, not during an outage. Write down who is notified when a dump is created, who analyzes it, and when it is deleted once analysis is complete. Test the setting on a non-production node, trigger a controlled out-of-memory condition if your environment allows it, and verify that the file appears where you expect and that the disk alert fires. Review these settings again after each Besu upgrade, since JVM and dump behavior depends on the runtime and start script you use.
Co-located processes that compete with a Besu node
A Besu node is sensitive to memory pressure, disk latency and CPU scheduling, so anything else on the same host changes its performance. The cards below cover the common neighbours and how each one takes resources from the node. Measure contention on the host before moving anything, and change one workload at a time.
Monitoring and metrics agents
Node exporters, log agents and APM collectors usually look small, but they scrape the Besu metrics endpoint, write to local disk and spike CPU during collection bursts. Besu exposes metrics when --metrics-enabled is set, on port 9545 by default, so check how often each agent scrapes it and whether scrape timeouts line up with slow block processing. Compare agent CPU and disk writes against the Besu process during the slowest hours.
Log shippers writing to the same disk
Log shippers read Besu's log files and buffer them locally before sending. When the shipper falls behind or the destination is unreachable, its buffer grows on the same volume that holds the chain database, and the extra writes compete with state reads and writes. Check the shipper's buffer directory and its disk write rate, and confirm that log rotation runs on a separate volume or with tight size limits.
Scheduled backup jobs
Backup jobs read large amounts of data, often at the same time as a nightly snapshot or compaction. They raise disk queue depth and page cache churn, which can push block import behind the chain head. Schedule backups away from peak block production, throttle them where the tool allows it, and record the node's sync lag before and after each run. Take backups from a stopped or quiesced node where the Besu documentation recommends it, and confirm the procedure in your own environment.
Other blockchain clients on one host
Running a second execution client, a consensus client or another Besu instance on the same machine doubles demand for memory, disk IOPS and CPU cores. The JVM heap of one process does not protect the other from paging, and two chain databases on one volume fight over the same write path. Keep one Besu node per host where you can, and if you must share, size RAM for both heaps plus the operating system cache and set separate volumes.
Databases on the same host
A PostgreSQL, Redis or search instance on the node host competes for RAM through its own buffer or cache settings, and for disk through checkpoints and index writes. Database checkpoints often create short write bursts that show up as slow block imports. Confirm that the database is not sharing the chain data volume, check whether its memory limits leave room for the Besu heap and page cache, and watch disk latency during its maintenance windows.
Container neighbours and cgroup limits
Containers on the same host share the page cache, CPU scheduler and block device unless limits are set. A neighbour that bursts can evict Besu's hot data from cache or cause throttling, and a memory limit set too close to the JVM heap can trigger the kernel's out-of-memory killer. Set explicit CPU and memory limits and reservations for the Besu container, check the throttling counters, and confirm that the container's memory limit covers the heap, off-heap memory and cache together.
Decision path from symptom to tuning change
Start with the symptom, such as slow sync, a memory error or high latency, then check the node's metrics before changing anything. From there, the path splits into four suspects: disk I/O, swap, JVM heap, or a co-located process competing for the same host. Each branch ends in one measured change followed by a retest against the same symptom. If the retest does not improve, return to the metrics check rather than stacking further changes.
The diagram shows how each symptom branch leads to one change and a retest.
Security and operational risks of changing a production node
Tuning a Besu node touches the same files, logs and endpoints that carry keys, state and operational data. The cards below cover the controls to set before a flag, storage or version change, so that a performance fix does not create a security or recovery problem.
Put JVM and storage changes under change control
On a node in a permissioned network, a heap change, a RocksDB setting or a storage move can alter block processing for the whole validator set, not just one host. Record the current -Xmx value, JVM options, RocksDB settings and data path before editing anything. Agree the rollback steps and the peers or validators that must be told in advance, and test the change on a non-production node that runs the same version.
Treat heap dumps as sensitive data
Heap dumps are disabled by default and are enabled with -XX:+HeapDumpOnOutOfMemoryError. A dump can be as large as the allocated heap and holds in-memory data, which can include account state, transaction contents and possibly key material. Decide where dumps are written, restrict that directory to the node operators, set a retention limit, and encrypt dumps before they leave the host.
Debug logs can expose operational detail
Raising log levels to chase a slow node can write peer addresses, transaction details and internal state to disk and to any log pipeline that collects them. Keep debug logging time-boxed, set it back after the investigation, and confirm which log sinks receive the output. Check the log retention and access rules of the destination before you enable verbose levels on a production host.
Protect the unencrypted node key file
Besu documentation states the local node private key file is not encrypted. Anyone with read access to the host during an incident, including someone who copies a disk image or a backup, can take the node identity. Restrict file permissions on the key, limit who can reach the host during troubleshooting, and ask whether a security module plugin such as the Besu HSM plugin, set with --security-module, fits your key policy.
Scope the metrics endpoint to monitoring
Besu exposes metrics for Prometheus when --metrics-enabled is set, on a default port of 9545. Metrics reveal peer counts, sync state and resource use that help an attacker time an attack on a slow node. Bind the endpoint to a monitoring network interface, allow only the Prometheus scraper through the firewall, and avoid exposing the port through a load balancer or public ingress.
Back up before an upgrade that changes the database
The Besu 26.10.0 release notes state that the Bonsai database auto-upgrades on first start and that older Besu versions cannot open an upgraded database. A tuning session often ends with a version upgrade, so take and verify a backup of the data directory before the first start on the new version. Confirm that restoring it works on the old binary, because a backup you cannot restore does not give you a rollback.
Questions teams ask before tuning a Besu node
How much does a Besu performance tuning engagement cost?
No price is published here, and a quote follows from a written scope. The main cost drivers are the number of hosts, the number of Besu nodes on each host, whether metrics, logs and host access are already available, how many change windows the work needs, and whether the problem sits in the host (disk, swap, co-located processes) or in Besu settings. A fixed-scope quote should list the hosts and nodes covered, the metrics and logs reviewed, the changes proposed, who applies them, and the retest after each change. Ask whether any follow-up tuning is included or sold as a separate retainer.
How long does diagnosis take, and what does it depend on?
Diagnosis length depends mainly on how much evidence already exists and how many nodes are involved. A team that already collects host metrics, Besu metrics and garbage collection logs can give the reviewer a baseline quickly, while a team with no history may need a sampling period before any conclusion is safe. Other factors include how reproducible the slowdown is, whether it only appears under peak load, and how quickly change windows open. Ask the provider to state the diagnostic steps, the evidence each step needs, and the point at which a recommendation is handed back for approval.
What does the work need from our team?
Expect to provide four things: Besu and host metrics for the affected period, relevant Besu and JVM logs, supervised access to the affected hosts, and a test node where changes can be tried before production. You will also need a named change approver, since heap, RocksDB and OS changes usually require a restart and a maintenance window. Confirm in advance whether the Prometheus setup exposes Besu metrics (enabled with --metrics-enabled, default port 9545), and whether your security team permits the access needed to collect host data. Missing inputs usually extend the timeline more than the technical work does.
Can our internal team tune Besu alone, and what skills does it need?
Yes, a capable internal team can do this, but it needs skills across three areas: Linux host administration (disk I/O, swap, process scheduling), Java runtime tuning (heap sizing, garbage collection, heap dump analysis), and Besu-specific knowledge of its storage engine and configuration options. The Besu performance and JVM memory documentation are the starting references. Plan for a test node, because several changes interact with each other and with the database. If one of these skills is thin, a partner can cover that gap while your team keeps ownership of the resulting configuration and runbooks.
Should we change JVM settings or buy bigger hosts first?
Measure before buying hardware. Resource-constrained hosts often show symptoms that look like a memory shortage but come from swap use, disk contention or another process competing for the same host. The Besu performance guidance suggests about 5 GB of Java heap, OpenJ9 on x86_64 Linux when RAM is constrained, and jemalloc, and it suggests enabling Xplugin-rocksdb-high-spec-enabled with 32 GB of RAM or more. Those are starting points, not targets. Ask for an evidence-based recommendation that compares the current host profile with the observed bottleneck, and that states which change is reversible and which requires new hardware.
How do we avoid losing data when upgrading Besu?
Take a backup before every upgrade and confirm you can restore it. The Besu 26.10.0 release notes state that the Bonsai database upgrades automatically on first start and that older Besu versions cannot open an upgraded database, so rolling back requires a pre-upgrade backup. Test the upgrade on a non-production node first, record the Besu version and configuration used, and check the release notes for every version between your current and target release. Ask the provider to include the backup procedure, the restore test and the rollback steps in the written scope.
Does a slow node always mean a Besu problem?
No. A slow node is often a host problem, such as saturated disks, swap activity, or a co-located process that competes for CPU or memory. Start by checking host-level indicators and Besu metrics side by side, so you can see whether slowness begins on the host or inside the client. Capture a heap dump only when an out-of-memory error occurred and heap dump generation was enabled with -XX:+HeapDumpOnOutOfMemoryError, because a dump can be as large as the allocated heap and needs disk space and careful handling.
How DeployOpen scopes and delivers Besu performance work
DeployOpen approaches Hyperledger Besu performance tuning as a measured change process: we confirm where a slow node is actually losing time before touching disk, swap or heap settings. Each change is made in your infrastructure, tested against your node roles, and documented so your operators can repeat the diagnosis later.
How we scope
- Written scope lists the nodes, hosts, JVM settings and storage layers in the engagement before work starts.
- Scope states which symptoms are in play, such as slow sync, memory errors or stalled block import, and what evidence we will collect.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing; ask for the quote to name each host and node type.
How we build
- We review disk type, I/O latency, swap configuration, heap size and RocksDB settings against your host's RAM and role.
- Changes are applied one at a time on non-production nodes first, with before and after metrics captured through your monitoring stack.
- Where memory errors occurred, we plan heap dump collection with secure storage, access limits and deletion steps for the dump files.
How we hand over
- Handover documents each tuned setting, the reason for it, the rollback path and the Besu version it was tested against.
- Runbooks cover how to read I/O, swap and garbage collection metrics, and when to escalate a slow node to the Besu maintainers.
- Your operators receive a list of open risks, such as co-located processes or ARM glibc differences, with owners and next actions.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, including re-tuning after Besu release upgrades.
- Retainers can cover re-checking performance after host, storage or Besu version changes, scoped in writing.
- Ask any provider to confirm which Besu versions they will test against, since release upgrades can change database and memory behavior.

