easyMultiple ChoiceObjective-mapped
Cloud Profiler for CPU and Memory Profiling
A developer wants to automatically capture CPU and memory profiles from a production application running on Compute Engine to identify performance bottlenecks. Which Google Cloud tool should they use?
Quick Answer
The answer is Cloud Profiler, the correct Google Cloud tool for automatically capturing CPU and memory profiling from a production application on Compute Engine. It uses statistical sampling to continuously gather resource consumption data with minimal overhead, identifying exactly which functions or methods are causing performance bottlenecks without requiring code changes or adding significant latency. On the Google Professional Cloud Developer exam, this question tests your ability to distinguish between monitoring tools like Cloud Monitoring, which tracks metrics, and profiling tools like Cloud Profiler, which digs into code-level resource usage. A common trap is confusing Cloud Profiler with Cloud Trace, but remember that Trace handles latency for individual requests, while Profiler focuses on CPU and memory usage across the entire application. Memory tip: Profiler = "Profile" the CPU and memory, not the request path.
⚠ Common exam trap
Watch out — candidates often confuse Cloud Profiler with Cloud Monitoring or Cloud Trace, mistakenly thinking that metrics or tracing alone can identify CPU/memory bottlenecks, but only Profiler provides code-level profiling data.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Cloud Profiler
Cloud Profiler is the correct tool because it continuously gathers CPU and memory usage data from production applications with minimal overhead, using statistical sampling to identify which functions or methods consume the most resources. This allows developers to pinpoint performance bottlenecks without adding significant latency or requiring code changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cloud Logging
Why it's wrong here
Cloud Logging captures logs, not performance profiles.
- ✗
Cloud Monitoring
Why it's wrong here
Cloud Monitoring collects time-series metrics, not profiling data.
- ✗
Cloud Trace
Why it's wrong here
Cloud Trace focuses on request latency, not resource profiling.
- ✓
Cloud Profiler
Why this is correct
Captures CPU and memory profiles for analysis.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCD question from scratch — 964 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on PCD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer needs to view detailed performance profiles of a Java application running on Compute Engine to identify CPU hotspots. Which Google Cloud service should they use?
easy- A.Cloud Monitoring
- B.Cloud Trace
- ✓ C.Cloud Profiler
- D.Cloud Logging
Why C: Cloud Profiler is the correct service because it provides continuous, low-overhead CPU and heap profiling for Java applications running on Compute Engine. It uses statistical sampling to identify which methods consume the most CPU time, enabling developers to pinpoint hotspots without requiring code changes or redeployment.
Variation 2. A developer wants to profile their application's CPU and memory usage to identify performance bottlenecks. Which TWO Google Cloud services should they use?
easy- A.Cloud Logging
- B.Cloud Debugger
- ✓ C.Cloud Profiler
- ✓ D.Cloud Trace
- E.Cloud Monitoring
Why C: The two Google Cloud services that a developer should use to profile application CPU and memory usage and identify performance bottlenecks are Cloud Profiler and Cloud Trace. Cloud Profiler (Option C) continuously gathers and analyzes call stacks and resource consumption across your application, pinpointing functions that consume the most CPU and memory. Cloud Trace (Option D) provides distributed tracing to analyze request latency and identify performance bottlenecks in microservices architectures. Together, they offer a comprehensive view of application performance, with Profiler focusing on resource-intensive code paths and Trace focusing on request-level delays.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCD practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCD exam.