{"id":1716,"date":"2026-11-15T02:22:12","date_gmt":"2026-11-15T02:22:12","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=1716"},"modified":"2026-11-15T02:22:12","modified_gmt":"2026-11-15T02:22:12","slug":"cgroup-v2-cpu-pressure-psi-stall-thresholds-vps","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/","title":{"rendered":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Every slow VPS you have ever debugged was slow for one of four reasons: CPU runnable but starved, memory reclaimed under you, I\/O waiting, or something downstream sitting on the network. Load average tells you that <em>something<\/em> is happening. Pressure Stall Information tells you what work was actually prevented from running, and for how long. On a cgroup v2 system it costs one file read and no agents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PSI is the metric that answers the question your users are really asking \u2014 &#8220;how much of my request time was spent waiting rather than working&#8221; \u2014 and it does so without you having to build a model of what normal looks like first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What the files contain<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Three resource types are exposed: <code>cpu<\/code>, <code>memory<\/code>, and <code>io<\/code>. Each lives at <code>\/proc\/pressure\/&lt;resource&gt;<\/code> system-wide, and per-cgroup at <code>\/sys\/fs\/cgroup\/&lt;path&gt;\/&lt;resource&gt;.pressure<\/code>. Confirm PSI is compiled in before relying on it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/proc\/pressure\/cpu\n# some avg10=3.21 avg60=1.88 avg300=1.02 total=18493022\ncat \/proc\/pressure\/io\n# some avg10=0.00 avg60=0.14 avg300=0.05 total=902133\n# full avg10=0.00 avg60=0.09 avg300=0.03 total=611884\nzcat \/proc\/config.gz 2&gt;\/dev\/null | grep PSI<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Two lines per resource, and the difference between them is the whole point of the interface. <strong>some<\/strong> means at least one task was stalled. <strong>full<\/strong> means <em>every<\/em> non-idle task was stalled \u2014 the machine, or the cgroup, was doing no useful work at all. The values <code>avg10<\/code>, <code>avg60<\/code>, <code>avg300<\/code> are percentages of wall time spent in that state, exponentially weighted. <code>total<\/code> is cumulative microseconds since boot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that <code>cpu<\/code> has no <code>full<\/code> line. That is deliberate: if any task is running, the CPU is not fully stalled. CPU pressure is always expressed as <code>some<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Reading<\/th><th>Meaning<\/th><th>Act on it when<\/th><\/tr><\/thead><tbody><tr><td><code>cpu some avg60<\/code><\/td><td>Some task wanted CPU and waited<\/td><td>&gt;20% sustained<\/td><\/tr><tr><td><code>memory full avg60<\/code><\/td><td>All work blocked on reclaim<\/td><td>&gt;2% \u2014 any full stall is serious<\/td><\/tr><tr><td><code>io full avg60<\/code><\/td><td>All work blocked on disk<\/td><td>&gt;5% sustained<\/td><\/tr><tr><td><code>io some<\/code> vs <code>full<\/code> gap<\/td><td>Partial blocking, queue still draining<\/td><td>Gap &gt;10\u00d7 \u2014 queue depth issue<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Reading it without a monitoring stack<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For a one-off triage, a loop is enough. This prints the three pressure files every two seconds with a timestamp, which is all you need to catch a spike while you are logged in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while true; do\n  printf '%s ' \"$(date +%H:%M:%S)\"\n  awk '\/^some\/{printf \"cpu=%s \",$2}' \/proc\/pressure\/cpu\n  awk '\/^full\/{printf \"mem=%s \",$2}' \/proc\/pressure\/memory\n  awk '\/^full\/{printf \"io=%s\\n\",$2}' \/proc\/pressure\/io\n  sleep 2\ndone<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Per-cgroup readings are more actionable on a shared box because they isolate the offender. If your web stack runs under a systemd slice, read its pressure file directly \u2014 no cgroup v1 hierarchy walking, no controller mount guessing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/sys\/fs\/cgroup\/system.slice\/php8.3-fpm.service\/cpu.pressure\ncat \/sys\/fs\/cgroup\/system.slice\/php8.3-fpm.service\/io.pressure\nsystemd-cgtop -m --iterations=5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>systemd-cgtop<\/code> gives you a live table of CPU, memory and I\/O per unit, which is usually faster than constructing the paths by hand.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Correlating with steal and load<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The single most useful correlation on a VPS is PSI CPU pressure against steal time. Both describe waiting for CPU, but they have different owners. Steal is time your vCPU was runnable while the hypervisor ran somebody else \u2014 the delay is outside your control. PSI <code>cpu some<\/code> rises when your own tasks contend with each other. If <code>cpu some<\/code> is high and steal is flat, you are oversubscribed on your own vCPUs and adding a vCPU or fixing the workload will help. If steal is high and <code>cpu some<\/code> is low, your requests are throttled at the host layer and no amount of tuning inside the guest will fix it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vmstat 1 10 | awk 'NR&gt;2{print \"steal=\"$15\" us=\"$13\" sy=\"$14}'\ngrep '^some' \/proc\/pressure\/cpu | awk '{print $2,$3,$4}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The second correlation worth building is load average versus <code>io some<\/code>. A load of 12 with <code>io some avg10<\/code> at 40% is an I\/O queue problem, and the fix is storage or write pattern, not CPU. A load of 12 with <code>memory full<\/code> above zero is reclaim \u2014 the box is thrashing and every process is paying for it. Watching these together removes most of the guesswork from &#8220;the site is slow&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Thresholds that actually mean something<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Percentages are meaningless without duration. A single 30-second <code>full<\/code> stall during a backup is fine; 3% sustained over an hour is a user-visible problem. Set alarms on the <code>avg300<\/code> window for stability, and on <code>avg10<\/code> for urgency. Suggested starting points, adjusted for a 2\u20134 vCPU guest:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># alert definitions, Prometheus-style thresholds\n# cpu_some_avg10  &gt; 25  for 10m   -&gt; resize or find the busy loop\n# mem_full_avg10  &gt; 0.5 for 5m    -&gt; reclaim storm, check swap and cache\n# io_full_avg10   &gt; 8   for 10m   -&gt; storage tier problem\n# steal_pct       &gt; 5   for 15m   -&gt; host contention, open a ticket<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The memory one deserves an explanation. <code>memory full<\/code> above zero means every runnable task was blocked in reclaim at the same instant. Even one percent is an enormous amount of stalled time at scale, because each stall is tens of milliseconds of direct reclaim. Treat any sustained non-zero value as an incident rather than a warning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using PSI to size before users notice<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The value of PSI over a simple load threshold is that it degrades gracefully with capacity. On a 4 vCPU guest, <code>cpu some avg10<\/code> climbing from 8% to 25% over a fortnight is a clean trend line that says &#8220;you are 60% of the way to a resize&#8221; without a single slow page view yet. That is the window where a plan change is cheap and uneventful, before the first p99 spike forces an emergency migration.<\/p>\n\n<p>If you are establishing baselines on a new machine, the <a href=\"https:\/\/virtualserversvps.com\/\">VPS sizing and plan breakdown on virtualserversvps.com<\/a> is worth matching against your measured steady-state PSI numbers \u2014 a plan whose vCPU count keeps <code>cpu some<\/code> under 10% at your normal load has headroom for the next growth step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two honest caveats. PSI measures stalling, not slowness \u2014 a fast SSD with a short queue can show low <code>io full<\/code> while individual requests are slow, so pair it with latency percentiles from the application. And on container guests, the host may expose <code>\/proc\/pressure<\/code> read-only or restrict per-cgroup paths; if the file is missing, check <code>memory.max<\/code> and <code>cpu.max<\/code> at the cgroup root instead and treat them as your ceiling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the three alerts, keep a weekly <code>avg300<\/code> chart, and the conversation about scaling stops being reactive. That is most of the practical benefit \u2014 the rest is tuning by evidence instead of by feel.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>How to read \/proc\/pressure\/cpu some and full, correlate PSI with steal time and load, and set thresholds that catch capacity problems before users see them.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1716","post","type-post","status-publish","format-standard","hentry","category-performance-optimization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice - Virtual Servers VPS Blog<\/title>\n<meta name=\"description\" content=\"How to read \/proc\/pressure\/cpu some and full, correlate PSI with steal time and load, and set thresholds that catch capacity problems before users see them.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice\" \/>\n<meta property=\"og:description\" content=\"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-15T02:22:12+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/\",\"name\":\"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-11-15T02:22:12+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"description\":\"How to read \/proc\/pressure\/cpu some and full, correlate PSI with steal time and load, and set thresholds that catch capacity problems before users see them.\",\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice - Virtual Servers VPS Blog","description":"How to read \/proc\/pressure\/cpu some and full, correlate PSI with steal time and load, and set thresholds that catch capacity problems before users see them.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/","og_locale":"en_US","og_type":"article","og_title":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice","og_description":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice","og_url":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-11-15T02:22:12+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/","url":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/","name":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-11-15T02:22:12+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"description":"How to read \/proc\/pressure\/cpu some and full, correlate PSI with steal time and load, and set thresholds that catch capacity problems before users see them.","breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/cgroup-v2-cpu-pressure-psi-stall-thresholds-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"cgroup v2 CPU Pressure (PSI) on a VPS: Reading Stall Metrics Before Users Notice"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=1716"}],"version-history":[{"count":2,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1716\/revisions"}],"predecessor-version":[{"id":1748,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1716\/revisions\/1748"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}