Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 35 ยท Droplets and Networking

Droplet Sizes, Plans and Pricing: Choosing the Right CPU and RAM

Understand Droplet plan families (Basic, General Purpose, CPU-Optimized, Memory-Optimized, Storage-Optimized), size slugs, bandwidth and billing, and learn how to right-size a server.

Choosing a Droplet size is the first money decision you make on DigitalOcean. Pick too small and your site crawls; pick too large and you pay for idle capacity every hour. This lesson explains the plan families, how size slugs are named, how billing and bandwidth work, and a practical method for right-sizing.

All prices in the runnable examples are invented round numbers used to demonstrate arithmetic. Real prices differ and change over time; read the current pricing page or run doctl compute size list for the truth.

Plan families

Droplet plans are grouped by what they optimize:

Choose a plan family

Basic Shared CPU, cheapest, great for small sites
General Purpose Dedicated CPU, balanced memory
CPU-Optimized Dedicated CPU for builds and encoding
Memory-Optimized Large RAM for caches and databases
1 / 2
  • Basic Droplets use shared CPU: your virtual cores share physical cores with neighbors. That is fine for blogs, small APIs, dev servers and learning. Basic comes in regular (older SSD) and premium variants (faster NVMe disks, Intel or AMD CPUs).
  • General Purpose Droplets give dedicated vCPUs and a balanced amount of memory. They suit production web apps and databases that need steady performance.
  • CPU-Optimized Droplets have more CPU per GiB of memory: CI runners, video encoding, game servers, batch jobs.
  • Memory-Optimized Droplets have more RAM per vCPU: in-memory caches, analytics, large databases.
  • Storage-Optimized Droplets add large local NVMe disks for heavy I/O.

Shared versus dedicated is the key difference. With a shared CPU a noisy neighbor can occasionally slow you down; with dedicated CPUs you get what you paid for all the time.

Reading a size slug

Every size has a slug that you pass to the API and doctl:

Slug Reading it
s-1vcpu-1gb shared, 1 vCPU, 1 GiB RAM (Basic)
s-2vcpu-4gb shared, 2 vCPUs, 4 GiB
s-1vcpu-1gb-amd Basic premium AMD
g-2vcpu-8gb general purpose, dedicated, 2 vCPUs, 8 GiB
c-4 cPU-optimized, 4 dedicated vCPUs
m-2vcpu-16gb memory-optimized, 2 vCPUs, 16 GiB

Names evolve and new generations appear, so do not memorize them. List the current catalog and filter it:

Terminal
doctl compute size list --format Slug,Memory,VCPUs,Disk,PriceMonthly,PriceHourly,Regions

What a plan includes

Each plan bundles four resources: vCPUs, memory, a boot disk (SSD or NVMe) and a monthly transfer allowance. Outbound traffic beyond the pooled allowance is charged per GiB; inbound traffic is free. Allowances from all your Droplets in a team are pooled, so one quiet server can cover another busy one.

If you later need more disk or memory you can resize a Droplet. You can resize only the CPU and RAM (reversible) or also the disk (permanent, because disks cannot shrink). A resize requires power-off for a short time, so schedule it.

How billing works

  • Droplets are billed for the time they exist, with a monthly cap: once the hourly charges reach the plan's monthly price you pay no more that month.
  • Powering off does not stop billing; only destroying the Droplet does.
  • Options such as backups are extra (a percentage of the Droplet price).

A short-lived test Droplet that runs for three hours costs a few cents, which makes experiments cheap, as long as you remember to delete them.

Python Stand-in: hourly cost with a monthly cap

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Right-sizing: a practical method

  1. Start small and measure. Enable the monitoring agent so you can see CPU, memory and disk graphs.
  2. Look at memory first: if the Droplet uses swap or the kernel kills processes (out of memory in dmesg), you need more RAM.
  3. Then check CPU: sustained usage above roughly 70-80 percent means you are near the limit.
  4. Check disk and bandwidth trends over a week.
  5. If one small server is not enough, consider two small servers behind a load balancer (see Load balancers) rather than one huge one. It also gives you redundancy.

Common memory rules of thumb: a small PHP or Node app runs in 1 GiB; a WordPress site with caching in 2 GiB; a PostgreSQL server for modest data in 4 GiB or more. Always confirm with measurements, not guesses.

Python Stand-in: suggest a size from measured usage

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Bandwidth, IPv6 and extras

  • Every Droplet gets a public IPv4 address; IPv6 is a free checkbox.
  • Traffic inside a VPC is free; public traffic counts toward the allowance.
  • Backups and monitoring can be turned on per Droplet. Backups cost extra; monitoring is free.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main difference between Basic and General Purpose Droplets?

    Shared CPU can be affected by neighbors; dedicated vCPUs give consistent performance.
  2. 2. What does the size slug 'm-2vcpu-16gb' tell you?

    The prefix m means memory-optimized, followed by vCPUs and RAM.
  3. 3. You power off a Droplet to save money. What happens to billing?

    Only destroying the Droplet stops charges. Take a snapshot first if you may need it later.
  4. 4. Which resource should you check first when an app crashes under load with 'out of memory' errors?

    Out-of-memory kills point at RAM; add memory or reduce usage.

Summary

  • Plan families trade price against CPU type, memory and disk: Basic (shared), General Purpose, CPU-Optimized, Memory-Optimized, Storage-Optimized.
  • Size slugs encode family, vCPUs and memory; list current ones with doctl compute size list.
  • Billing is hourly up to a monthly cap, and only destroying a Droplet stops it.
  • Start small, measure memory, then CPU, and scale up or out based on data.

Next: SSH Keys and Secure Access