Skip to main content
Question

How to check disk usage in queries

  • August 2, 2019
  • 4 replies
  • 14 views

Bryan_H
Forum|alt.badge.img+2

I had a customer ask whether there is a way to check how much disk Vertica is using for join spill, temp files in TM, etc. They're at about 80% disk usage and expect to get near 90% in the next few weeks as they buy and build new boxes to add to the cluster. Which system or DC tables have this info? Thanks...

4 replies

Vertica_Curtis
Forum|alt.badge.img+1
  • Participating Frequently
  • August 2, 2019

select sum(counter_Value) from execution_engine_profiles where counter_name = 'bytes spilled' ;

or this:

--bytes spilled
select time_slice("time", 5, 'minute') as ts, sum(size_in_bytes)/1024/1024 as GB_created_from_spill
from dc_roses_created
where plan_type = 'TM_DIRECTLOAD'
and original_target = 'AUTO'
and time >= current_date

or this

--spill events
select time_slice(event_timestamp, 5, 'minute') as ts, count(event_type) as num_wos_spill_events
from query_Events
where event_type = 'WOS_SPILL'
and event_timestamp >= current_date
group by 1


Vertica_Curtis
Forum|alt.badge.img+1
  • Participating Frequently
  • August 2, 2019

If they haven't already ran DBD, now might be a good time, as DBD would find good ways to compress a lot of that data. So, if they're sitting on just AUTO encoded projections, RLE would save them a lot of space.

They could also drop unused projections.

Just make sure their catalog space is safe - if that fills up, they're going to be screwed. Very messy problem.


Bryan_H
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • August 2, 2019

Hi, thanks for the update, and we've been pressing them to perform basic maintenance like DBD, purge delete vectors, tune the TM pool for over 18 months at this point...


Bryan_H
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • August 2, 2019

Also, thanks for supplying a Vertica Tip for next week :)