Why does cardano-graphql-v7.0.0 use 1.8T disk space
apufvqsp opened this issue · 2 comments
apufvqsp commented
Ask a question
hi
I am using cardano-graphql-v7.0.0, it has been running for 4 months, and now I find that it takes up 1.8T of disk space,
is this a normal disk usage?
Is there a way to reduce disk usage?
airstring commented
How did you deploy ada?My node takes up 700G of disk space.
infnada commented
I also had an unusual increment of disk space in the Asset
table caused by an error in Psql Toast. Thats a big shot without more info from your side but what i would do:
- Check which table/s is using this much space:
https://stackoverflow.com/a/52706756
Modified version:
select current_database() as database,
pg_size_pretty(total_database_size) as total_database_size,
schema_name,
table_name,
pg_size_pretty(total_table_size) as total_table_size,
pg_size_pretty(table_size) as table_size,
pg_size_pretty(index_size) as index_size
from ( select table_name,
table_schema as schema_name,
pg_database_size(current_database()) as total_database_size,
pg_total_relation_size(quote_ident(table_name)) as total_table_size,
pg_relation_size(quote_ident(table_name)) as table_size,
pg_indexes_size(quote_ident(table_name)) as index_size
from information_schema.tables
where table_schema=current_schema()
order by total_table_size
) as sizes;
- check for any table where index_size + table_size != total_table_size
- perform a
VACUUM FULL "TABLE_NAME";
on the tables affected - if you have Toast error like me you can follow https://stackoverflow.com/a/68194898 to solve it
My DB is ~300GB but Assets metadata are not fully synced
NOTE: i'm not a psql DBA and i'm not using this in PROD environment. DYOR before executing anything