Explainer
How much RAM does a headless browser need per session?
There's no universal browsers-per-GB number. I compared published measurements, vendor sizing tiers and cloud rates, then show how to measure yours.

There is no sessions-per-GB number you can borrow, because every published figure counts something different. Size from your own peak at the concurrency you need, on your heaviest page, then leave room for the OS and for spikes.
I read 23 pages on November 24, 2026: docs, a vendor sizing guide, GitHub issues and five blog posts. I put their numbers side by side so you can see why they don’t add up to one answer.
This post has no browser measurements of my own, and every figure belongs to whoever published it. It sits in my agent browsers hub. For the full cost of self-hosting, including operator time and security, see self-host or go managed. Here I only size memory.
Short on time?
Short on time? Here’s my take
- You can self-host and are willing to test
- Size from your own measured peak at your concurrency, on your heaviest page, plus headroom. Start the test at 1, 2, 4 and 8 sessions
- High confidence that this is the only safe method: every source agrees and none gives a universal number.
- You need a number today and can’t test
- Use Browserless’s published tiers as a starting guess, roughly 0.3 to 0.8 GB per concurrent session, and treat it as unverified
- Low confidence. It is a vendor rule of thumb with no method stated.
- Light or bursty work, or you won’t run the test
- Rent a cloud browser by the hour
- Medium confidence. Cloudflare’s $0.09 after the 10 included hours is the lowest per-hour price I read, and Browserbase overage is $0.10 to $0.12. Neither one’s capacity is tested.
- Long-lived workers
- Recycle browsers or contexts on a schedule, starting from Crawlee’s documented defaults
- Medium confidence. The defaults are a starting point, not a measured optimum.
Prices verified . Sponsors cannot buy a verdict or a position.
Is there one number for RAM per session? #
No. The published figures run from about 150 MB to 2 GB, and each counts a different thing, on a different machine, with a different page. Here they are with their methods.
| Source | What it counted | Setup | Figure | What it leaves out |
|---|---|---|---|---|
| datawookie (Jun 2025), measured | Peak memory of the Python driver plus the browser, 5 seconds idle after launch, via memory_profiler |
OS, hardware and versions not stated | Chromium 1,094 MB standard, 706 headless, 690 minimal; Firefox 874 / 826 / 770; WebKit 590 / 588 | Versions, sampling interval, anything per context or at concurrency |
| Hivenet (Nov 2026), measured, cloud vendor | Peak of summed process-tree USS, sampled with a 100 ms pause between inspections, at 1, 2 and 4 workers | Windows 11, Ryzen 7 7840HS, 61.8 GiB; Playwright 1.64.1, Chromium 156.0.8078.4; local fixture pages | 214.3, 268.7 and 352.9 MiB; idle about 134 to 136 MiB | Linux, containers, real sites, OOM kills, more than 4 workers |
| Rendershot (year not shown), operator anecdote | Resident memory after launch, one 8K full-page render, growth over hours | No method stated | About 150 MB after launch; about 2 GB for the 8K render; about 1.5 GB by hour 8, killed by hour 24 | Versions and hardware; the author sells a screenshot API |
| Lightpanda README, vendor of a rival browser | Peak memory over 100 pages against headless Chrome | 933 real pages on an AWS m5.large; the page doesn’t say how that set relates to the 100-page row | 123 MB against 2 GB, “~16x less” | Chrome version and how peak was measured |
| Iron Software (year not shown), uncited | Nothing cited | Not stated | 50-150 MB at startup, 200-400 MB or more | Any source; the author sells IronPDF |
| Browserless tiers, vendor rule of thumb | Container size per concurrency band | No method stated | Light: 5-10 sessions in 2 CPU / 4 GB. Medium: 10-20 in 4 CPU / 8 GB. Heavy: 20-50 in 8+ CPU / 16 GB+ | How the tiers were derived |

Don’t compare rows. datawookie’s 706 MB covers the driver and the browser in 2025 with versions unstated, and Hivenet’s 214 MiB is summed USS in 2026 on tiny fixture pages. Those are different counters, systems and pages, and I show them side by side to make exactly that point.
Browserless’s tiers are the only sizing rule I found. Converted to container memory per concurrent session, they give 0.40 to 0.80 GB (Light), 0.40 to 0.80 GB (Medium) and 0.32 to 0.80 GB (Heavy, a floor because the tier says 16 GB+). That is my arithmetic. It is memory provisioned per session, not memory measured per session, and the page states no method. Browserless.
Hivenet’s curve is the best-documented measurement here, and its author says the small synthetic results shouldn’t be used as VM sizing recommendations. Throughput rose from 2.64 to 9.47 accepted outputs per second across 1 to 4 workers with zero failures, so the extra memory bought speed on those pages. I won’t turn the step from 214.3 to 352.9 MiB into a per-session figure, because Hivenet itself warns against subtracting idle from peak and calling the result a per-tab cost. Hivenet.
Versions move monthly too. Playwright’s release notes list 1.65 with Chromium 158.0.8127.18, the page shows no date, and Hivenet used 1.64.1 with Chromium 156. Playwright release notes. Every figure here is a dated snapshot.
Why does one headless browser use so much? #
Because Chromium is a set of processes and not one. Its design document says each new window or tab opens in a new process, with documents from the same origin sharing one, and that a browser process manages the renderers. It adds that Chromium reassigns new tabs to existing processes when the process count gets too large, and gives no number. Chromium architecture. That is why Hivenet sums the whole process tree and not just the process it launched.
Headless mode adds a second question. Playwright ships regular Chromium for headed runs and a separate headless shell for headless mode, and the new headless mode comes through the chromium channel. Playwright browsers. Since v1.57, its release notes say headed mode uses chrome and headless mode uses chrome-headless-shell. Playwright release notes.
Chrome’s own post says the old headless mode (Chrome 59) is deprecated, the new Headless (Chrome 112) is the real Chrome browser, and the standalone chrome-headless-shell (from Chrome 120) is a lightweight wrapper that is in some ways more performant. It publishes no benchmark. Chrome blog.
So when datawookie shows Chromium at 706 MB headless against 1,094 MB standard, I can’t tell you which headless mode it measured or how far the shell would differ. Neither Playwright nor Chrome publishes a comparison, so I won’t give a percentage.
Should I run many browsers or many contexts? #
Contexts are the cheaper unit, but they aren’t free, and neither is a long-lived browser. Playwright’s docs call contexts “fast and cheap” to create and fully isolated inside one browser, and give no memory figure. Playwright contexts.
The catch is in GitHub issue 6319, open from April 2021 to September 2023. Playwright kept request, response and route objects until a new context was created, and one commenter reported over 1 GB of extra memory within an hour when polling every two seconds, and another a crash at about 1.9 GB after 43 minutes. The fix capped retained handles at 1,000 of each kind, and a maintainer said heap use then saturates at about 50 to 100 MB on average. That is a mitigation and not a removal. GitHub 6319.
One blog post says contexts take “negligible memory (KB, not MB)” and cites no benchmark. After issue 6319 I wouldn’t plan around that. dev.to post.
Growth has two possible owners. A Crawlee maintainer answered a user whose crawler froze after 1,000 to 1,500 sites by saying it was probably a memory leak in their code and advising Node heap snapshots. Crawlee discussion 2308. Issue 6319 shows the library held memory too, so both can be true. Recycle on a schedule and profile.
For recycling, Crawlee’s BrowserPool defaults are 20 open pages per browser, retire a browser after 100 pages and close inactive browsers after 300 seconds. Crawlee BrowserPool. Rendershot’s fixes after its fleet kept eating RAM were one browser per worker, capped concurrency, hourly restarts and a fresh context per render. Rendershot. Those are operator choices and not measured optima.
Crawlee’s scaling guide adds that crawlers start with one parallel request and scale up to a maximum of 200 at a time, and that setting minConcurrency too high might even crash the crawler. Crawlee scaling.
How do I measure my own peak? #
Run your heaviest real page at rising concurrency and sum the whole process tree. This is a procedure assembled from what these sources did and warned against, and none of it is my own data.
- Pick your heaviest page. One page can move the number a lot: Rendershot reports about 2 GB resident for one 8K full-page render, against about 150 MB after launch.
- Measure USS across the process tree. Hivenet sums USS (unique set size) over the browser and its children with psutil and not RSS, because adding RSS across processes can count shared pages more than once.
- Step the concurrency: 1, 2, 4, 8. Hivenet stopped at four workers, so its curve can’t tell you what happens beyond. Look for the point where memory or failures stop scaling.
- Sample often. Hivenet paused 100 ms between inspections, and its largest logged gap was 0.461 seconds. If your spikes are shorter than your interval they can fall between samples, which is my reasoning and not a source’s claim.
- Run long enough to see growth. A commenter on issue 6319 reported a crash after 43 minutes and Rendershot reports growth over hours, so I’d watch for at least an hour. That duration is my choice.
- Don’t subtract idle from peak and call it a per-session cost. Hivenet warns against exactly that.
- Test inside the container with the memory limit you will deploy. Hivenet’s tables are from Windows and say nothing about Docker limits.
- Cap concurrency below the point where scaling stops, and leave room for the OS and spikes. No source I read gives a headroom percentage, so I won’t invent one.

