Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

trace_replayBlockTransactions used too much memory #11901

@forencen

Description

@forencen

hello. I met a problem.
when I use 200 tiems trace_replayBlockTransactions rpc method , openethereum-linux-v3.0.1 will use too much memory:
image

config.toml:

[parity]

mode="active"
chain = "mainnet"
base_path = "/data/chaindata"

light = false
no_persistent_txqueue = true



[rpc]

disable = false

port = 39842

interface = "0.0.0.0"

cors = ["*"]

apis = ["all"]

hosts = ["all"]

server_threads = 1000

[websockets]

disable = false
port = 39843
interface = "local"
origins = ["all"]

# 浏览器的origin header

apis = ["all"]
hosts = ["all"]

[network]

port = 30303
min_peers = 3
max_peers = 6
snapshot_peers = 0
warp = true
max_pending_peers = 64

[mining]
# Parity will keep/relay at most 32768 transactions in queue.
tx_queue_size = 32768
# Maximum number of transactions per sender in the queue. By default it's 1% of the entire queue, but not less than 16.
tx_queue_per_sender = 8192
# Prepare a block to seal even when there are no miners connected.
force_sealing = true


[footprint]
cache_size = 10240
db_compaction = "ssd"
fast_and_loose = false


[misc]
logging = "own_tx=trace"
log_file = "/var/log/parity.log"
color = true

for block_number in range(4000000, 5000000):
    logger.info(block_number)
    payload = {"jsonrpc": "2.0", "method": "trace_replayBlockTransactions",
               "params": [hex(block_number),  ["trace"]], "id": 1}
    headers = {
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    data = response.json()
    result = data.get('result') or None

The important thing is that when I close the python program, the memory does not drop

Can I limit the memory usage of ethvm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions