• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

Why Are Electrs Address Balance Queries Slow (~900ms) on My Dockerized Bitcoin Full Node?

Moussa by Moussa
May 24, 2025
in Bitcoin
0
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


I’m running a Bitcoin Core full node (bitcoind) and using romanz/electrs (via Docker) to provide Electrum server functionality for querying address balances and related wallet info. However, I’m experiencing unexpectedly high latency: querying the balance for a random address consistently takes around 600-900 ms via btc-rpc-explorer RPC interface. For addresses with an enormous number of transactions, the query can take some seconds instead of ms

Related articles

Dogecoin Still Trapped In Triangle—29% Move Brewing?

Dogecoin Still Trapped In Triangle—29% Move Brewing?

March 31, 2026
Labor Department Proposal Could Open 401(k)s To Bitcoin And Alternative Assets

Labor Department Proposal Could Open 401(k)s To Bitcoin And Alternative Assets

March 31, 2026

This is the docker compose yml file:

services:
  bitcoin_service:
    build:
      context: .
      dockerfile: Bitcoin.Dockerfile
      args:
        BITCOIN_VERSION: ${BTC_VERSION}
    image: bitcoin_full_node
    ports:
      - 8333:8333
      - 8332:8332
    volumes:
      - bitcoin_volume:/home/btc-user/.bitcoin
    networks:
      network:
        ipv4_address: 192.168.1.219
    healthcheck:
      test: [
        "CMD",
        "bitcoin-cli",
        "-rpccookiefile=/home/btc-user/.bitcoin/btc.cookie",
        "-rpcport=8332",
        "-rpcconnect=192.168.1.219",
        "getblockchaininfo"
      ]
      interval: 40s
      timeout: 60s
      retries: 45

  electrs:
    image: electrs:latest
    build:
      context: ./electrs/.
    container_name: electrs
    restart: always
    ports:
      - "50001:50001"    # Electrum TCP port exposed on host and container
    environment:
      - ELECTRS_NETWORK=bitcoin
      - ELECTRS_DAEMON_RPC_ADDR=192.168.1.219:8332
      - ELECTRS_DAEMON_P2P_ADDR=192.168.1.219:8333
      - ELECTRS_ELECTRUM_RPC_ADDR=192.168.1.223:50001
      - ELECTRS_LOG_FILTERS=INFO
      - ELECTRS_DB_DIR=/home/electrs/db
      - ELECTRS_VERBOSE_RPC_LOGS=true
      - ELECTRS_IGNORE_MEMPOOL=true
      - ELECTRS_TIMESTAMP_CACHE_CAPACITY=1000000  # Higher cache for faster lookups
      - ELECTRS_INDEX_LOOKUP_LIMIT=10000
      - ELECTRS_COOKIE_FILE=/home/btc-user/.bitcoin/btc.cookie
      - ELECTRS_THREADS=4
      - ELECTRS_DB_CACHE_SIZE=4096
    volumes:
      - electrs_db:/home/electrs/db
      - bitcoin_volume:/home/btc-user/.bitcoin:ro    # Mount same bitcoin data volume (read-only)
    networks:
      network:
        ipv4_address: 192.168.1.223 # new IP in the same subnet
    healthcheck:
      test: ["CMD-SHELL", "timeout 5 bash -c 'echo > /dev/tcp/192.168.1.223/50001'"]
      interval: 40s
      timeout: 60s
      retries: 45
    depends_on:
      bitcoin_service:
        condition: service_healthy

My Setup:

Bitcoin Core runs as a full node with default (non-pruned) settings.
Electrs runs in Docker with the following environment:
ELECTRS_NETWORK=bitcoin
ELECTRS_DAEMON_RPC_ADDR=192.168.1.219:8332
ELECTRS_DAEMON_P2P_ADDR=192.168.1.219:8333
ELECTRS_ELECTRUM_RPC_ADDR=192.168.1.223:50001
ELECTRS_DB_DIR=/home/electrs/db
ELECTRS_TIMESTAMP_CACHE_CAPACITY=1000000
ELECTRS_INDEX_LOOKUP_LIMIT=10000
ELECTRS_THREADS=4
ELECTRS_DB_CACHE_SIZE=4096
Volumes: bitcoin data (read-only) and electrs DB (persistent)
Docker container has 4 threads and 4GB cache configured