What goes wrong inside a container? #
Two things: shared memory and the container’s memory limit. The docs I read give three different fixes for the first.
Playwright says --ipc=host is recommended with Chromium, and that without it Chromium can run out of memory and crash. It also recommends --init. Playwright Docker. Browserless says to set --shm-size=2g and to avoid --disable-dev-shm-usage, which forces Chrome to write to /tmp instead of /dev/shm. Browserless best practices.
Rendershot points at the default /dev/shm size, which it says is typically 64 MB, as an anecdote from its own fleet. Rendershot. Puppeteer’s troubleshooting page says Docker setups can be tricky and strongly discourages disabling the sandbox. Puppeteer. Three fixes for one symptom, and no page that compares them, so I report each as that source’s advice.
Then the limit. Docker’s --memory is the maximum memory a container can use, and by default, if an out-of-memory error occurs, the kernel kills processes in the container. Docker.
A guard isn’t a limit. Browserless’s MAX_MEMORY_PERCENT only rejects new sessions, so memory from a session already running can still hit the OOM killer, and it suggests conservative thresholds such as 80. It also says to add containers rather than raise CONCURRENT. Browserless. Its private-deployment page says capacity is workers times per-worker concurrency, and that workers reject new sessions above 90% CPU or memory. Browserless performance.
What does a cloud browser hour cost next to my RAM? #
On the pages I read, a cloud hour costs $0.09 to $0.12 above the included hours, and none of those pages says how much RAM a session gets. All prices are USD as published on November 24, 2026, fetched from a server whose location I don’t know.
| Option | Price | What it includes | RAM per session stated? |
|---|---|---|---|
| Cloudflare (Workers Paid) | 10 browser hours a month, then $0.09 per extra hour | 10 concurrent browsers (monthly average of daily peaks), then $2.00 per extra browser; Free is 10 minutes a day and 3 browsers | Not stated |
| Browserbase Developer | $20 a month | 100 hours, then $0.12 per hour; 25 concurrent; 6-hour sessions | Not stated |
| Browserbase Startup | $99 a month | 500 hours, then $0.10 per hour; 100 concurrent; 6-hour sessions | Not stated |
| AWS Lightsail 4 GB (Linux) | $24 a month | 2 vCPU, 80 GB SSD, 4 TB transfer | You size it yourself |
Lightsail’s 2 GB plan is $12 a month and its 8 GB plan $44, both with 2 vCPU. Lightsail.
Here is a VM-only bridge, and it is my arithmetic. $24 a month over 730 hours, assuming the server runs all month, is about $0.033 per server-hour. Split across 5 to 10 browsers (Browserless’s Light tier), that is $0.0033 to $0.0066 per browser-hour, against $0.09 for Cloudflare overage and $0.12 or $0.10 for Browserbase.
I wouldn’t call that a saving. It leaves out operator time, proxies, CPU limits and capacity nobody measured, and the 730 hours and the 5 to 10 sessions are assumptions. My self-host or managed guide works the full cost, and the hourly rates have their own posts: Browserless pricing, Cloudflare Browser Run pricing, Browserbase pricing and a cloud browsers comparison.
Which setup should you pick? #
Match the choice to whether you’ll run the test.
- You’ll test and self-host: size from your own measured peak. It is the method the sources point to, because none of them gives a universal figure.
- You can’t test and need a number today: take Browserless’s tiers as a first guess, and say out loud that it is a vendor rule of thumb. Set a container memory limit so a wrong guess becomes a restart and not a dead host.
- Light or bursty work: rent hours. If you won’t measure, you can read an invoice for a week instead.
- Long-lived workers: recycle browsers or contexts on a timer, and don’t trust any claim that contexts cost nothing.
What could I not verify? #
Mostly the things you’d want most. I found no per-session RAM figure for any cloud browser, no Linux or container measurement with a published method, and no comparison of headless shell against new headless.
The “1 GB per browser” line attributed to Microsoft is uncited and not in the Playwright pages I opened, so I left it out.
What I would do #
I’d take USS readings on my heaviest page at 1, 2, 4 and 8 sessions, find where memory or failures stop scaling, and cap concurrency below that point. I’d set a Docker memory limit and recycle browsers on a timer.
If that sounds like more work than the hourly bill, I’d rent hours and read my invoice for a week.
FAQ
How much RAM does a headless Chromium need?
Published figures run from about 150 MB right after launch (Rendershot) to a 706 MB peak (datawookie) to 2 GB for 100 pages (Lightpanda's comparison). They count different things on different pages, so measure yours.
Are contexts really cheaper than browsers?
Playwright calls contexts fast and cheap to create and gives no figure. GitHub issue 6319 shows contexts held request and response objects until a new context was created, until a 2023 cap, so long-lived contexts can still grow.
Does headless use less memory than headed?
datawookie measured Chromium at 706 MB headless against 1,094 MB standard, but it states no versions and doesn't say which headless mode. Playwright and Chrome publish no comparison.
Why does my container crash with Chromium?
Two causes in the docs I read: shared memory and the memory limit. Playwright recommends --ipc=host, Browserless recommends --shm-size=2g, and Docker's kernel OOM killer ends processes that pass the container's limit.
How many sessions fit on a 4 GB server?
Browserless suggests 5 to 10 concurrent sessions in a 2 CPU, 4 GB container and states no method. Treat that as a first guess and test your heaviest page.
Should I restart browsers periodically?
Crawlee's defaults retire a browser after 100 pages and close idle ones after 300 seconds, and Rendershot restarts hourly. Both are operator choices, not measured optima.
When is a cloud browser cheaper than my own server?
RAM alone can't show it. The VM-only arithmetic is lower per browser-hour on paper, but it leaves out operator time, proxies and untested capacity, which my self-hosting post covers.
Is Lightpanda really 16x lighter?
Its README says 123 MB against 2 GB for 100 pages on an AWS m5.large, about 16 times less. It is a rival browser's own comparison, and the method and Chrome version are not on the page, so I couldn't check it.
Sources
23 sources, accessed .
Official pricing, docs, changelogs and status pages 15
- Playwright docs: isolation and browser contexts
- Playwright docs: Docker
- Playwright docs: browsers
- Playwright release notes
- Chrome for Developers: chrome-headless-shell and the new headless mode
- Chromium: multi-process architecture
- Browserless docs: Docker best practices and sizing tiers
- Browserless docs: private deployment performance
- Crawlee API: BrowserPoolOptions
- Crawlee docs: scaling crawlers
- Docker docs: resource constraints
- Puppeteer docs: troubleshooting
- Browserbase docs: plans and billing
- Cloudflare browser pricing
- AWS Lightsail pricing
GitHub code, issues and releases 3
Other blogs 5
- datawookie: Playwright browser footprint (Jun 6, 2025)
- Hivenet: Playwright memory usage (Nov 12, 2026)
- Rendershot on dev.to: headless Chromium at scale, four fixes for a fleet that kept eating RAM
- Iron Software on dev.to: Playwright memory and performance issues
- dev.to: scaling headless browsers, contexts versus instances
Last updated November 24, 2026. Researched and drafted with AI tools; editorial review by the site owner is pending.



