High memory usage with V14 Metadata and Extrinsics #434
Labels
bug
Something isn't working
difficulty-hard
Issues that effect much of the codebase and might be difficult to resolve
needs-investigation
This issue needs more info/investigation on what exactly to do
p1
Priority 1
type-decode
Running Archive off the current master (b5ee4d6) results in a high memory usage once blocks utilizing V14 metadata begin execution. The memory issue can be seen from this graph of memory gathered
At some point archive just crashes after oom error.
AFAICT from my debugging the reason for high memory usage as v14 is reached is because documentation is stored along with metadata. So when subxt decodes an extrinsic, it comes with all the associated metadata for those functions attached. This results in many extrinsics being held pre-postgres-insertion in memory with a high amount of extraneous text included.
Included is a query on the extrinsics table while running
node-template
. We see that each extrinsic has the same docs attached for 'Timestamp' -- this would be the same for every extrinsic ever executed V14+.This is definitely redundant since the metadata docs can be stored once in a separate table
Even before V14 blocks are reached, memory is on a slow-uphill climb trending towards 10GB. This memory issue is more ambiguous and I haven't found one single cause. Things that I have tried investigating:
The text was updated successfully, but these errors were encountered: