Skip to content

Test to showcase high memory consumption of batch_script_get_history #89

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

da-kami
Copy link

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

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
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
Copy link
Contributor

LLFourn commented Nov 16, 2023

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants