Analyzing Google Cloud Storage Usage by Class

Allen Jarvis
2 min readOct 25, 2018

--

Google Cloud Storage allows you to store objects at different storage classes to balance performance and cost considerations. For data that must be highly available with low latency, you can store objects at the Multi-Regional class so that objects are duplicated across data centers in multiple regions. On the other end of the spectrum, data that is rarely accessed can be stored at the Coldline class at a much lower cost point.

While each storage bucket has a default class (or “tier”), a bucket can contain objects of all different classes. With Object Lifecycle Management, you can even automate the optimization of object classes to save even more.

However, these options can make it difficult to understand the amount listed on your bill (or in the Billing Report, or in the billing data in Bigquery). Billing data groups usage by project and class, but it doesn’t show storage by bucket. To find which buckets are responsible for the storage amounts listed on your bill, you’ll need to use Stackdriver.

Stackdriver can be used to monitor applications, but it’s also useful for tracking underlying infrastructure like Google Cloud Storage. To see storage totals grouped by bucket and class, you can create a custom dashboard:

  1. Within the Stackdriver monitoring console, navigate to the workspace for the project.
  2. Hover over “Dashboards” in the left hand menu, and select “Create Dashboard”.
  3. In the new dashboard, click “Add Chart”.
  4. Under Resource Type, search for and select “storage.googleapis.com/storage/total_bytes”.
  5. Under Group By, select “storage_class” and “bucket_name”.
  6. Click “Save”.

Note that these metrics will only be available for Stackdriver workspaces where storage usage exists. For projects just beginning to use Google Cloud Storage, there may be a delay before this metric shows up.

--

--