0Pricing
MLOps Academy · Lekcja

Żądanie CPU, pamięci i GPU

Ustaw limity zasobów, aby pody były prawidłowo planowane

Żądanie CPU, pamięci i GPU to bezpłatna lekcja MLOps Academy na CoddyKit. To lekcja 2 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej MLOps Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs MLOps Academy zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

The Scheduler Needs Numbers

Kubernetes places Pods onto nodes that have room. To decide, the scheduler needs you to declare how much CPU and memory each model Pod will use.

Requests vs Limits

A request is the amount guaranteed and used for scheduling. A limit is the ceiling a container may not cross. You almost always set both.

CPU Is Measured in Millicores

CPU is counted in millicores: 1000m equals one full core. Asking for 500m means your model Pod is promised half of one CPU core.

resources:
  requests:
    cpu: "500m"
    memory: "512Mi"
  limits:
    cpu: "1"
    memory: "1Gi"

Memory Uses Mi and Gi

Memory is set in mebibytes or gibibytes, like 512Mi or 2Gi. Size it to your model plus its runtime, with a little headroom on top.

Too Low and the Pod Stays Pending

If no node can satisfy your requests, the Pod sits in Pending forever. Big GPU models often wait simply because nothing free is large enough.

OOMKilled When You Exceed Memory

Cross your memory limit and the kernel kills the container with an OOMKilled status. Right-sizing limits keeps your model server from being reaped mid-request. 💥

CPU Limits Throttle, Not Kill

Unlike memory, breaching a CPU limit does not kill the Pod. The container is just throttled, so latency climbs instead of the process dying.

GPUs Are Requested as Limits

GPUs are an extended resource. You ask for them only under limits with nvidia.com/gpu, and the value must be a whole number, never a fraction.

resources:
  limits:
    nvidia.com/gpu: 1

A GPU Is Not Time-Shared

One GPU request grabs the entire device for that Pod by default. Two Pods cannot casually share a card without special MIG or time-slicing setup.

The Device Plugin Makes GPUs Visible

Nodes only advertise GPUs after the NVIDIA device plugin runs on them. No plugin, no nvidia.com/gpu resource, and your GPU Pod stays Pending.

Right-Sizing Saves Money

Over-requesting wastes whole nodes; under-requesting risks evictions. Watching real usage and tuning requests is how you keep serving both stable and cheap.

Quick Check

What happens when a container exceeds its memory limit?

Recap

Declare requests and limits for CPU and memory, ask for whole GPUs under limits, and right-size from real usage to keep model Pods healthy. ✅

Często zadawane pytania

Czy lekcja „Żądanie CPU, pamięci i GPU” jest bezpłatna?

Tak — pełny tekst „Żądanie CPU, pamięci i GPU” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu MLOps Academy, przejdź na CoddyKit PRO. Kurs MLOps Academy zawiera 4 lekcji w sumie.

Co nauczysz się w „Żądanie CPU, pamięci i GPU”?

Ustaw limity zasobów, aby pody były prawidłowo planowane Ćwiczysz MLOps Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć MLOps Academy?

Nie wymagamy żadnego doświadczenia. MLOps Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 2 z 4.

Ile czasu zajmuje lekcja „Żądanie CPU, pamięci i GPU”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji MLOps Academy?

Tak. Każda lekcja MLOps Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Pody, wdrożenia i usługi dla modeli
  2. Żądanie CPU, pamięci i GPU
  3. Konfigurowanie za pomocą ConfigMaps i Secrets
  4. Uruchamianie trenowania jako zadania Kubernetes
← Powrót do MLOps Academy