#support

Querying Clickhouse Storage Usage and Configuring Cold Storage

TLDR 马璐 asked about checking Clickhouse storage usage and cold storage configuration. Srikanth explained how to measure volume size and informed about the need to set move_factor in storage policies for automatic data moving.

Powered by Struct AI
7
1mo
Solved
Join the chat
Oct 02, 2023 (2 months ago)
马璐
Photo of md5-d0ddad2dc7df4853e13d13da13e3edf1
马璐
08:33 PM
Hi team, is there a way to check the clickhouse storage usage hence understand how much PVC to claim for the database?
Oct 04, 2023 (2 months ago)
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
04:12 PM
Did you mean to ask how much does each row/record typically take and want to estimate the volume size to provision?
马璐
Photo of md5-d0ddad2dc7df4853e13d13da13e3edf1
马璐
04:49 PM
If there is anyway to measure the volume size based on the number of spans that would be great!
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
05:21 PM
It entirely depends on the avg number of attributes your spans have. Ingest some data and look at the table size https://kb.altinity.com/altinity-kb-useful-queries/altinity-kb-database-size-table-column-size/
马璐
Photo of md5-d0ddad2dc7df4853e13d13da13e3edf1
马璐
05:24 PM
Got it, thank you !
Oct 05, 2023 (1 month ago)
马璐
Photo of md5-d0ddad2dc7df4853e13d13da13e3edf1
马璐
12:56 AM
When I configure cold storage, do you know if clickhouse will automatically move the data to cold storage when don’t have enough space but the retention period not reached?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:10 AM
No, that doesn’t happen by default. You need to set up move_factor in policy. Please read about move_factor ratio in ClickHouse storage policies.