Courseiva
Machine Learning Implementation and OperationshardMultiple ChoiceObjective-mapped

Choosing the Right GPU Instance for SageMaker Real-Time Inference

A company is deploying a real-time inference endpoint using SageMaker. The model has a high memory footprint and requires GPU acceleration. Which instance type and configuration should be used to minimize cost while meeting latency requirements?

Quick Answer

This question is testing right-sizing rather than raw capability: the model needs GPU acceleration and has a high memory footprint, but the goal is to meet that requirement at the lowest cost, not to provision the largest available GPU instance. The P3 instance family uses NVIDIA V100 GPUs, which deliver the high memory bandwidth needed to keep a large model's inference latency low, so the family itself is well matched to the requirement. Within that family, the 2xlarge size is the smallest configuration, giving a single GPU with enough memory to host the model without paying for additional GPUs or a larger multi-GPU configuration that this single real-time endpoint doesn't need. Choosing the smallest instance in the right family is the pattern to recognize: once you've identified the GPU family that satisfies the technical requirement, cost-minimization means picking the smallest configuration within that family rather than over-provisioning GPUs you won't use. This mirrors how right-sizing works with any AWS instance family, first narrow down to the family that meets the workload's core need, then select the smallest size in that family that still comfortably satisfies it. Whenever a scenario asks you to minimize cost while still meeting a GPU or memory requirement, expect the answer to be the smallest instance size within the appropriate instance family, not the largest or most powerful option available.

⚠ Common exam trap

Many candidates assume a larger instance with more GPUs (like ml.p3.16xlarge) is needed for high-memory models, but the question specifically asks to minimize cost while meeting latency, so the smallest GPU instance that fits the model is optimal.

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

ml.p3.2xlarge with 1 GPU

(ml.p3.2xlarge with 1 GPU) is correct because it provides the required GPU acceleration for the high-memory-footprint model while using the smallest instance in the P3 family, which minimizes cost. The P3 instances use NVIDIA V100 GPUs with high memory bandwidth, suitable for real-time inference with low latency, and the 2xlarge size offers sufficient GPU memory without over-provisioning.

Answer analysis

Option-by-option breakdown

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

  • ml.p3.2xlarge with 1 GPU

    Why this is correct

    Good balance of GPU and memory for high-memory models at reasonable cost.

  • ml.g4dn.xlarge with 1 GPU

    Why it's wrong here

    Less memory than p3.2xlarge, may cause OOM errors.

  • ml.c5.xlarge with no GPU

    Why it's wrong here

    No GPU, so cannot meet GPU acceleration requirement.

  • ml.p3.16xlarge with 8 GPUs

    Why it's wrong here

    Overprovisioned and costly for a single model.

Visual reference

R1 R2 R3 R4 10 100 10 100 OSPF picks R1→R2→R4 (cost 20) over R1→R3→R4 (cost 200)

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 deploying a machine learning model using SageMaker. The model is a PyTorch model that requires GPU for inference. The company wants to minimize costs while ensuring low latency. Which instance type should be used for the SageMaker endpoint?

medium
  • A.ml.m5.large
  • B.ml.p3.2xlarge
  • C.ml.c5.2xlarge
  • D.ml.g4dn.xlarge

Why D: Ml.g4dn.xlarge is a GPU instance with an NVIDIA T4, optimized for inference, and is more cost-effective than ml.p3.2xlarge while still providing low latency for PyTorch models. Option A (ml.m5.large) is wrong as it is a CPU instance without GPU support. Option B (ml.p3.2xlarge) is wrong because although it has a GPU, it is more expensive and not necessary for low-latency inference; ml.g4dn.xlarge offers similar performance at lower cost. Option C (ml.c5.2xlarge) is also a CPU instance and unsuitable.

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.