# Site resources: PHP threads, memory, and CPU

> What a plan and a tier give a site: PHP threads, the PHP memory pool, database memory, CPU, and how staging differs.

Source: https://docs.wpwaterfall.com/site-resources

Every site runs in its own isolated container on a WP Waterfall server. Your plan and the site's [tier](https://docs.wpwaterfall.com/site-tiers) set how much work the container can do at once. This page explains the numbers you see on a site's **Info** tab.

## PHP threads

A PHP thread handles one uncached request at a time. Pages served from the cache do not use a thread, so most visits never reach PHP. Threads matter for logged-in users, carts and checkouts, the admin area, and pages that are not cached yet.

The threads in this article are an allowance, a cap per site. A site may run up to that many threads at once. It is a limit, not a share of the server held back for the site. Your plan sets the allowance, and a higher [site tier](https://docs.wpwaterfall.com/site-tiers) raises it.

The memory a request may use is 256 MB on every plan, and 512 MB on WP 60 and up. The memory pool of the allowance is the threads times that memory.

On a Single plan, the site's tier sets its allowance:

| Tier on a Single plan | PHP threads (allowance) | Memory per thread | Memory pool of the allowance |
|---|---|---|---|
| Single 20GB | 2 | 256 MB | 512 MB |
| Single 40GB | 4 | 256 MB | 1 GB |
| Single 65GB | 6 | 256 MB | 1.5 GB |
| Single 125GB | 6 | 256 MB | 1.5 GB |
| Single 250GB | 8 | 256 MB | 2 GB |

On a WP plan, each site at Single 20GB has the allowance of its plan, in whichever data center you put it:

| Plan | PHP threads on one site (allowance) | Memory per thread | Memory pool of the allowance |
|---|---|---|---|
| WP 2 | 2 | 256 MB | 512 MB |
| WP 5 | 4 | 256 MB | 1 GB |
| WP 10 | 4 | 256 MB | 1 GB |
| WP 20 | 6 | 256 MB | 1.5 GB |
| WP 40 | 6 | 256 MB | 1.5 GB |

The plans an account rep applies have more sites and a bigger allowance. WP 60 has 8 threads of 512 MB, WP 80 has 10, WP 120 has 12, and WP 150 has 14. See [Site tiers](https://docs.wpwaterfall.com/site-tiers).

These are the defaults for every site. Each site runs in its own container with its own threads, wherever its plan's other sites are. A WordPress Multisite network counts as one site. A PHP memory add-on raises the pool by 512 MB, which is 2 more threads at 256 MB, up to a 4 GB pool. See [PHP performance](https://docs.wpwaterfall.com/php-performance) and [Add-ons](https://docs.wpwaterfall.com/add-ons). Plan cards and the pricing page do not list thread counts.

When all threads are busy, new uncached requests wait in line. If your site often waits, a higher tier or caching more pages helps more than anything else.

## Memory the site may use

A site may use up to its PHP memory pool, plus the database buffer, plus 256 MB for the site itself. A PHP memory add-on raises it. When all the sites on a server together use more than it has, the server slows the busiest ones down first. It never stops a site for that reason.

The limit is a ceiling, not a reservation, and the allowance is a cap, not a booking. Most sites use a small part of it: a quiet site runs in well under 1 GB, and the PHP pool is only what the threads may use if they are all busy at once. WP Waterfall counts what your site really uses, not the ceiling, when it decides how many sites share a server, and it keeps the server well under full so a busy moment has room.

If a burst takes your site past about four fifths of its limit, the server slows the site's memory use down before anything stops. At the limit itself a process can be stopped, and the site starts it again. The server does not swap your site's memory to disk, because a slow disk would slow every site on the server. Memory your site has not used for a while is kept compressed in the server's own memory instead. It never goes to a disk, and it stays your site's alone. The first request after a quiet spell can take a few hundredths of a second longer while that memory is read back.

## Database and other memory

Your site's database gets its own buffer on top of the PHP pool: 384 MB on a Single plan at Single 20GB, Single 40GB, and Single 65GB, 512 MB at Single 125GB, 640 MB at Single 250GB, 768 MB on WP 2, WP 5, and WP 10, 1 GB on WP 20 and WP 40, and 1.5 GB on WP 60 and up. The buffer fills only as the database is read, so a small database uses a small part of it. The container also keeps memory for its PHP code cache, the web server, and SSH.

## CPU

A live site has no fixed CPU limit. It can use every core of its server when they are free. When several sites are busy at once, each gets a share in line with its plan and tier (a heavier share on a bigger one), so a busy neighbor cannot take your share. A site can run up to 1,000 processes at the smallest size, and more on larger plans and tiers.

### Your live site is always served first

When the server is busy, your live site goes ahead of every staging and preview environment, including your own. A live site at the smallest size gets 15 times the CPU share of a staging environment. A bigger plan or tier gets a bigger share still. Disk access follows the same order, so a staging copy that reads or writes a lot cannot starve your live site's disk.

This order only matters while the server is busy. When the server has spare capacity, nothing is held back except the one core limit that staging always has. So a load test on staging or a preview environment slows that environment down first, and your live site keeps its speed.

If a server stays busy for a minute or more, WP Waterfall stops putting new sites on it and starts or uses another server. Sites already there keep running.

## Staging

Staging and preview environments use a single CPU core and 2 PHP threads. That keeps staging cheap; it is not meant for load tests. When the server is busy, staging and preview get a small share of the CPU, so live is always served first.

## Page cache

Pages for visitors who are not logged in are cached on the server. The cache skips logged-in users, carts and checkouts, the admin area, login, and form posts, so those always see fresh content. WP Waterfall clears the cache when you publish or update content.