Electrs and bitcoind are on the same local network.
Problem:
Despite this setup, querying a single, random address balance via Electrs takes about 900ms. This seems slow compared to other Electrum servers and my expectations for local, SSD-backed infrastructure.

Hardware Specs:

  • CPU: AMD Ryzen 5 5600 3.5 GHz 6-Core Processor
  • RAM: 16 GB (2 x 8GB) DDR4-3200
  • Storage: Western Digital Blue SN580 2TB NVMe M.2 SSD (PCIe 4.0 x4)
  • Motherboard: Gigabyte A520M K V2 Micro ATX AM4
  • Network: 1GPS Download speed

Questions:

  • Is this latency typical for Electrs on a Dockerized full node?
  • Are there further optimizations I can make in my Docker or Electrs
    configuration to reduce balance query times?
  • Is there any known bottleneck, either in RocksDB, disk I/O, or Docker networking, that
    might cause this?
  • What are the typical response times others see for
    similar setups?

Any insights or tuning suggestions from the community
would be greatly appreciated!

Thank you!



Source link

Share76Tweet47

Related Posts

Dogecoin Still Trapped In Triangle—29% Move Brewing?

Dogecoin Still Trapped In Triangle—29% Move Brewing?

by Moussa
March 31, 2026
0

A crypto analyst has pointed out how Dogecoin has remained stuck in a Descending Triangle recently, decompression from which could...

Labor Department Proposal Could Open 401(k)s To Bitcoin And Alternative Assets

Labor Department Proposal Could Open 401(k)s To Bitcoin And Alternative Assets

by Moussa
March 31, 2026
0

The U.S. Department of Labor has unveiled a sweeping proposed rule that could significantly expand the range of investment options...

Strategy’s Latest SEC Filing Shows No Bitcoin Purchases or Share Sales During Quiet Week – Featured Bitcoin News

Strategy’s Latest SEC Filing Shows No Bitcoin Purchases or Share Sales During Quiet Week – Featured Bitcoin News

by Moussa
March 31, 2026
0

Strategy Bitcoin Holdings and SEC Filing Activity Pause Strategy Inc. filed Form 8-K with the U.S. Securities and Exchange Commission...

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

Very slow sync using bitcoin core on Mac mini m1

by Moussa
March 31, 2026
0

I'm using an M1 Mac Mini, 8GB memory, 256 GB internal SSD, 2TB Toshiba SSD (which is where the blocks...

Prediction Markets Hit Record Highs As Bets Explode On Global Conflict

Prediction Markets Hit Record Highs As Bets Explode On Global Conflict

by Moussa
March 30, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Prediction markets are being dominated by automated...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdHlwZSUzRCUyMnRleHQlMjIlMjBuYW1lJTNEJTIybm4lMjIlMjBpZCUzRCUyMnRucC0xJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1lbWFpbCUyMiUzRSUzQ2xhYmVsJTIwZm9yJTNEJTIydG5wLTIlMjIlM0VFbWFpbCUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1lbWFpbCUyMiUyMHR5cGUlM0QlMjJlbWFpbCUyMiUyMG5hbWUlM0QlMjJuZSUyMiUyMGlkJTNEJTIydG5wLTIlMjIlMjB2YWx1ZSUzRCUyMiUyMiUyMHJlcXVpcmVkJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJ0bnAtZmllbGQlMjB0bnAtcHJpdmFjeS1maWVsZCUyMiUzRSUzQ2xhYmVsJTNFJTNDaW5wdXQlMjB0eXBlJTNEJTIyY2hlY2tib3glMjIlMjBuYW1lJTNEJTIybnklMjIlMjByZXF1aXJlZCUyMGNsYXNzJTNEJTIydG5wLXByaXZhY3klMjIlM0UlQzIlQTBCeSUyMGNvbnRpbnVpbmclMkMlMjB5b3UlMjBhY2NlcHQlMjB0aGUlMjBwcml2YWN5JTIwcG9saWN5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News