Skip to content

Best practices for optimizing full node performance #6160

Open
@breezytm

Description

Hello,

I’m an RPC provider setting up a full node using Docker, but I’ve been experiencing an issue where the http port stops responding, eventually timing out. I reached out on Discord but haven’t received any help. Could you provide best practices for configuring the node for optimal performance? Any recommendations would be greatly appreciated.

docker-compose.yml

version: '3.8'

services:
  java-tron:
    image: tronprotocol/java-tron
    container_name: java-tron
    restart: unless-stopped
    ports:
      - "8535:8535" # Json RPC Port
      - "8090:8090" # API Port
      - "50051:50051" # GRPC Port
      - "18888:18888" # P2P Port
    volumes:
      - ./config:/java-tron/conf # Configuration files
      - ./data:/java-tron/data # Blockchain data
      - ./logs:/java-tron/logs # log files
    environment:
      - JAVA_OPTS=-Xmx20g -Xms20g
    command: [
      "-c", "/java-tron/conf/config.conf",
      "-d", "/java-tron/data",
      "-w"
    ]

I followed the recommendation from this issue as well as increasing the -JAVA_OPTS from Xmx10g -Xms10g to Xmx20g -Xms20g which has improved the timeout

  http = [
    #  {
    #    component = "GetNowBlockServlet",
    #    strategy = "GlobalPreemptibleAdapter",
    #    paramString = "permit=1"
    #  },

    #  {
    #    component = "GetAccountServlet",
    #    strategy = "IPQPSRateLimiterAdapter",
    #    paramString = "qps=1"
    #  },

    #  {
    #    component = "ListWitnessesServlet",
    #    strategy = "QpsRateLimiterAdapter",
    #    paramString = "qps=1"
    #  }
       {
         component = "JsonRpcServlet",
         strategy = "QpsRateLimiterAdapter",
         paramString = "qps=20000"
       },
       {
         component = "JsonRpcServlet",
         strategy = "IPQPSRateLimiterAdapter",
         paramString = "qps=20000"
       }   
  ],

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions