Skip to content

High memory usage #91

@liuchengxu

Description

@liuchengxu

It's observed that the memory usage is pretty high when Subcoin only runs import-blocks to import the blocks from Bitcoin Core database. Concretely, it consumes about 28GiB of memory on my machine (128GiB in total) when syncing to the height ~580000. We should investigate and reduce the memory usage.

./target/release/subcoin import-blocks --data-dir /bitcoin-data -d data --dev
...
2025-03-04 10:49:42 Imported 76443 blocks,  0.9 bps, best#584454,00000000000000000020c3e9286239f03389e788e5ad359c13ae0c5a63f17ef9 (0xc99f…a1cd)
2025-03-04 10:49:43 Imported 76444 blocks,  0.8 bps, best#584455,000000000000000000192aba3d2b0ffb382896e033bb47cb8a29c0f10b2137ac (0xa99b…90b4)
2025-03-04 10:49:44 Imported 76445 blocks,  0.9 bps, best#584456,0000000000000000000e707114b6e3970c807d9950048c56b2f8fee60814ae2a (0x36d1…7694)
2025-03-04 10:49:45 Imported 76446 blocks,  0.9 bps, best#584457,00000000000000000020326a561dbd2a274c5a96c63e9ecd65ce5e164d0e7426 (0xa41f…8d4b)

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