nethermind
nethermind copied to clipboard
Better way of monitoring pruning progress?
I read the entire documentation regarding pruning so hopefully I didn't miss anything.
As per my understanding when using Pruning.FullPruningTrigger=Manual (which is the default), the way to initiate pruning is by enabling the Admin module via JsonRpc.EnabledModules and then caling admin_prune:
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"admin_prune","params":[],"id":1}' \
localhost:8545
The above, did start my pruning process, after which subsuequnt calls to admin_prune return InProgress:
{
"jsonrpc": "2.0",
"result": "InProgress",
"id": 1
}
That means that in order to check if the pruning is done I have to repeatedly call admin_prune (or check if there's more than one folder under nethermind_db\<network>\state?)
The issue I have with this approach is that the same API is used for both starting and monitoring the pruning, obviously there is Pruning.FullPruningMinimumDelayHours which defaults to 240 hours so once the pruning is done any subsequent call to admin_prune returns Delayed:
{
"jsonrpc": "2.0",
"result": "Delayed",
"id": 1
}
My issues/questions:
- I can't tell if the pruning succeeded or failed (for example, out of disk space) without shutting down the client by setting
Pruning.FullPruningCompletionBehavior="ShutdownOnSuccess"which is undersireable for obvious reasons - I don't wish to run pruning again at the end of
FullPruningMinimumDelayHours, I just want to check if pruning was finished and wether it was succsful or not - Following up on previous bullet: does
Delayedmean pruning will automatically begin once the 240 hour timer set byFullPruningMinimumDelayHoursends? If so, that is also undesireable as I don't want to start pruning again automatically
Also there is a memory leak somewhere in Pruning if it's triggered manually.
My Nethermind crashed by OOM with 92GB in VM when I've activated pruning.
Also there is a memory leak somewhere in Pruning if it's triggered manually.
My Nethermind crashed by OOM with 92GB in VM when I've activated pruning.
@kkokosa
We need an estimate of progress. Number of nodes processed would help, but percentage would be ideal. Secondly, when it fails, and indication of the error is really important.
I hope new pruning docs explain something a bit https://docs.nethermind.io/fundamentals/pruning
But to address all topics from this pretty old issue:
- There were some memory issues on pruning but now it works well
- To check the pruning outcome you should follow logs - that is the only way for now.
- Delay means exactly what you referred - will be triggered after delay period will be fulfilled
About progress it is a moving target so hard to set a percentage which will be accurate, we have already quite a few issues around that but not yet having any good solution.
Ty @kamilchodola!