0Pricing
MLOps Academy · レッスン

CPU、メモリ、GPUを要求する

Podが正しくスケジュールされるようリソース制限を設定します。

「CPU、メモリ、GPUを要求する」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMLOps Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MLOps Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

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. ✅

よくある質問

「CPU、メモリ、GPUを要求する」レッスンは無料ですか?

はい。「CPU、メモリ、GPUを要求する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。

「CPU、メモリ、GPUを要求する」で何を学びますか?

Podが正しくスケジュールされるようリソース制限を設定します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

MLOps Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「CPU、メモリ、GPUを要求する」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMLOps Academyレッスンでコードを書いて実行できますか?

はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. モデル向けのPod、Deployment、Service
  2. CPU、メモリ、GPUを要求する
  3. ConfigMapsとSecretsで設定する
  4. Kubernetes Jobとして学習を実行する
← MLOps Academyに戻る