Courseiva
Machine Learning Implementation and OperationshardMultiple ChoiceObjective-mapped

GPU Instance for CPU-Bound Model Latency

A company deploys a real-time inference endpoint using Amazon SageMaker with an ML model that has strict latency requirements. The endpoint currently uses a single ml.c5.xlarge instance. During a load test, the p99 latency exceeds the 100ms threshold. The team adds more instances but latency does not improve because the model is heavily CPU-bound. What is the MOST cost-effective change to meet the latency requirement?

Quick Answer

The clue that should drive this answer is what happened when the team added more instances: latency didn't improve, which tells you the problem isn't a lack of parallel capacity to handle concurrent requests, it's that each individual request is slow because the model itself is compute-bound on the CPU. Horizontal scaling only helps when the bottleneck is throughput under concurrent load; it does nothing for a per-request latency problem rooted in how long a single inference takes to compute, since each additional instance just runs the same slow computation independently. Because the model is explicitly described as CPU-bound, switching to a GPU-backed instance type like ml.g4dn.xlarge addresses the actual bottleneck directly: GPUs are built for the kind of parallel numerical computation that machine learning inference relies on, so offloading that computation from the CPU to a GPU reduces the time each individual request takes to process, which is exactly the p99 latency metric the team is failing to meet. This is also framed as the most cost-effective fix because it resolves the root cause with a single instance-type change, rather than continuing to add more CPU-based instances that don't actually shrink per-request latency and would just accumulate cost without solving the problem. Whenever a scenario shows that adding instances doesn't improve latency and specifically identifies the workload as compute-bound, treat that as a strong signal to look at accelerating the compute itself, such as moving to a GPU instance, rather than continuing to scale out.

⚠ Common exam trap

Test-takers frequently assume adding more instances (horizontal scaling) always reduces latency, but for CPU-bound models, the bottleneck is per-instance compute, not request queuing, so vertical scaling with GPU instances is required.

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

Change the instance type to a GPU instance such as ml.g4dn.xlarge.

The model is CPU-bound, meaning the bottleneck is compute capacity, not throughput. GPU instances like ml.g4dn.xlarge offload parallel computation from the CPU, significantly reducing per-inference latency. This directly addresses the root cause without over-provisioning, making it the most cost-effective solution.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Change the instance type to a GPU instance such as ml.g4dn.xlarge.

    Why this is correct

    GPU instances accelerate model inference, reducing per-request latency.

  • Use a multi-model endpoint to serve multiple models on the same instance.

    Why it's wrong here

    Multi-model endpoints improve resource utilization but not per-model latency.

  • Enable automatic scaling based on inference latency.

    Why it's wrong here

    Scaling adjusts capacity but does not reduce per-request latency.

  • Increase the number of instances and use a target tracking scaling policy.

    Why it's wrong here

    Adding instances spreads load but does not reduce per-request latency for CPU-bound models.

About these practice questions

This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on MLS-C01

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 company is using Amazon SageMaker to host a real-time inference endpoint for a natural language processing model. The endpoint is configured with an ml.m5.large instance. After deployment, the company observes that the inference latency is higher than expected, and the endpoint is experiencing CPU utilization near 100% during peak hours. The model is a PyTorch model that uses a transformer architecture. The company wants to reduce latency without increasing cost significantly. Which approach should the company take?

medium
  • A.Configure the endpoint with Auto Scaling to add more instances during peak hours.
  • B.Switch to batch transform for inference.
  • C.Attach an Elastic Inference accelerator to the existing instance.
  • D.Change the endpoint instance type to ml.g4dn.xlarge to use GPU acceleration.

Why D: The issue is high CPU utilization causing latency for a PyTorch transformer model. GPU instances like ml.g4dn.xlarge can significantly accelerate inference through parallel processing, reducing latency. Option D is correct. Elastic Inference (C) may provide some acceleration but is less effective for transformer models and adds complexity. Auto Scaling (A) helps with traffic spikes but does not reduce per-request latency. Batch Transform (B) is for offline inference, not real-time.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services 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 MLS-C01 exam.