Skip to content

Estimate energy consumption using GCP Billing Data

License

Notifications You must be signed in to change notification settings

Greening-Digital/cloud-jewels

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Jewels: Estimating Energy Consumption on GCP

This repo illustrates how to estimate GCP energy consumption using data from the GCP Billing export in BigQuery. The script provided scans all resource usage over a trailing thirty day period and estimates consumption by using a hard-coded coefficient lookup table.

Usage

To run the script, modify the usage_by_jewel_class.sql file to point to your billing export table in BigQuery. Also be sure you have the Cloud SDK: Command Line Interface installed. Once you do, run the script shown below and you should see a similar output table representing your estimated trailing thirty day consumption estimates!

> ./cloud-jewels.sh -p my-billing-project
>
> Waiting on bqjob_r2a1f3145ee30850a_000001711743b581_1 ... (1s) Current status:
> DONE

+------------------+------+--------------------+
|   jewel_class    | skus |    cloud_jewels    |
+------------------+------+--------------------+
| CPU              |   17 |          xxxxxx.xx |
| Cloud Storage    |   25 |            xxxx.xx |
| Storage          |   16 |            xxxx.xx |
| SSD Storage      |    4 |              xx.xx | 
| GPU              |    4 |               x.xx |
| Excluded Service |  281 |                0.0 |
| Network          |   36 |                0.0 |
| Memory           |   13 |                0.0 |
+------------------+------+--------------------+

Reference

About

Estimate energy consumption using GCP Billing Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TSQL 79.8%
  • Shell 20.2%