AI

Moli Headless Browser on Linux: Tested vs Lightpanda and Chrome

Moli held 25 parallel Puppeteer sessions in 355 MB of PSS where headless Chrome needed 2,369 MB. It still finished the same 50-page crawl eleven times slower than Lightpanda. That is the short version of our run of the Moli headless browser 1.1.28 (still the latest release in December 2026, benchmarked on Ubuntu 26.04) against Lightpanda and Chrome, all three on one VM in one session.

Original content from computingforgeeks.com - post 199746

Lexmount, the team behind lexmount/moli, publishes its own numbers: 15% of the CPU and 13% of the memory that Chrome needs, and a higher useful-page rate than both rivals. We measured memory, CPU, launch time and wall time, ran a 30-site JavaScript render set, and pushed Playwright connectOverCDP and Puppeteer connect through clicks, forms, screenshots and PDFs. The memory claim held up. The CPU claim did not, and Playwright clicks failed in both Moli modes.

Moli vs Lightpanda vs headless Chrome: the measured results

Each cell below is the median of 3 runs over the same 50 pages, with the min and max in brackets: catalogue pages 1 to 40 of books.toscrape.com (20 products each) and the JavaScript-rendered quotes.toscrape.com/js pages 1 to 10 (10 quotes each). Every run loaded all 50 pages without a navigation error. The item count (900 products and quotes in total) is how we caught silent failures, because a page that loads empty still counts as a success to page.goto().

BrowserWorkersWall time (s)Pages/sPeak PSS (MB)Max processes
Moli17.18 (7.13 to 7.24)7.0110 (109 to 111)1
Lightpanda15.29 (5.24 to 5.33)9.5471
Chrome17.20 (7.16 to 7.36)6.9638 (627 to 642)22
Moli105.18 (5.10 to 5.20)9.7228 (227 to 230)1
Lightpanda101.09 (1.08 to 1.11)45.91001
Chrome107.82 (7.76 to 8.34)6.41308 (1304 to 1312)48
Moli2511.86 (11.70 to 11.95)4.2355 (342 to 378)1
Lightpanda251.04 (1.02 to 1.09)48.1190 (177 to 201)1
Chrome2514.86 (14.15 to 15.67)3.42369 (2328 to 2397)107

Moli uses about a sixth of the memory Chrome uses at every concurrency level (17% at 1 worker, 15% at 25) and roughly twice what Lightpanda uses. Throughput is the weak side. Moli peaks near 10 workers at 9.7 pages per second, then slows down at 25 workers, while Lightpanda keeps scaling to 48 pages per second. One of the three Moli runs at 25 workers returned 860 items instead of 900: 40 items went missing with no error reported.

Moli sits between the other two at every concurrency level: roughly twice Lightpanda's memory and about a sixth of headless Chrome's, with all three growing as workers are added.Moli sits between the other two at every concurrency level: roughly twice Lightpanda's memory and about a sixth of headless Chrome's, with all three growing as workers are added.
Peak PSS while crawling 50 pages, by concurrent workers

The chart plots the peak PSS column from the table. Memory grows roughly linearly with workers for all three engines, but Chrome adds around 70 MB per extra worker where Moli adds about 10 MB and Lightpanda about 6 MB.

CPU, launch time and the render set fill in the rest of the picture. CPU seconds count user plus system time over the whole process tree, including Chrome renderers that exited during the run.

Metric (3 runs each)MoliLightpandaChrome
CPU seconds, 50 pages, 1 worker5.05 to 5.202.08 to 2.1112.54 to 12.85
CPU seconds, 50 pages, 10 workers16.60 to 16.962.35 to 2.4324.56 to 25.38
CPU seconds, 50 pages, 25 workers27.49 to 28.543.35 to 5.4245.73 to 53.28
Time to an open CDP port33 to 34 ms33 to 36 ms173 to 178 ms
Idle PSS 2 s after start14 MB11 MB366 to 368 MB
30-site render set, useful pages29, 29, 2930, 30, 3030, 30, 30
30-site render set, peak PSS181 to 183 MB174 to 183 MB788 to 800 MB
30-site render set, median ms per page25282324.52570.5

