Manage Production Systems on Compute Engine | Cost Analysis Guide

Cost Analysis of Running Production Systems on Compute Engine

Question

You manage several production systems that run on Compute Engine in the same Google Cloud Platform (GCP) project.

Each system has its own set of dedicated Compute Engine instances.

You want to know how must it costs to run each of the systems.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

https://cloud.google.com/compute/docs/logging/usage-export

To determine the cost of running each system on Compute Engine instances in the same GCP project, you can take advantage of the cost management tools available in GCP. There are several ways to do this, but here are four options to consider:

A. In the Google Cloud Platform Console, use the Cost Breakdown section to visualize the costs per system.

This option provides an easy way to visualize costs at a high level for each system. You can navigate to the Cost Breakdown page in the GCP Console, select the project, and then select the system you want to examine. The Cost Breakdown page provides a high-level view of costs by resource, usage, and service. While this approach can provide an overview of costs, it may not provide enough detail to accurately allocate costs to each system. Additionally, it may not be possible to filter or drill down into the data to get more granular information.

B. Assign all instances a label specific to the system they run. Configure BigQuery billing export and query costs per label.

This option involves labeling each Compute Engine instance with a tag or label that identifies the system it belongs to. You can then configure BigQuery billing export to export billing data to a dataset in BigQuery. With this data in BigQuery, you can use SQL queries to filter and aggregate costs based on the labels assigned to each instance. This approach can provide a more detailed view of costs by system and is highly customizable. However, it requires some setup and configuration.

C. Enrich all instances with metadata specific to the system they run. Configure Stackdriver Logging to export to BigQuery, and query costs based on the metadata.

This option is similar to option B, but instead of using labels, it involves enriching each instance with metadata that identifies the system it belongs to. You can then configure Stackdriver Logging to export logs to a dataset in BigQuery. With this data in BigQuery, you can use SQL queries to filter and aggregate costs based on the metadata assigned to each instance. This approach can provide a more detailed view of costs by system and allows you to use the metadata to analyze usage patterns and other metrics. However, it also requires some setup and configuration.

D. Name each virtual machine (VM) after the system it runs. Set up a usage report export to a Cloud Storage bucket. Configure the bucket as a source in BigQuery to query costs based on VM name.

This option involves naming each Compute Engine instance after the system it belongs to. You can then configure a usage report export to export usage data to a Cloud Storage bucket. With this data in the bucket, you can configure the bucket as a data source in BigQuery and use SQL queries to filter and aggregate costs based on the names assigned to each instance. This approach can provide a highly detailed view of costs by system and is customizable. However, it requires some setup and configuration.

In summary, there are multiple ways to determine the cost of running each system on Compute Engine instances in the same GCP project. The best approach depends on your specific needs and the level of detail required to accurately allocate costs to each system. Options B, C, and D provide more granularity than option A, but they require additional setup and configuration.