After you initiate a major compaction, you can view the disk usage during the compaction to learn about resource usage in the cluster.
During a major compaction, you can calculate the disk usage based on the free_size column in total_size of the __all_virtual_disk_stat table.
Procedure
Log on to the
systenant as therootuser.Access the database named
oceanbase.obclient> USE oceanbase;Execute the following statement to query the disk usage information during a major compaction.
For example:
obclient> SELECT svr_ip,svr_port,total_size/1024/1024/1024 AS total, free_size/1024/1024/1024 AS free,(total_size-free_size)/1024/1024/1024 as used FROM __all_virtual_disk_stat; +----------------+----------+------------------+------------------+----------------+ | svr_ip | svr_port | total | free | used | +----------------+----------+------------------+------------------+----------------+ | xxx.xx.xxx.xxx | 2882 | 176.552734375000 | 176.269531250000 | 0.283203125000 | | xxx.xx.xxx.xxx | 2882 | 176.552734375000 | 176.177734375000 | 0.375000000000 | | xxx.xx.xxx.xxx | 2882 | 176.552734375000 | 176.177734375000 | 0.375000000000 | +----------------+----------+------------------+------------------+----------------+ 3 rows in set