Moli burns about 40% of the CPU that Chrome burns on a single worker, and 62% to 68% once 10 or 25 workers share the box. That is nowhere near the 15% in the Lexmount README. During a 25-worker run top showed the single Moli process at 145% to 338% CPU across 171 threads. mpstat put the 4 vCPU host at 60.5% user and 22.3% system time. Moli is CPU-bound at that concurrency, which explains why adding workers past 10 made it slower. The one render-set page Moli missed every time was nextjs.org, covered in the errors section.

How the benchmark was run

All three browsers ran on the same VM type, and in fact on the same VM, in a single session on 2026-11-30. Runs alternated browser by browser so that network conditions hit each of them equally. The test box and the method:

  • Host: a 4 vCPU AMD EPYC 7B12 cloud VM with 7,932 MB of RAM, Ubuntu 26.04.1 LTS, kernel 7.0.0, no GPU.
  • Browsers: Moli 1.1.28 and Lightpanda 1.0.6 from their GitHub releases, Google Chrome 158.0.8127.88 from the Google apt repository, each started by the same launcher script.
  • Clients: Node v22.22.1 with puppeteer-core 25.19.0 for the crawl and render set, playwright-core 1.65.1 for the Playwright checks.
  • Peak PSS: a sampler reads /proc/<pid>/smaps_rollup for the browser and every child every 100 ms. PSS splits shared pages between processes, so the 20 to 107 Chrome processes are not counted several times over.
  • CPU seconds: fields 14 to 17 of /proc/<pid>/stat (utime, stime, cutime, cstime) summed over the tree before and after a run. Our first pass left out the reaped children and undercounted Chrome, so it was discarded.
  • Render set: 30 public pages, including JavaScript-rendered ones (React, Vue, Angular, Svelte and Next.js sites, docs portals, BBC News and the Stripe homepage). A page counts as useful when its visible text holds a marker string and runs to at least 200 characters.

The render set first included Hacker News, Wikipedia and npmjs.com, but in a probe run Chrome itself got almost no page text back from them because they bot-wall cloud IP ranges. They were swapped for pages that answer a datacenter IP, otherwise all three browsers would have failed them equally and the column would measure the firewall instead of the engine.

What Moli is, and what its README says it is not

Moli is a headless browser written in Rust around the V8 engine, and its README states plainly that it is “not a Chromium wrapper”. It assembles libcurl for networking, html5ever for parsing, rusty_v8 for JavaScript, Stylo from the Servo project for CSS, Taffy and Parley for layout and text, and Vello CPU for painting. It speaks the Chrome DevTools Protocol, so Playwright and Puppeteer connect to it the way they connect to Chrome.

Layout is off by default. The README calls the default LayoutPolicy::Mock: element geometry comes back as placeholders, which is why boundingBox() returned a 100 by 20 box for every element we measured in default mode. Starting Moli with --layout switches to on-demand layout, and --resource makes it fetch images, fonts and media that it otherwise skips. Most of the compatibility results below follow from those two switches.

Moli is a young project and moves fast. The GitHub API on 2026-11-30 reported 24,648 stars, 715 forks and 994 open issues and pull requests for a repository created on 2026-08-10, with v1.1.28 published on 2026-11-26. The lexmount organization (display name LexMount, blog at browser.lexmount.com) dates from 2025-09-12 and carries no verified-domain badge. GitHub labels the licence Apache-2.0, while Cargo.toml declares MIT OR Apache-2.0.

For agents, the repo ships Agent Skills as SKILL.md folders and no MCP server. The only MCP-related piece is a WebMCP playground. The three skills in the skills/ directory are:

  • moli-cdp-server: starts moli serve on 127.0.0.1:9222 and attaches Playwright or Puppeteer, adding --layout for geometry, input, screenshots and PDFs, which matches what Step 4 and Step 5 found.
  • moli-webfetch: wraps moli fetch --dump markdown --wait done for one-shot reads, the mode with the fewest failures in our run.
  • moli-websearch: runs keyword and reverse-image searches by fetching public engines such as Brave, DuckDuckGo and Yahoo through Moli.

All three skills tell the agent to install Moli with the unchecked installer one-liner when the binary is missing. Install it yourself first, as in Step 1, so the agent finds it on PATH.

A coding agent can follow those skills to call the CLI, which is the same pattern as running agent-browser with Claude Code and Codex. If you want a browser exposed as MCP tools today, Chrome DevTools MCP on Linux is the tested route.

Step 1: Install Moli from the release tarball

The official one-line installer is 2,521 bytes of shell that pulls releases/latest with curl into ~/.local/bin and does no checksum or signature check. The releases carry no SHA256SUMS file either, so the only digest available is the one GitHub computes for each release asset. We installed from the tarball and checked it against that digest instead.

A minimal Ubuntu 26.04 cloud image is missing one library Moli links against. Install it together with the download tools first, because otherwise the binary refuses to start:

sudo apt-get update
sudo apt-get install -y libfontconfig1 curl jq

Without libfontconfig1, the first run on our image failed before printing a version, and ldd named the missing object:

Moli failing with libfontconfig.so.1 cannot open shared object file on Ubuntu 26.04

Next, resolve the latest release tag from the GitHub API so the commands keep working after the next release, and download the x86_64 Linux tarball. Assets also exist for aarch64 Linux, macOS and Windows.

MOLI_VER=$(curl -fsSL https://api.github.com/repos/lexmount/moli/releases/latest | jq -r .tag_name)
echo "$MOLI_VER"
curl -fLO "https://github.com/lexmount/moli/releases/download/${MOLI_VER}/moli-x86_64-unknown-linux-gnu.tar.gz"

Pull the asset digest from the same release, compare it with the file, then unpack and install the binary system-wide:

EXPECTED=$(curl -fsSL "https://api.github.com/repos/lexmount/moli/releases/tags/${MOLI_VER}" | jq -r ".assets[] | select(.name==\"moli-x86_64-unknown-linux-gnu.tar.gz\") | .digest" | cut -d: -f2)
echo "${EXPECTED}  moli-x86_64-unknown-linux-gnu.tar.gz" | sha256sum -c -
tar -xzf moli-x86_64-unknown-linux-gnu.tar.gz
sudo install -m 0755 moli-${MOLI_VER}-x86_64-unknown-linux-gnu/moli /usr/local/bin/moli
moli --version

Stop if the check prints anything other than OK. On our box the 46.5 MB tarball matched the digest a0d985a1...72c1 and the binary reported version 1.1.28:

Moli tarball sha256sum check OK and moli --version 1.1.28 on Ubuntu 26.04

The digest proves less than a signature would. It shows the file is the one GitHub stored for that release, not that a Lexmount key signed it, so the trust anchor is the lexmount organization account itself. The comparison needs Lightpanda and Chrome as well. The Lightpanda install guide covers that binary; its own benchmark ran Lightpanda 1.0.2 in October 2026 (published 2026-11-14), so those numbers are not comparable with this run. Chrome comes from the Google apt repository:

curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt-get update
sudo apt-get install -y google-chrome-stable nodejs npm

Node and npm from the Ubuntu archive are enough for the client libraries in Step 4 and Step 5.

Step 2: Pull markdown, the semantic tree and screenshots with moli fetch

moli fetch loads one URL, runs its JavaScript and prints the result, which is the mode most agent pipelines need. The JavaScript-only variant of quotes.toscrape.com is a good first test, because without script execution the page is empty:

moli fetch --dump markdown --wait done https://quotes.toscrape.com/js/ | head -n 8
moli fetch --dump semantic_tree_text --wait-selector .quote https://quotes.toscrape.com/js/ | head -n 9

The markdown dump came back with the rendered quotes, and the semantic tree prints an accessibility-style outline with a backendNodeId on each node, which an agent can hand back over CDP to act on that node. A one-shot fetch took 0.35 s of wall time at a 72,532 KB maximum resident set. The same page through lightpanda fetch took 0.34 s at 32,696 KB.

moli fetch dumping markdown and the semantic tree of a JavaScript page

Screenshots and PDFs need layout. Without the flag Moli refuses with --dump screenshot requires --layout or --realtime, so add --layout, plus --resource when the page should include its images:

moli fetch --layout --dump screenshot https://books.toscrape.com/ > books.png
moli fetch --layout --resource --dump screenshot https://books.toscrape.com/ > books-img.png
moli fetch --layout --dump pdf https://books.toscrape.com/ > books.pdf
file books.png books-img.png books.pdf

Both PNGs came out at 1920 x 1080 and the PDF as a 2-page PDF 1.7 document. The difference between the modes is easier to see than to describe, so here are the two Moli captures beside a Chrome capture of the same page:

books.toscrape.com rendered by Moli with --layout, Moli with --layout --resource, and headless Chrome

With --layout alone the text and grid are right but the book covers are missing and icon fonts draw as empty boxes. Adding --resource brings the covers back, and the result is close to what Chrome draws. For agents that only read text, neither flag is needed.

Simple interactions also fit in a single call. --eval runs a script in the page before the dump, so this command clicks the Next link and prints the second page of quotes:

moli fetch --eval 'document.querySelector("li.next > a").click()' --dump markdown https://quotes.toscrape.com/js/ | head -n 6

The first quote it printed was the one that opens page 2 (“This life is what you make it…”), so the click and the navigation both happened inside Moli. Keep the script in single quotes with double quotes inside, so the shell passes the selector to the page untouched.

Step 3: Start moli serve and check the CDP endpoint

moli serve keeps a browser running and exposes the DevTools Protocol on a local port, 9222 by default. It binds to 127.0.0.1 unless told otherwise, which is the right default: CDP gives full control of the browser to anyone who reaches the port. Start it in the background and query the discovery endpoint:

moli serve &
until ss -ltn | grep -q ':9222 '; do sleep 0.1; done
curl -s http://127.0.0.1:9222/json/version
ss -ltnp | grep 9222

The response mimics a Chrome build closely enough for client libraries to accept it: Browser reads Chrome/156.0.8078.74, the V8 version carries a -rusty suffix, and a separate Moli-Version key names the real engine. The default User-Agent claims to be Chrome 156 on Windows 10, so sites see a desktop Chrome rather than a headless Linux client.

moli serve /json/version output reporting Chrome 156 and Moli-Version 1.1.28

Only loopback is bound, as ss confirms. To reach it from another host, use an SSH tunnel rather than binding it to a public interface.

Step 4: Drive Moli from Playwright with connectOverCDP

Playwright connects to any CDP endpoint through chromium.connectOverCDP(), and only playwright-core is needed because the browser is already running. The Playwright docs flag this path as Chromium-only and lower fidelity than the native protocol, so some gaps below are on the client side as well. Install the two client libraries in a working directory:

mkdir -p ~/bench && cd ~/bench
npm init -y
npm i playwright-core puppeteer-core

Our check script runs nine common operations against the endpoint and records each one as ok or FAIL with its first error line. This is the exact pw-compat.mjs we ran:

import { chromium } from 'playwright-core';

// usage: node pw-compat.mjs <endpoint> <tag>
const [ep, tag] = [process.argv[2], process.argv[3] || 'run'];
const browser = await chromium.connectOverCDP(ep);
console.log('connected:', browser.version(), 'contexts:', browser.contexts().length);

const checks = [];
async function check(name, fn) {
  const t0 = performance.now();
  try { checks.push([name, 'ok', JSON.stringify(await fn()), Math.round(performance.now() - t0)]); }
  catch (e) { checks.push([name, 'FAIL', e.message.split('\n')[0].slice(0, 140), Math.round(performance.now() - t0)]); }
}

let context, page;
await check('newContext + newPage', async () => {
  context = await browser.newContext();
  page = await context.newPage();
  return 'ok';
});
if (!page) { context = browser.contexts()[0]; page = context.pages()[0] ?? await context.newPage(); }

await check('goto + title', async () => {
  await page.goto('https://quotes.toscrape.com/js/');
  return await page.title();
});
await check('locator text (JS page)', async () =>
  (await page.locator('.quote .author').first().innerText()));
await check('click Next link', async () => {
  await page.click('li.next > a');
  await page.waitForURL('**/page/2/');
  return page.url();
});
await check('fill + submit login form', async () => {
  await page.goto('https://quotes.toscrape.com/login');
  await page.fill('#username', 'agent');
  await page.fill('#password', 'agent');
  await page.click('input[type=submit]');
  await page.waitForSelector('a[href="/logout"]', { timeout: 10000 });
  return await page.locator('a[href="/logout"]').innerText();
});
await check('boundingBox', async () => {
  await page.goto('https://books.toscrape.com/');
  return await page.locator('h1').boundingBox();
});
await check('setViewportSize', async () => {
  await page.setViewportSize({ width: 1280, height: 800 });
  return await page.evaluate(() => [innerWidth, innerHeight]);
});
await check('screenshot', async () =>
  (await page.screenshot({ path: `/tmp/pw-${tag}.png` })).length + ' bytes');
await check('pdf', async () =>
  (await page.pdf({ path: `/tmp/pw-${tag}.pdf` })).length + ' bytes');

for (const [n, s, d, ms] of checks) console.log(`${s.padEnd(4)} ${n.padEnd(26)} ${String(ms).padStart(5)} ms  ${d}`);
await context?.close().catch(() => {});
await browser.close();

Run it once against the default moli serve, then stop that process, start moli serve --layout and run it again:

node pw-compat.mjs http://127.0.0.1:9222 moli-default
pkill -x moli; moli serve --layout &
until ss -ltn | grep -q ':9222 '; do sleep 0.1; done
node pw-compat.mjs http://127.0.0.1:9222 moli-layout

Default mode passed navigation, locators and text extraction, and failed everything that needs real geometry. The click and the form submit both ran into the 30 s Playwright timeout, while screenshot and PDF failed at once with an explicit message. With --layout, the form submit, screenshot and PDF passed, and the Next-link click still timed out:

Playwright connectOverCDP compatibility results against moli serve default and --layout

Note the default-mode boundingBox row: {"x":0,"y":2808,"width":100,"height":20} is a mock box, not the real size of the page heading. Any script that branches on element geometry gets plausible wrong numbers in that mode rather than an error. Headless Chrome passed all nine checks with the same script.

Step 5: Connect Puppeteer and run the crawl benchmark

In Puppeteer, connect() takes the same endpoint as browserURL. We ran an equivalent set of six checks with puppeteer-core:

Puppeteer connect compatibility results against moli serve default and --layout

Puppeteer fails faster than Playwright and says more. Its click helper gives up with Node is either not clickable or not an Element in both modes, after 27 ms in default mode and 45 ms with --layout, and in default mode the form test fails because Input.dispatchMouseEvent needs layout hit testing. With --layout everything except the click passed, including a 53,644 byte screenshot and a 180,967 byte PDF.

The benchmark launcher starts its own browsers on separate ports, so stop the moli serve left over from Step 3 and Step 4 first:

pkill -x moli

Reading pages is where Moli works, so the crawl benchmark only navigates and counts. Each worker opens its own browser context and pulls the next URL from a shared list of 50 pages, then counts the products or quotes it finds. This is bench.mjs as it ran:

import puppeteer from 'puppeteer-core';
import { readFileSync } from 'node:fs';

const [target, n] = [process.argv[2], Number(process.argv[3] || 1)];
const urls = readFileSync(new URL('./urls.txt', import.meta.url), 'utf8').trim().split('\n');
const opts = target.startsWith('ws') ? { browserWSEndpoint: target } : { browserURL: target };
let next = 0, ok = 0, fail = 0, items = 0;
const errors = {};

async function worker() {
  const browser = await puppeteer.connect(opts);
  const context = await browser.createBrowserContext();
  const page = await context.newPage();
  while (next < urls.length) {
    const url = urls[next++];
    try {
      await page.goto(url, { waitUntil: 'load', timeout: 30000 });
      const found = await page.evaluate(() => document.querySelectorAll('.product_pod, .quote').length);
      items += found;
      ok++;
    } catch (e) {
      fail++;
      errors[e.message.split('\n')[0]] = (errors[e.message.split('\n')[0]] || 0) + 1;
    }
  }
  await page.close();
  await context.close();
  await browser.disconnect();
}

const t0 = performance.now();
await Promise.all(Array.from({ length: n }, worker));
const wall = ((performance.now() - t0) / 1000).toFixed(2);
console.log(JSON.stringify({ workers: n, pages: urls.length, ok, fail, items, wall_s: Number(wall), errors }));

The urls.txt file holds books.toscrape.com catalogue pages 1 to 40, then quotes.toscrape.com/js pages 1 to 10, one URL per line. Two loops write the same list in the same order:

for i in $(seq 1 40); do echo "https://books.toscrape.com/catalogue/page-$i.html"; done > urls.txt
for i in $(seq 1 10); do echo "https://quotes.toscrape.com/js/page/$i/"; done >> urls.txt
wc -l urls.txt

Memory comes from sampler.py, which walks the process tree under one PID every 100 ms, sums Rss and Pss from each smaps_rollup and prints the peaks when it gets SIGTERM. Save it next to bench.mjs:

import os, sys, time, signal, json

root = int(sys.argv[1])
peak = {"rss_mb": 0, "pss_mb": 0, "procs": 0}
stop = False
signal.signal(signal.SIGTERM, lambda *a: globals().__setitem__("stop", True))

def tree(root):
    kids = {}
    for p in os.listdir("/proc"):
        if p.isdigit():
            try:
                ppid = int(open(f"/proc/{p}/stat").read().rsplit(")", 1)[1].split()[1])
                kids.setdefault(ppid, []).append(int(p))
            except OSError:
                pass
    out, todo = [], [root]
    while todo:
        p = todo.pop()
        out.append(p)
        todo.extend(kids.get(p, []))
    return out

while not stop:
    rss = pss = 0
    procs = tree(root)
    for p in procs:
        try:
            for line in open(f"/proc/{p}/smaps_rollup"):
                if line.startswith("Rss:"):
                    rss += int(line.split()[1])
                elif line.startswith("Pss:"):
                    pss += int(line.split()[1])
        except OSError:
            pass
    peak["rss_mb"] = max(peak["rss_mb"], rss // 1024)
    peak["pss_mb"] = max(peak["pss_mb"], pss // 1024)
    peak["procs"] = max(peak["procs"], len(procs))
    time.sleep(0.1)
print(json.dumps(peak))

A launcher script starts the browser on its own port, waits for the port to open, starts the PSS sampler on the browser PID, runs the crawl and prints one JSON line. Moli and Lightpanda each run as a single process; Chrome gets a fresh profile directory per run:

#!/bin/bash
# usage: run.sh moli|moli-layout|lightpanda|chrome|chrome-noimg WORKERS
B=$1; N=$2; cd ~/bench; PROFILE=""
case "$B" in
  moli)
    moli serve $MOLI_EXTRA --host 127.0.0.1 --port 9224 --log-level error >/tmp/moli.log 2>&1 &
    EP=http://127.0.0.1:9224; PORT=9224 ;;
  moli-layout)
    moli serve --layout --host 127.0.0.1 --port 9224 --log-level error >/tmp/moli.log 2>&1 &
    EP=http://127.0.0.1:9224; PORT=9224 ;;
  lightpanda)
    LIGHTPANDA_DISABLE_TELEMETRY=true lightpanda serve --host 127.0.0.1 --port 9222 --cdp-max-connections 32 --log-level err >/tmp/lp.log 2>&1 &
    EP=ws://127.0.0.1:9222; PORT=9222 ;;
  *)
    PROFILE=$(mktemp -d)
    EXTRA=""; [ "$B" = chrome-noimg ] && EXTRA="--blink-settings=imagesEnabled=false"
    google-chrome --headless=new $EXTRA --remote-debugging-port=9223 --user-data-dir="$PROFILE" --no-first-run --no-default-browser-check about:blank >/tmp/chrome.log 2>&1 &
    EP=http://127.0.0.1:9223; PORT=9223 ;;
esac
BPID=$!
until ss -ltn | grep -q ":$PORT "; do sleep 0.1; done
python3 sampler.py $BPID >/tmp/peak.json &
SPID=$!
RES=$(node ${SCRIPT:-bench.mjs} $EP $N)
kill $SPID; wait $SPID 2>/dev/null
kill $BPID; wait $BPID 2>/dev/null
sleep 1; [ -n "$PROFILE" ] && rm -rf "$PROFILE" 2>/dev/null
echo "{\"browser\":\"$B\",\"run\":$RES,\"peak\":$(cat /tmp/peak.json)}"

Save it as run.sh in ~/bench. It expects moli, lightpanda and google-chrome on the PATH, so put the Lightpanda binary in /usr/local/bin as the Lightpanda guide does, with the version set to 1.0.6 (the release this run used) instead of the 1.0.2 that guide pins. Lightpanda gets --cdp-max-connections 32 so that 25 workers stay under its CDP connection cap, the same setting that guide used. Make the script executable, then run the three browsers one after another at the same worker count:

chmod +x run.sh

Each call prints one JSON line with the crawl result and the sampler peaks:

./run.sh moli 10
./run.sh lightpanda 10
./run.sh chrome 10

Here is the first of the three repetitions at 10 workers, with the launch and idle measurements underneath:

Moli vs Lightpanda vs Chrome crawl results at 10 workers with launch time and idle PSS

The Chrome line shows why we report PSS instead of RSS. Summing RSS across its 47 processes gives 5,984 MB, because shared libraries and shared memory are counted once per process. PSS splits those pages and arrives at 1,308 MB. Comparing RSS figures between Chrome and Moli would overstate the gap more than four times.

Step 6: Check our numbers against the Lexmount claims

The Moli README reports several benchmarks that Lexmount ran itself. The comparison below sets each claim beside the closest measurement from our run. Their workloads differ from ours, so the useful question is whether the ratio survives, not whether the absolute figure matches.

Claim in the READMELexmount’s figureOur measurementVerdict
CDP ready timeMoli 34.85 ms vs Chromium 169.37 msMoli 33 to 34 ms vs Chrome 173 to 178 msMatches
Peak memory92 MiB vs Chrome’s 697 MiB (13%) over 557 tasks110 vs 638 MB at 1 worker (17%), 355 vs 2,369 MB at 25 (15%)Close
CPU100.6 ms vs 687 ms per task (15%)5.05 to 5.20 s vs 12.54 to 12.85 s per 50 pages (about 40%), 62% to 68% at 10 and 25 workersNot reproduced
Process model1 process, 24 threads vs 11 processes, 123 threads1 process (171 threads at 25 workers) vs 20 to 107 Chrome processesMatches
Mixed crawl, 192 URLsMoli 103 useful (53.6%), Chrome 101 (52.6%), Lightpanda 85 (44.3%)30-site set: Moli 29, Chrome 30, Lightpanda 30Moli slightly behind
LexBench-Web-Fetch, 430 tasksMoli 89.8%, Chromium 54.4%, Lightpanda 53.0%Not run here; the tasks are public as the LexBench-Web-Fetch dataset and run with WebstoneOpen
Lexbench-Headless-Browser, 1,308 tasksMoli 0.1.1 81.88%, Chrome 99.85%, Lightpanda 53.29%Playwright 8 of 9 checks with --layout, 5 of 9 default; Chrome 9 of 9Consistent with the gap

The launch and memory claims hold within a few points. The CPU gap is the one that matters for capacity planning. Size a crawler host on 15% of the CPU Chrome needs and, by our numbers, it runs out of cores at about a third of the expected load. The workloads explain most of the gap. The Lexbench resource card behind that figure ran 557 local fixture tasks one at a time, each moving about 1.6 KB, and measured the warm engine process tree. Our crawl pulls full catalogue pages from the internet with up to 25 tabs at once, which is a heavier job for a JavaScript engine and for a network stack. The headless-browser suite in the same README puts an older Moli at 81.88% against 99.85% for Chrome, which agrees with what our Playwright checks found.

Lightpanda is where our run and the README disagree most. It rendered all 30 of our pages, against 44.3% in the mixed crawl from Lexmount. Our set is smaller and avoids bot-walled sites, so that gap stays open until the 192-URL list is published.

Errors we hit and how to fix them

Every message below came from the lab run, quoted as the tool printed it. Most of them map back to the layout policy described earlier, so the fix is usually a flag or a different way to trigger the action.

error while loading shared libraries: libfontconfig.so.1

The release binary links against fontconfig, and minimal cloud images do not ship it. sudo apt-get install -y libfontconfig1 fixed it on Ubuntu 26.04, and ldd /usr/local/bin/moli | grep "not found" confirms no other library is missing.

Page.captureScreenshot is not supported: renderer layout is disabled

Both page.screenshot() and page.pdf() fail with this message against a default moli serve, and the message already names the fix: restart the server as moli serve --layout. On the CLI the equivalent message is --dump screenshot requires --layout or --realtime.

Input.dispatchMouseEvent is not supported

The Puppeteer form test types into two fields and then clicks the submit button, and in default mode it stopped at a mouse event: coordinate-based mouse input requires layout hit testing. Any API that sends real mouse input needs coordinates, so start the server with --layout. With it, the same test typed, submitted and reached the logged-in page in 427 ms.

element is outside of the viewport (page.click times out)

Here --layout does not help. The Next link on quotes.toscrape.com sits below the fold, and the Playwright call log shows it scrolling and then concluding that the element is still outside the viewport:

Playwright click failing with element is outside of the viewport on moli serve --layout, dispatchEvent working

scrollIntoViewIfNeeded() moved scrollY to 1010, yet the click and even click({ force: true }) still failed, which suggests the box Moli reports is not refreshed after the scroll. The README says layout results are cached and reused for geometry reads, and that fits what we saw. Firing the click inside the page works in both modes, because it needs no coordinates:

await next.dispatchEvent('click');
await next.evaluate(a => a.click());

The Puppeteer version of the same failure is Node is either not clickable or not an Element, and on the CLI moli fetch --eval with an in-page click() reached page 2 as shown in Step 2. In-page clicks bypass the actionability checks that make Playwright tests trustworthy, so use them for crawling and form automation, not as a test of what a user can click.

“This page couldn’t load” on nextjs.org

Moli missed nextjs.org in all three render-set runs. Sampling the visible text at three points after load shows the page rendering and then replacing itself with its own error screen:

nextjs.org text on Moli dropping from 4294 to 68 characters after hydration

At +0 ms the page held 4,294 characters of real content; by +2,000 ms it was 68 characters of “This page couldn’t load”, and the title read empty. No console error or page error reached the CDP client, so a crawler sees a successful load. moli fetch --dump markdown captured 10,014 bytes of the same page, most likely because it dumps before the client-side crash takes over. For sites built this way, sample the text right after load or use fetch, and treat a sudden drop in text length as a failure.

Pages load empty under heavy concurrency

At 25 workers, one Moli run returned 860 of 900 products and quotes: every goto reported success, yet 40 items never showed up. Raising the per-host connection cap with --http-max-host-connections 32 did not help (11.42 to 11.96 s, and again one run at 860), and with that flag one 10-worker run came back at 890. So the cap is not the cause, and 10 workers is no guarantee either. Count the content you expect on every page, stay around 10 workers per 4 vCPU where throughput peaked, and retry pages that come back short.

Which browser to run for which job

On this hardware the measurements sort the three engines by workload rather than ranking them on a single scale:

  • Moli: one-shot reads for agents through moli fetch, where 33 ms startup, 14 MB idle and the semantic tree matter more than throughput. Run --layout as soon as anything clicks, types or captures, and budget about 40% of the CPU Chrome would use, not 15%.
  • Lightpanda: parallel crawling of static or lightly scripted pages. It moved 48 pages per second at 25 workers on 4 vCPU, using 3.35 to 5.42 CPU seconds per 50 pages.
  • Headless Chrome: anything a test suite asserts on, every Playwright click and screenshot, and sites that break the newer engines, such as nextjs.org on Moli. It costs 366 MB before the first page and about 70 MB per extra worker.

Moli sits between the other two: 29 of 30 render-set pages at a sixth of the Chrome memory bill, but with Playwright gaps that rule it out as a test runner today. When the job is parsing pages in Python rather than driving a browser, Scrapling is the lighter stack. Agents that need a real desktop instead of a headless page are better served by agent-desktop. The same README also scores the Kitesurf browser at 192 of 430 on the web-fetch set. Kitesurf runs as a remote endpoint, which the Lexbench resource card says leaves it with no local process tree to measure, so only its success rate compares.

If you run Moli in production, three numbers from this test are worth graphing: CPU per page against your worker count, the share of pages that return under a few hundred characters, and PSS per worker. The first tells you where the CPU wall sits on your hosts, the second catches the silent empty loads and client-side crashes, and the third shows whether you are still getting the memory saving that justifies the switch.

Keep reading

Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup AI Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup Open Source LLM Comparison Table (2026) AI Open Source LLM Comparison Table (2026) Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) AI Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) AI NAS Explained: Is Local AI on a NAS Worth It? AI AI NAS Explained: Is Local AI on a NAS Worth It? MedGemma 2 vs Gemma 4 vs MedGemma 1.5: Local Benchmark AI MedGemma 2 vs Gemma 4 vs MedGemma 1.5: Local Benchmark Use Vertex AI Gemini in Python: Streaming, Tools, Vision AI Use Vertex AI Gemini in Python: Streaming, Tools, Vision

Leave a Comment

Press ESC to close