Skip to content

Test to showcase high memory consumption of batch_script_get_history - #89

Closed
da-kami wants to merge 1 commit into
bitcoindevkit:masterfrom
comit-network:testing-things
Closed

da-kami wants to merge 1 commit into
bitcoindevkit:masterfrom
comit-network:testing-things

Conversation

@da-kami

@da-kami da-kami commented Oct 21, 2022

Copy link
Copy Markdown

When running batch_script_get_history on a Linux machine with processing many scripts the memory consumption is enormous and does not go down. This test showcases this behavior.

When triggering the test with 7000 scripts we see a memory consumption of about 4GB.
Note that you can add a loop to re-trigger the batching to see that the memory does not get freed.

This problem could be reproduced on multiple Linux machine, but not on MacOS.

When running `batch_script_get_history` on a Linux machine with processing many scripts the memory consumption is enormous and does not go down.
This test showcases this behavior. When triggering the test with 7000 scripts we see a memory consumption of about 4GB.
This problem could be reproduced on multiple Linux machine, but not on MacOS.

Note that you can add a loop to re-trigger the batching to see that the memory does not get freed.
@notmandatory

Copy link
Copy Markdown
Member

Thanks for test to repro this issue, any ideas why it might be happening? And do you think this would be a common usecase? In most cases I'd expect this to be used with smaller single users wallets and for very larger server wallets something like the bitcond RPC client (or a future BIP 157/158 client).

@LLFourn

LLFourn commented Nov 16, 2023

Copy link
Copy Markdown
Contributor

Memory never being freed is an issue no matter what size though. I feel like there is a lot to improve in the way we are using electrum at every level. I know @evanlinjin has ideas.

@oleonardolima

Copy link
Copy Markdown
Contributor

It's become stale, and didn't update in a while, as it's already being tracked by an issue, probably should benchmark it against the other client as I mentioned in the issue comment.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants