-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Anvil is consuming high disk space ( more than ~ 25Gi in 1 hour) #8392
Comments
most probably related to the fact that since #8160 all blocks are dumped in json file |
Is there a plan to optimize the consumption? I am not able to find the previous working version in the list of foundry images. Is there any suggested version I can use to avoid this issue? |
do you need to keep the state dump during test load or could you just prune it periodically? |
I need to keep the state, I tried to use |
you could probably try with this version https://github.com/foundry-rs/foundry/releases/tag/nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559 |
also wonder if setting up something like a logrotate job to compress file if certain size exceeded would work |
Would this compression disallow reading that block data? |
yes, they would need to be uncompressed in order to read it |
the foundry/crates/anvil/src/eth/backend/mem/storage.rs Lines 58 to 61 in 82ff8ee
is set to 3600 foundry/crates/anvil/src/eth/backend/mem/storage.rs Lines 45 to 46 in 82ff8ee
I think would make sense to have it configurable for handling scenarios like in this ticket, @mattsse wdyt? |
definitely, opening an issue for this: #8399 |
Could you please also add a documentation for this? If the MAX_ON_DISK_HISTORY_LIMIT is over will I encounter similar error ( |
the |
@grandizzy we increased the available disc space, but we keep on getting error like this even without This is blocking us significantly. Would really appreciate any suggestion to resolve this - command used -
|
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
anvil 0.2.0 (ed79650 2024-06-29T05:54:37.892564901Z)
What command(s) is the bug in?
anvil --chain-id 90000038 --block-time 1 --gas-limit 100000000 --code-size-limit 30000 --base-fee 1000000 --host 0.0.0.0 --port 8545 --accounts 20 --balance 2000000000000000000 --state /state/dump.json --state-interval 60 --transaction-block-keeper 500
Operating System
Linux
Describe the bug
With the recent anvil version the disk usage in anvil working dir is getting extremely high.
Here are some usage data when I ran
du
on the container's working dir.I am performing a load test which used to work with
forge 0.2.0 (0a5b22f 2024-05-21T10:30:02.156279959Z)
but with the recent version upgrade the high disk usage is causing the pod to get evicted.
The load test sends a high volume of tx into the anvil node ( ~ 10-100 tx per 5 second ).
Is there any recent update which can be the cause of this high disk consumption? Is there any work around for this issue?
The text was updated successfully, but these errors were encountered: