A Next.js build on a 1GB VPS passed all 13 times we ran it on 2026-12-01, with and without swap. On a Vultr vc2-1c-1gb (955 MiB in free -m) with Node 22.23.5, Next 16.4.6's default Turbopack build peaked at 767 to 789 MB of summed node RSS without swap and 767 MB with 2 GB of swap. Nothing was killed.
The test app is the [email protected] default plus 200 generated static pages of 20,000 characters each, with a 1,000-page copy for scale. Passing is not the same as comfortable. Turbopack pushed free "used" to 892 to 909 MB of the 955 total, leaving 46 to 63 MB. next build --webpack on the same source peaked at 506 to 521 MB RSS and left 285 to 315 MB at 200 pages.

Does next build run out of memory on a 1GB VPS? Results from 13 runs
No run ran out of memory. Every build exited 0, printed its route table, and left no out of memory, oom-kill or killed process line in dmesg. That held for Next 16.4.6 with Turbopack and with --webpack, for Next 15.5.29 with webpack, at 200 and 1,000 pages, with swap off and with a 2 GB swapfile.
Every peak below covers one window: from that run's own start line to the build process exit. The sampler only ran inside that window.
| # | Next | Bundler | Swap | Pages | Peak node RSS sum (MB) | Peak free used (MB) | Peak swap used (MB) | Wall (s) | Outcome | Stage at peak RSS (inferred) |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 16.4.6 | Turbopack (default) | none | 204 | 789 | 892 | 0 | 33 | passed, no OOM line | generating static pages |
| 1b | 16.4.6 | Turbopack | none | 204 | 767 | 903 | 0 | 32 | passed, no OOM line | generating static pages |
| 2 | 16.4.6 | Turbopack | 2 GB | 204 | 767 | 850 | 92 (75 at the peak-RSS sample) | 32 | passed, no OOM line | generating static pages |
| 3 | 16.4.6 | --webpack | none | 204 | 506 | 670 | 0 | 61 | passed, no OOM line | webpack compile |
| 3b | 16.4.6 | --webpack | none | 204 | 521 | 640 | 0 | 62 | passed, no OOM line | static page generation |
| 4 | 16.4.6 | --webpack | 2 GB | 204 | 518 | 649 | 26 | 63 | passed, no OOM line | static page generation |
| 5 | 15.5.29 | webpack (default) | none | 205 | 598 | 728 | 0 | 57 | passed, no OOM line | static page generation |
| 5b | 15.5.29 | webpack | none | 205 | 593 | 812 | 0 | 60 | passed, no OOM line | static page generation |
| 6 | 15.5.29 | webpack | 2 GB | 205 | 584 | 709 | 31 | 58 | passed, no OOM line | static page generation |
| 9 | 16.4.6 | Turbopack, warm cache | 2 GB | 204 | 584 | 689 | 26 | 18 | passed, no OOM line | static page generation |
| 10 | 16.4.6 | Turbopack | none | 1,004 | 811 | 909 | 0 | 49 | passed, no OOM line | static page generation |
| 11 | 16.4.6 | --webpack | none | 1,004 | 704 | 836 | 0 | 83 | passed, no OOM line | static page generation / build traces |
| 12 | 15.5.29 | webpack | none | 1,005 | 618 | 701 | 0 | 71 | passed, no OOM line | static page generation / build traces |
Measured 2026-12-01, 23:17 to 23:34 UTC, one Vultr vc2-1c-1gb in Tokyo. Window for every peak: run start to process exit.
A few labels matter when you read this table. "Peak node RSS sum" is the highest per-second sum of RSS over every process named node, next or turbo. Memory shared between those processes is counted once per process, so the sum overstates real use. "Peak free used" is the highest used column from free -m in the same window (on this free, used = total − available). Swap rows 4, 6 and 9 started with 26 to 27 MB of swap already in use from the previous swap run, so their swap peaks rose by 0, 5 and 0 MB during the build. The stage column is inferred by matching the peak second against the log's stage timings, since the sampler didn't log stages. Rows 7 and 8 of the planned matrix were skipped (see the options section below).
How we ran the builds
We created one box, built the same source with each bundler back to back, and sampled memory once per second. The plan was vc2-1c-1gb in Tokyo (nrt): 1 vCPU, 955 MiB total memory, $0.007/h as printed by our create script. The OS was Ubuntu 24.04.5 LTS. Every run used Node v22.23.5 from NodeSource and npm 10.9.9.
The app came from npx [email protected] app16 --yes --use-npm (TypeScript, Tailwind 4.3.3, ESLint, App Router, React 19.3.0). We changed three things so one source builds under every bundler:
next.config.tsbecame an empty config. The generated one hadcacheComponents: true,partialPrefetching: trueand a Turbopack-only Tailwind rule.@tailwindcss/[email protected]plus apostcss.config.mjs, so Tailwind builds under Turbopack and webpack alike.- A route
app/p/[id]/page.tsxwhosegenerateStaticParamsreturns 200 ids. Each page renders a heading and a deterministic 20,000-character string, no network calls.
The Next 15.5.29 copy used the same source with [email protected] installed on top and eslint: { ignoreDuringBuilds: true }, because 15 still lints during next build and 16 doesn't. The 1,000-page copies changed only the length in generateStaticParams.
Each run went through one harness script:
sync; drop caches; dmesg -C # harness preamble
free -m; swapon --show # idle snapshot
rm -rf .next # every row except 9
# sampler, once per second: summed RSS of node|next|turbo, free used, swap used
timeout 900 npx next build # or: npx next build --webpack
dmesg | grep -i -E "out of memory|oom-kill|killed process"
Before the first no-swap row we ran swapoff -a and deleted the preinstalled /swapfile and its fstab line. After the swap rows we ran swapoff -a again, and swap stayed off for rows 10 to 12 and the repeats 1b, 3b and 5b (each idle snapshot shows 0 swap). For the swap rows we created a new one with fallocate -l 2G /swapfile, chmod 600, mkswap and swapon. Rows 1, 3 and 5 were repeated once (1b, 3b, 5b). Everything else ran once.
Versions and defaults behind these numbers
The two Next lines we tested build with different bundlers by default, which is why this comparison has three columns instead of two. As of 2026-12-02, npm lists [email protected] as latest (published 2026-11-09) and 15.5.29 as the backport tag (published 2026-11-03). Next 16.4.6 requires Node >=20.9.0.
Next's version 16 upgrade guide (last updated 2026-11-18) says Turbopack is stable and used by default for both next dev and next build from 16.0. The opt-out is next build --webpack, listed in the CLI reference. The same guide notes that a custom webpack function in next.config.js makes a default Turbopack build fail. Next 15 builds with webpack by default; per the Turbopack reference, a Turbopack build was beta there from 15.5 and opt-in.
So "default next build" means Turbopack on 16.4.6 and webpack on 15.5.29.
Turbopack vs webpack memory: the default build has the least headroom
Every run fit in RAM, so the useful question is how much room each bundler left. Subtract each run's peak free used from the box's 955 MB total:
| Next / bundler (no swap) | Peak free used, 200 pages | Left of 955 | Peak free used, 1,000 pages | Left of 955 |
|---|---|---|---|---|
| 16.4.6 Turbopack (default) | 892, 903 | 63, 52 | 909 | 46 |
16.4.6 --webpack | 670, 640 | 285, 315 | 836 | 119 |
| 15.5.29 webpack | 728, 812 | 227, 143 | 701 | 254 |
The default Turbopack build is the tightest by a wide margin: 46 to 63 MB of available memory at its peak, against 119 to 315 MB for --webpack on the same Next version. That margin is all the room another process could take during the build before the kernel has nothing left to reclaim and has to swap or kill. On a box with nothing else running, that was enough. On a box that also serves the app, it might not be, and we didn't test that case.
On Ubuntu 24.04's free, used is total minus available, so 955 minus peak used is the available figure at the peak. That already counts the page cache the kernel thinks it can reclaim. It's the kernel's estimate, not a floor with more room hidden underneath.

Turbopack buys that memory back in time. At 200 pages it finished in 32 to 33 s against 61 to 63 s for --webpack and 57 to 60 s for Next 15. At 1,000 pages it was 49 s against 83 s and 71 s.
Why use free used here and not the RSS sums? Because the sums double-count. In run 1's peak second the node processes summed to 789 MB of RSS, while free used in that same second was 892 MB against an idle reading of 253 MB before the run: the system as a whole had grown by 639 MB, not 789. Run 3 showed the same gap (506 MB summed RSS, free used 602 MB in that second, idle 243 MB, so 359 MB of growth). The sums still work for comparing bundlers, not for subtracting from RAM.
Page count moved the bundlers differently. Going from 200 to 1,000 pages raised Turbopack's peak free used by 6 to 17 MB (892 and 903 to 909), webpack on 16.4.6 by 166 to 196 MB (670 and 640 to 836), and Next 15 not at all on this metric (728 and 812 at 200 pages, 701 at 1,000). In this app, Turbopack's peak doesn't come from the page count. We can't tell you what would push a bigger app past 955 MB: a larger dependency graph, more distinct routes or heavier TypeScript could each matter, and none of them is in this test.
One more number for context: node -e "console.log(require('v8').getHeapStatistics().heap_size_limit/1048576)" printed 490 MiB on this box, and no run hit a V8 heap error. Per-process heap wasn't sampled.
What swap changed for this app: almost nothing
With a 2 GB swapfile on, the builds used at most 92 MB of swap and took the same time as without it. Turbopack ran 32 s with swap (row 2) against 33 and 32 s without; --webpack 63 s against 61 and 62 s; Next 15 58 s against 57 and 60 s. The kernel still moved 92 MB out in row 2 even though free used never passed 850 MB in that window.
A detail that may save you a step: the fresh Vultr Ubuntu 24.04 image on this plan already had a 2.3G /swapfile active when we logged in (swapon --show before any change, swap total 2399 in free -m). We had to run swapoff -a to get the no-swap numbers. Run swapon --show on your own box before adding a swapfile. You may already have one.
We didn't produce a build that depended on swap, so this post can't tell you how slow a swap-bound build gets. For what heavy swapping does to a 1 GB box when a process really needs more than RAM, see our swap vs OOM killer test on the same plan. If you do add one, our free swap size calculator gives a starting size for a small plan.
The Turbopack build cache: cold vs warm builds
Since Next 16.3.0, next build keeps a Turbopack filesystem cache in .next/cache/turbopack by default (experimental.turbopackFileSystemCacheForBuild, per the Next.js docs). Later builds start warm. That's why every row above except 9 began with rm -rf .next: those are cold builds, and you should compare your own numbers to them only if you also delete .next first.
Row 9 kept the .next folder from row 2 and rebuilt with Turbopack and swap on:
| Turbopack, 204 pages, 2 GB swap | Compile ("Compiled successfully in") | Wall (s) | Peak node RSS sum (MB) | Peak free used (MB) |
|---|---|---|---|---|
| Row 2, cold | 14.1 s | 32 | 767 | 850 |
| Row 9, warm | 2.5 s | 18 | 584 | 689 |
The warm build was faster and lighter on this app. Both columns come from one run each, so treat the gap as a direction, not a fixed ratio. If your deploy script wipes .next before every build, you give up this cache. The docs suggest setting the option to false only where .next/cache is never preserved.

Memory options in the Next.js docs, and which we ran
We ran none of the documented memory options, because nothing failed. The plan had two extra rows: one with NODE_OPTIONS=--max-old-space-size=768 and one with webpackMemoryOptimizations, both to be run only if a no-swap build was killed. None was, so both are cited below and not tested.
| Option | What the source says | Source | Tested here? |
|---|---|---|---|
experimental.webpackMemoryOptimizations: true | Since v15.0.0, "reduces max memory usage but may increase compilation times by a slight amount". Webpack only | Next.js memory guide, updated 2026-04-28 | Not tested |
NODE_OPTIONS=--max-old-space-size=<MiB> | Sets the max size of V8's old memory section; the docs example uses 1536 on a 2 GiB machine to leave room for other uses | Node.js CLI docs | Not tested |
| Source maps off | productionBrowserSourceMaps: false, experimental.serverSourceMaps: false, enablePrerenderSourceMaps: false if the OOM comes after "Generating static pages" | Next.js memory guide | Not tested |
| Webpack build worker | Runs webpack compilation in a separate worker; on by default since 14.1.0 unless a custom webpack config exists | Next.js memory guide | Not toggled. Our app had no custom webpack config, so the docs' default applied; we didn't verify it |
--experimental-debug-memory-usage | Prints heap and GC stats during the build (since 14.2.0) | Next.js memory guide | Not tested |
Two cited setups for comparison. Better Stack's guide (updated 2025-12-15) uses a 2 GB swapfile and --max-old-space-size=2048 on a 1 GB Ubuntu 24.04 box, without a measured peak. Vercel's KB (updated 2026-10-16) suggests 6144 for its own 8,192 MB build containers. Neither number was sized for a box like ours, and we didn't try either.
Who shouldn't take this as a green light
These results come from one small synthetic app, and they don't make a 1 GB box safe for every Next.js build.
- If the same box serves your production app while it builds, our default-build margin was 46 to 63 MB with nothing else running beyond an idle baseline of 236 to 255 MB
freeused. We didn't runnext startduring any build, so we don't know how a live server and a Turbopack build share that space. Expect it to be tight. - If your build only passes by swapping heavily, these numbers don't describe you. Ours used at most 92 MB of swap and ran no slower with it. A build that leans on swap is the case covered in our swap post, where the cost was stalled logins and long waits.
- If your app is larger than this one (more routes, real data fetching, images, a big dependency tree), the numbers don't carry over. The 5x page test changed Turbopack's peak by only 6 to 17 MB, which tells you pages weren't the driver here. It doesn't tell you what is.
The honest scope: one region, one box, one Node version, runs minutes apart, three rows repeated once and the rest run once. Per-second sampling can miss shorter spikes, and our own SSH polling added a few MB during some runs. Next 15's lint step was disabled and Next 16 doesn't lint during build, so lint memory isn't in these numbers.
What to do before your next build on a 1 GB plan
For an app around this size, a Next.js build on a 1GB VPS works with the defaults. Check three things first:
- Run
swapon --show. On the Vultr image we got, swap was already there. - If the box also serves traffic during builds, try
next build --webpackon 16.x. It peaked at 640 to 670 MBfreeused at 200 pages against Turbopack's 892 to 903 MB at roughly twice the build time. - Keep
.next/cachebetween deploys. The warm Turbopack build took 18 s against 32 s cold.
If your build is already being killed, that's a different and larger app than the one here, and the documented options above are where to start, one at a time, with free -m running in a second terminal. If you're setting up the server itself, our Next.js deploy guide with PM2 and Nginx covers the steps after the build.