Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practices for optimizing full node performance #6160

Open
breezytm opened this issue Feb 6, 2025 · 1 comment
Open

Best practices for optimizing full node performance #6160

breezytm opened this issue Feb 6, 2025 · 1 comment

Comments

@breezytm
Copy link

breezytm commented Feb 6, 2025

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"
       }   
  ],
@Sunny6889
Copy link

@breezytm What is your use case? For example, what will be the expected request frequency for RPC requests? Additionally, you need to ensure that the JAVA_OPTS configuration takes effect, as it is managed by Docker's resource controls. You can use docker stats to monitor basic metrics. If you expect a high QPS (queries per second), you may refer to this similar issue for guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants