https://signoz.io logo
#support
Title
# support
a

Ailen

12/03/2022, 3:54 AM
Hello,I installed SigNoz yesterday, and the 50G disk is full soon, how to optimize the disk usage?
s

Srikanth Chekuri

12/03/2022, 5:10 AM
Can you share the output of this query?
Copy code
SELECT
    database,
    table,
    formatReadableSize(sum(data_compressed_bytes) AS size) AS compressed,
    formatReadableSize(sum(data_uncompressed_bytes) AS usize) AS uncompressed,
    round(usize / size, 2) AS compr_rate,
    sum(rows) AS rows,
    count() AS part_count
FROM system.parts
WHERE (active = 1) AND (database LIKE '%') AND (table LIKE '%')
GROUP BY
    database,
    table
ORDER BY size DESC;
It gives you the tables and their sizes. We will know which ones have the maximum size and take some action
a

Ailen

12/03/2022, 6:05 AM
thx for your reply, where can i run this query?
s

Srikanth Chekuri

12/03/2022, 7:40 AM
You need to connect to clickhouse and run this.
a

Ailen

12/03/2022, 9:16 AM
message has been deleted
Hello, this is my screenshot of the query
how can i optimize the storage thx
I just want keep recent 3 days data, what should i do?
s

Srikanth Chekuri

12/03/2022, 11:15 AM
The compressed data is around ~5GB in total for SigNoz so you may have something else taking up the remaining disk space. Please refer to this guide for setting retention https://signoz.io/docs/userguide/retention-period/
4 Views