completefrontend
Open lab My progress
THE WEB PERFORMANCE FIELD GUIDE

Testing on low-end devices

See your site the way most people do: pick a test phone, debug it from DevTools over USB, and catch the heat and memory limits that CPU throttling misses.

By the end, you can
  • 01
    Choose a test phonePick a phone that stands for your slower visitors, and say what a laptop with its CPU slowed copies, and what it leaves out.
  • 02
    Debug a page on a real Android phoneTurn on USB debugging, open the phone's tabs from chrome://inspect, profile them, and reach your laptop's server with port forwarding.
  • 03
    Catch heat and memory problemsTest so a hot phone doesn't fool you, copy a small phone's memory with Chrome's low-end mode, and know when to borrow phones from a device cloud.

Ravi's laptop and Asha's phone

Welcome to Stage 12, Devices, networks, and people. Until now, the course measured Ravi's shop on one kind of machine. Most of his visitors don't have that machine. Lesson 1.3 showed the gap. Most phones in use are Androids more than two years old. Core for core, a low-end Android's chip is about 9 times slower than a recent iPhone's. This stage is about those phones, their networks, and the people who use them.

It starts with one question. How do you see your site the way those visitors see it?

Ravi tests on a fast laptop. Asha has a low-cost Android phone. Ravi opens his Mint tea reviews page from lesson 36.1, the version he first wrote. It has 1,000 reviews and a box that filters them. On his laptop, the page is there at once. When he types, the letters appear straight away.

Asha says the page is slow on her phone. Ravi can't see her phone. So he does what most developers do first. In DevTools, he slows his laptop's CPU down with the slowest fixed preset, 20× slowdown. Here is the same visit at the same four moments, without it and with it:

Real frames of Ravi's reviews page at 300 ms, 1,000 ms, 2,500 ms, 4,500 ms. With no slowdown, every frame shows the page, which was on screen at 152 ms. With 20× slowdown, the screen is empty at the first three moments, and shows the page only at 4,500 ms: it appeared at 3,772 ms.300 ms1,000 ms2,500 ms4,500 msNo slowdownNo slowdown at 300 ms: the reviews pagethe pageNo slowdown at 1,000 ms: the reviews pagethe pageNo slowdown at 2,500 ms: the reviews pagethe pageNo slowdown at 4,500 ms: the reviews pagethe page20× slowdown20× slowdown at 300 ms: an empty screenempty20× slowdown at 1,000 ms: an empty screenempty20× slowdown at 2,500 ms: an empty screenempty20× slowdown at 4,500 ms: the reviews pagethe page
Real frames from the recording, in ms after the visit started. With no slowdown, the reviews were up at 152 ms. With the CPU 20 times slower, the screen stayed empty until 3,772 ms.

With no slowdown, every frame shows the page. With 20× slowdown, the screen is still empty at 2,500 ms. The page appears at 3,772 ms. Then Asha types an h into the box. Here are both times at each of DevTools' four fixed presets:

The reviews and the h, at four presetsPop out in the code editor (opens in a new tab)JavaScript
// Ravi's reviews page on his laptop, with each of DevTools' CPU presets.// Times in ms after the visit started: the middle of three loads each.const loads = [  { cpu: "No throttling", shown: 152, key: 27.9 },  { cpu: "4× slowdown", shown: 572, key: 99.2 },  { cpu: "6× slowdown", shown: 904, key: 156.6 },  { cpu: "20× slowdown", shown: 3772, key: 576.8 },];for (const load of loads) {  console.log(`${load.cpu}: reviews at ${load.shown} ms, the h took ${load.key} ms`);}
  • Lines 1 and 2 are comments. A millisecond (ms) is a thousandth of a second. Each number is the middle of three loads.
  • shown is when the reviews appeared on screen. It's the page's largest contentful paint, or LCP, from lesson 17.1.
  • key is how long Asha's h took, from the key going down to the next frame. That's its INP, Interaction to Next Paint, from lesson 26.1.
  • Lines 4 to 7 hold the four presets. Line 10 prints one line for each.
  • It prints No throttling: reviews at 152 ms, the h took 27.9 ms and 4× slowdown: reviews at 572 ms, the h took 99.2 ms.
  • Then 6× slowdown: reviews at 904 ms, the h took 156.6 ms and 20× slowdown: reviews at 3772 ms, the h took 576.8 ms.

With 20× slowdown, the page appeared 24.8 times later. The h took 20.7 times as long. So is that what Asha sees? Not quite. A slowed laptop is still a laptop. It copies one thing about Asha's phone and leaves the rest out.

Real-life analogyA sports car with the handbrake on

Ravi wants to know how a small old car climbs the hill to his shop. So he drives his sports car up with the handbrake half on. It does climb slower. But it still has a big fuel tank and a big radiator. Asha's small car runs low on fuel sooner. On a long climb, its engine gets hot, and it has to slow down even more.

In real life: Ravi's sports car
In JavaScript: Ravi's fast laptop
In real life: The handbrake, half on
In JavaScript: DevTools' CPU throttling
In real life: Asha's small old car
In JavaScript: Asha's low-cost Android phone
In real life: A small fuel tank
In JavaScript: Less memory for the page
In real life: An engine that gets hot on a long climb
In JavaScript: A phone chip that slows down when it's hot
The main idea

A laptop with its CPU slowed copies one thing about a cheap phone: a slower main thread. To see your site the way most people do, test on a real low-cost phone too, and watch heat and memory as well as speed. The rest of this lesson shows how. First, what the slider leaves out. Then how to choose a phone, debug it from your laptop, and check its heat and memory.

How the course recorded it

  • Ravi's page: the reviews page from lesson 36.1 as Ravi first wrote it, built with React 19.3.1. It came from the laptop itself, so the network took almost no time.
  • Ravi's laptop: an Apple M1 Pro with 16 GB of memory, running Chrome 157, in a window 412 by 480 pixels.
  • Four presets: no throttling, then 4×, 6× and 20× slowdown. Each was loaded 3 times, taking turns. The lesson quotes the load with the middle LCP.
  • Asha's key: one h, typed into the box through DevTools once the page had loaded.
  • Two more tests: one job run again and again for three minutes, and a page that keeps more and more reviews. That page ran in plain Chrome and in Chrome's low-end mode.

What the CPU slider copies, and what it leaves out

DevTools' CPU menu has four fixed presets: No throttling, 4× slowdown, 6× slowdown and 20× slowdown. It also has two calibrated presets. DevTools works those out for your own machine. Lesson 9.3 calibrated them on this same laptop.

But what does "20× slowdown" do? The chip doesn't get slower. The answer is in Chromium's source, in a file called thread_cpu_throttler.cc. Here is what it does, in plain steps:

How Chrome slows the main thread, shortened from thread_cpu_throttler.ccText
// The helper thread, again and again (lines 152 to 156):send a signal to the page's main threadsleep for 200 µs// The main thread, each time the signal comes (lines 129 to 148):ran = how long it worked since it last went back to work (at most 1,000 µs)spin, doing nothing useful, for ran × rate − rango back to work
  • Lines 1 to 3: a helper thread wakes up every 200 µs and sends the page's main thread a signal. A microsecond (µs) is a thousandth of a millisecond.
  • Lines 4 and 5: when the signal comes, the main thread checks how long it worked since its last pause.
  • Line 6: it spins for that time multiplied by the rate, minus that time. To spin is to keep the CPU busy in a loop, doing nothing useful, until the time is up.
  • Line 7: then it goes back to the page's work.

So at 4×, the main thread works one part of the time and spins for three. At 20×, it works one part and spins for nineteen. It's like a teacher who lets a pupil write for one minute, then makes them sit still for nineteen.

Which thread does this? The one that turned the throttler on. DevTools turns it on from the page's main thread (inspector_emulation_agent.cc, lines 594 to 601). The throttler slows that thread only (line 79 of its file). Chromium allows one throttler in each renderer process (line 82).

The page's main thread over the same stretch of time. With no slowdown, it works the whole time. At 4× slowdown, it works one part and spins for three, five times over. At 20× slowdown, it works one part and spins for nineteen. Below, three cards: the GPU at full speed, the network at full speed, and the memory as before.the page's main thread, over the same stretch of timeNo slowdown4× slowdown20× slowdownworks on the pagespins in placeGPU: full speedNetwork: full speedMemory: as before
At 4× slowdown, Chrome lets the main thread work one part of the time and makes it spin for three. At 20×, it works one part in twenty. The GPU, the network and the memory aren't touched.

What the slowdown did to Ravi's page

At 4×, the reviews came 3.8 times later than with no slowdown. At 6×, they came 5.9 times later. At 20×, 24.8 times later. Asha's h grew the same way: 3.6, 5.6 and 20.7 times as long. That's close to each rate, but not exact, as lesson 9.4 found too.

The load's long tasks grew too. A long task is the main thread busy for more than 50 ms in a row, from lesson 27.1. With no slowdown, the load had 1 long task, of 81 ms. At 20×, it had 3, and the longest lasted 2,642 ms. A tap during it could wait up to that long.

Why it matters: throttling is good at one job. It shows which of your own tasks grow into long tasks on a slow CPU. Use it every day while you build. Pick a preset to see each load:

Playground: one page, four CPU presets
The screen, No throttling
  1. 300 msNo throttling at 300 ms: the reviews page.the page
  2. 1,000 msNo throttling at 1,000 ms: the reviews page.the page
  3. 2,500 msNo throttling at 2,500 ms: the reviews page.the page
  4. 4,500 msNo throttling at 4,500 ms: the reviews page.the page
What the recording measured
  1. Reviews on screen (LCP)152 ms
  2. Asha's h, to the next frame27.9 ms
  3. Long tasks while loading1
  4. The longest of them81 ms
  5. Cores the page saw8
  6. Memory the page saw16 GB
Try it yourself
No throttling: the reviews at 152 ms

This is Ravi's laptop as it is. The page is up in the first frame Chrome drew, and the h shows in the next frame.

From the course's recording in Chrome 157 on Ravi's laptop: the middle of 3 loads at each preset. Each frame is the last one Chrome had drawn by that moment.

You can try the presets on Ravi's page yourself. Open the reviews page in Chrome. Then open DevTools' Performance panel and pick a CPU preset in its settings.

What the slider leaves out

At every preset, the page also read what it could about the device:

What the page saw, even at 20× slowdownJavaScript
// Read in the page on Ravi's laptop with 20× slowdown on.
console.log(navigator.hardwareConcurrency); // 8
console.log(navigator.deviceMemory); // 16
console.log(performance.memory.jsHeapSizeLimit); // 4395630592
  • Line 1 is a comment.
  • Line 2 prints 8: the laptop's 8 logical processors, the threads its CPU can run at once.
  • Line 3 prints 16: about 16 GB of memory. Chrome rounds this number, so it says less about who you are.
  • Line 4 prints 4395630592: the most memory, in bytes, the page's JavaScript may use. That's about 4,192 MB. performance.memory isn't a standard. Only Chromium browsers have it.

The numbers were the same at all four presets. At 20×, the page still saw Ravi's laptop. Lesson 29.1 found the same. So a slowed laptop leaves out:

  • Memory. The page has the laptop's room. A later section shows what changes on a small phone.
  • The GPU and the other threads. Only the main thread is slowed. Chrome's GPU work and the page's other threads run at full speed.
  • Heat. The rate in minute ten is the rate in minute one. A real phone may slow down as it warms up.
  • Storage. Files and the cache are read from the laptop's own disk, at its own speed.
  • The network. CPU throttling doesn't touch it. Network throttling is a separate setting, from lesson 9.3.

Chrome's docs say it plainly. Throttling "is relative to your computer's capabilities". And "DevTools can't truly simulate the CPUs of mobile devices", because phone chips are built differently. In lesson 9.3, DevTools' calibration matched a low-tier phone at 11.7× on this laptop. So on DevTools' own test, 20× here is slower than that phone, and 6× is faster.

Why it matters: a slowed laptop answers "which of my tasks get long?" It can't answer "will this phone run out of memory, get hot, or stutter?" For those, you need the phone.

Choosing a test phone

Which phone should Ravi buy? Not the newest one. He wants a phone like the ones his slower visitors carry.

Real-life analogyTesting recipes in a home kitchen

A cookbook writer tests every recipe in an ordinary home kitchen: a small oven, one tray, a cheap pan. The restaurant kitchen downstairs is faster. But her readers don't cook there. If the cake works at home, it works for nearly everyone.

In real life: The restaurant kitchen downstairs
In JavaScript: Ravi's laptop, or a new flagship phone
In real life: An ordinary home kitchen
In JavaScript: A low-cost Android test phone
In real life: The readers' own kitchens
In JavaScript: Your visitors' phones
In real life: A cake that works at home
In JavaScript: A page that's fast on the test phone

Choose in this order:

  1. Look at your own visitors first. Field data tells you how many visits come from phones, as lesson 10.1 showed. Your own RUM data can split them further (lesson 12.5). It can also record each visit's navigator.deviceMemory, from lesson 29.1.
  2. Aim at the 75th percentile. Alex Russell picks test phones to copy "a 75th percentile user experience". So a quarter of devices are slower still. His test phone is the Samsung Galaxy A24 4G, from lesson 1.3.
  3. Any phone with the same chip will do. That's a MediaTek Helio G99 or a Samsung Exynos 1330. Russell names the Galaxy A16 4G, the Galaxy A07 4G and the Xiaomi Redmi Note 13 Pro 4G.
  4. Keep a slower one too. For "teams that are serious about performance", Russell points to the low-end group: a Galaxy A51 you already own, or a recent phone from Motorola's Moto E range.
  5. Check its memory. Chrome on Android treats phones with 1 GB or less as low-end. It turns on some low-end savings on 4 and 6 GB phones too. So a 4 GB test phone runs Chrome differently from a phone with 8 GB or more.
  6. Write the set-up down. With every result, note the phone's model, its Android version and its Chrome version. Lesson 9.3 did the same with its CPU rates.

Android also has performance classes. Since Android 12, a phone can declare one: a set of abilities above Android's baseline. The requirements are mostly about video, the camera and graphics. So for a web page, look at the chip and the memory first.

Why it matters: a test is only as true as the phone it runs on. A flagship phone hides the problems your slower visitors have.

Remote debugging an Android phone

Ravi has his test phone, and the page is slow on it. But the phone has no DevTools. Remote debugging fixes that. It connects DevTools on your computer to Chrome on the phone, through a USB cable. Lesson 9.3 gave the short version. Here is the whole of it.

Real-life analogyA mechanic's diagnostic cable

A mechanic doesn't guess what's wrong with your car. She plugs a cable into a socket under the dashboard. Then you drive round the block, and her laptop shows the engine's readings. The engine is the car's own, and the road is real. She reads it all on her screen.

In real life: The socket under the dashboard
In JavaScript: USB debugging, turned on in the phone's settings
In real life: The cable
In JavaScript: The USB cable
In real life: The mechanic's laptop
In JavaScript: DevTools on your computer
In real life: Driving round the block
In JavaScript: Using the page on the phone, with its own CPU, memory and heat

Connect the phone

  1. On the phone, open Settings, then About phone. Tap Build number seven times. Android says "You are now a developer!" and adds a Developer options screen. On some phones, Build number is under Software information.
  2. In Developer options, turn on USB debugging.
  3. On your computer, open Chrome and go to chrome://inspect#devices. Make sure Discover USB devices is ticked.
  4. Plug the phone straight into the computer with a USB cable, not through a hub. The first time, the phone shows as Offline. Accept the prompt on the phone's screen.
  5. Open Chrome on the phone. Its tabs appear under the phone's model name. Click Inspect next to one.
Two windows. Left, the phone: Chrome, Ravi's page, and localhost:8080. Right, the laptop: chrome://inspect, DevTools, and the dev server on port 8080. An arrow labelled USB cable goes from Ravi's page on the phone to DevTools on the laptop. A second arrow, labelled port forwarding, goes from localhost:8080 on the phone to the dev server on the laptop.PhoneChromeRavi's pagelocalhost:8080Laptopchrome://inspectDevToolsserver :8080USB cableport forwardingUSB debugging onChrome on the laptop
With USB debugging on, the cable lets DevTools on the laptop read the page running on the phone. Port forwarding sends the phone's localhost:8080 to the laptop's.

A full DevTools window opens on your computer, for the tab on the phone. Its version comes from the phone. Chrome's docs say the phone's Chrome version "determines the version of DevTools" that opens. Everything in it is about the phone:

  • Elements: hover over an element, and the phone highlights it.
  • Performance: a recording shows the phone's own main thread. Leave CPU throttling off. The phone is slow already, as with Lighthouse on a real phone in lesson 9.3.
  • Screencast: it shows the phone's screen inside DevTools, and your clicks become taps. Chrome's docs warn that it lowers the frame rate. Turn it off while you measure scrolling or animations.

Your laptop's server, on the phone

Ravi builds the page on his laptop, at localhost:8080. But on the phone, localhost means the phone itself. Port forwarding fixes that. It opens a port on the phone that leads, through the USB cable, to a port on the laptop. It's like a private phone extension: dial 8080 on the phone, and the laptop answers.

  1. In chrome://inspect#devices, click Port forwarding.
  2. Tick Enable port forwarding. A rule for localhost:8080 is there already.
  3. For another port, type the phone's port on the left, and the laptop's address on the right.
  4. Open Chrome on the phone, and go to localhost with that port.

The traffic travels over the USB cable. So it works whatever network the phone is on.

From a terminal

Android's command-line tool, adb (Android Debug Bridge), can make the same connection:

Find the phone and its tabs with adbShell
adb devices -ladb forward tcp:9222 localabstract:chrome_devtools_remotecurl http://localhost:9222/json
  • Line 1 lists the phones adb can see. Yours should be there.
  • Line 2 forwards port 9222 on the laptop to Chrome's debugging connection on the phone.
  • Line 3 asks for the phone's open tabs, as JSON. Any tool that speaks the DevTools protocol can now drive Chrome on the phone.

The inspect page also lists apps on the phone that show web pages in a WebView. A later lesson in this module covers WebViews. Why it matters: with the cable in, every DevTools panel from this course works on the real phone. You see its own long tasks, its own memory and its own frames.

Thermal throttling: when a phone gets hot

Ravi profiles the reviews page on his test phone. The first run looks fine. Ten minutes later, the same page is slower. He changed nothing. The phone did: it got warm.

Android's docs put it plainly. An app's speed "is limited by the thermal state of the device". That state depends on the weather, recent use and the phone's design. A phone "can only maintain a high level of performance for a limited amount of time". Then it's throttled. Thermal throttling means the phone slows its own chip, so it can cool down.

Real-life analogyA runner on a hot day

A runner sets off fast. After a few hot kilometres, her body makes her slow down, so she doesn't overheat. On a cool morning, she keeps her pace for longer. Straight after a race, she's slow from the first step.

In real life: Setting off fast
In JavaScript: A cool phone, its chip at full speed
In real life: Slowing down in the heat
In JavaScript: Thermal throttling
In real life: A hot day
In JavaScript: Warm weather, and the phone's own design
In real life: Starting again straight after a race
In JavaScript: Testing right after another heavy test

Since Android 10, Android keeps a thermal status, from 0 to 6:

  • None: no throttling.
  • Light and Moderate: some throttling, without much effect on performance.
  • Severe, Critical and Emergency: throttling that changes how the phone performs.
  • Shutdown: the phone switches itself off.

The temperature Android watches most closely is the phone's skin, the surface in your hand. Android apps can read the status, with getCurrentThermalStatus(). So test with heat in mind:

  • Start each set of tests with a phone that has rested.
  • Take turns: A, B, A, B. Then both versions get the same mix of cool and warm runs, as in lesson 9.4.
  • Watch the trend. If each run is slower than the last, the phone is warming up. Let it rest, and start again.
  • Note the room. Warm weather is part of the set-up.

What Ravi's laptop did

Does Ravi's laptop do this too? He runs one job again and again for three minutes, with no slowdown:

The same job, again and againJavaScript
const work = (count) => { let sum = 0; for (let i = 0; i < count; i++) sum += Math.sqrt(i); return sum; };const times = [];const end = performance.now() + 180 * 1000;while (performance.now() < end) {  const start = performance.now();  work(40000000);  times.push(performance.now() - start);  await new Promise((resolve) => setTimeout(resolve, 0));}
  • Line 1 is the stand-in job from lesson 28.1: a loop that does the same steps on any computer.
  • Line 3 sets the end, three minutes from now.
  • Lines 5 to 7 time one job of 40 million steps, and keep its time.
  • Line 8 waits for the next task, so the browser can do other work between jobs.
Twelve bars, one for every 15 seconds of the three-minute run. The first bar, 0 to 15 seconds, is the median job, 39 ms. Every bar after it is about 65 ms.the median job, every 15 seconds39 ms65 ms65 ms0 s90 s180 s
Each bar is the median time of one job in 15 seconds of the run, on Ravi's laptop with no slowdown. The first is 39 ms. After 14.5 seconds, every job took about 65 ms.

For the first 14.5 seconds, each job took about 39 ms. Then, all at once, every job took about 65 ms. It stayed there to the end. macOS's power tool, pmset, showed no heat warning before or after.

Nothing in the page changed. So something under it did: the browser, the system or the chip.

Why it matters: any device can change speed in the middle of a test. A phone adds heat to the reasons. So never judge from one long run. Take turns, and look at every run, not only the first. Run the same job on your own device. On a phone, choose 2 minutes and watch the last bars:

Playground: the same job, again and again
One job, timedJavaScript
const work = (count) => { let sum = 0; for (let i = 0; i < count; i++) sum += Math.sqrt(i); return sum; };
const start = performance.now();
work(10000000);
const took = performance.now() - start;
This devicenot started
  1. No jobs yet.
Try it yourself
Not started

Press a length to start. Each job is the same loop. On a phone, run 2 minutes and watch the last bars.

Measured live in this tab with performance.now(). Each job is 10,000,000 steps of the loop. Each bar is the median job in 5 seconds.

Memory limits on small phones

Lesson 29.1 showed two things about memory on a small phone. Android's low memory killer closes background apps and tabs when memory runs short. And navigator.deviceMemory tells a page roughly how much memory the device has. Chrome itself changes too, by the phone's memory.

Real-life analogyA wardrobe sized to the room

A big hotel room has a big wardrobe. A small guest-house room has a small one. You pack the same suitcase for both trips. In the hotel, everything fits. In the guest house, the door won't shut.

In real life: The room
In JavaScript: The device's memory
In real life: The wardrobe
In JavaScript: V8's heap limit, set from that memory
In real life: Your suitcase
In JavaScript: The page's JavaScript data
In real life: A door that won't shut
In JavaScript: The tab crashing when the heap is full

What Chrome calls a low-end phone

  • Chrome on Android treats a phone with 1,024 MB of memory or less as low-end (features.cc, lines 75 to 77). Chrome on a computer draws the line at 2,048 MB (line 84).
  • On Android phones with 4 or 6 GB, Chrome turns on some of the same savings. That's partial low-end mode (lines 148 to 153).
  • navigator.deviceMemory says 1 to 8 on Android, and 2 to 32 on a computer (approximated_device_memory.cc).

Memory also sets how much room the page's JavaScript gets. JavaScript keeps its objects in the heap. New objects start in the small young generation, from lesson 29.1. Objects that live on move to the old generation, the big part. Chrome tells V8 how much memory the device has (isolate_holder.cc, lines 192 to 194). V8 sizes the old generation from it:

How V8 sizes the old generationPop out in the code editor (opens in a new tab)JavaScript
// How V8 sizes its old generation, the biggest part of the heap.function oldGenerationMb(memoryMb, android) {  const share = android ? memoryMb / 4 : memoryMb / 2;  return Math.min(Math.max(share, 256), 4096);}console.log(oldGenerationMb(2048, true)); // a 2 GB Android phoneconsole.log(oldGenerationMb(16384, false)); // Ravi's 16 GB laptopconsole.log(oldGenerationMb(512, false)); // low-end mode's 512 MB
  • Line 3 takes a quarter of the memory on Android, and half on a computer (heap.cc, lines 357 to 370).
  • Line 4 keeps the answer between 256 MB and 4,096 MB, V8's smallest and largest (heap.h, lines 325 to 327).
  • Lines 6 to 8 print 512, 4096 and 256.

So a 2 GB Android phone gives the old generation 512 MB. Ravi's laptop gets the most V8 allows.

A small phone's memory, on the laptop

Chromium has a switch for this: --enable-low-end-device-mode. Start Chrome with it on the command line, and Chrome acts as a low-end device. It also treats the machine as having 512 MB of memory (sys_info.cc, lines 38 to 47). It changes how Chrome uses memory, not how fast the CPU runs.

Ravi tries it with a heavy page. His reviews page gets endless scrolling: each scroll loads 1,000 more reviews, and the page keeps every batch. He runs it in plain Chrome, and in Chrome with the switch:

The endless page, in two ChromesPop out in the code editor (opens in a new tab)JavaScript
// The endless reviews page, in two Chromes on Ravi's laptop.const runs = [  { chrome: "Plain Chrome", deviceMemory: 16, limitMb: 4192, heldMb: 403, crashed: false },  { chrome: "Low-end mode", deviceMemory: 2, limitMb: 259, heldMb: 250, crashed: true },];for (const run of runs) {  const end = run.crashed ? "the tab crashed" : "still running";  console.log(`${run.chrome}: ${run.deviceMemory} GB, limit ${run.limitMb} MB, held ${run.heldMb} MB, ${end}`);}
  • Lines 3 and 4 are recorded. Each holds what the page read, its heap limit, and how much it held at the end.
  • Line 7 picks the ending. Line 8 prints one line for each Chrome.
  • It prints Plain Chrome: 16 GB, limit 4192 MB, held 403 MB, still running and Low-end mode: 2 GB, limit 259 MB, held 250 MB, the tab crashed.

Same laptop, same page. In plain Chrome, the page reached 400 MB and stopped there, as planned. In low-end mode, the page read 2 GB, the smallest a computer reports. Its heap limit was 259 MB: V8's smallest old generation, 256 MB, plus a little for new objects. After 2,050 batches, at 250 MB, the tab crashed.

Why it matters: a page that holds a lot of data can work on your laptop and crash on a small phone. Low-end mode shows you the edge on your own machine. On a real 2 GB phone, the old generation gets 512 MB. And once the tab is in the background, the low memory killer can close it sooner.

Playground: how much room the page had
Plain Chrome
  1. navigator.deviceMemory16 GB
  2. Heap limit (jsHeapSizeLimit)4,192 MB
  3. Batches of 1,000 reviews kept3,300
  4. Heap in use at the end403 MB
  5. What happenedstopped at 400 MB, still running
Heap in use, out of its limit: 10%
Try it yourself
Plain Chrome: still running

With the laptop's own memory, V8's limit was far above the 400 MB the page held. It kept running.

Plain Chrome and low-end mode are from the course's recording in Chrome 157 on Ravi's laptop. This browser is read live, when you press it.

Device labs and cloud devices

One test phone is a good start. But your visitors carry many different models. A device lab is a set of test phones a team keeps, ready to use. Each one has to be bought, charged and updated.

A device cloud lets you use real phones kept in someone else's building, from your browser. It's like a tool library: you borrow the drill for an afternoon, instead of buying every drill.

  • BrowserStack Live opens your site on a real phone. For Chrome on Android 7 and later, its DevTools button opens Chrome DevTools for that phone's page. For a site that isn't public yet, it has Local Testing.
  • TestMu AI, formerly LambdaTest, also lets you test websites by hand on real Android phones and iPhones. You pick the brand, the model and the browser.
  • Firebase Test Lab tests apps on "real, production devices running in a Google data center". You upload an Android or iOS app, not a web address. That helps when your site lives inside your own app.
  • WebPageTest loads a page from test machines in many places. Its mobile setting has desktop Chrome copy a phone: the screen, the user agent, and a CPU slowed for the device you pick. Its list of test locations names each one's browsers and devices.

Read the table across. Each row is one way to test:

Ways to test, side by side
SetupWhat it copiesWhat to watch
Your laptop, CPU slowedA slower main thread, in seconds, for free.It leaves out the phone's memory, GPU, heat, storage and network.
Chrome's low-end modeA small phone's memory: deviceMemory and a smaller JavaScript heap.The CPU stays fast. Slow it too, with DevTools.
Your own phone, over USBEverything about that one phone, with DevTools on your laptop.Other models. You buy and look after each one.
BrowserStack LiveMany real phones, without owning them, with DevTools in your browser.A site that isn't public yet needs its Local Testing tool.
Firebase Test LabReal Android phones in a Google data center.It runs tests of an app you upload, not a web address.
WebPageTest, mobile settingPage loads from test machines in many places.It's desktop Chrome copying a phone, with the CPU slowed.

Why it matters: use the cheapest test that answers your question. Slow the CPU while you build. Check on your own phone before you ship. Borrow cloud phones for the models you don't own.

Which test shows it?

Each problem below shows up in one kind of test. Sort it by the cheapest test that shows it:

Which test shows it?
  • A click handler whose work grows into a 400 ms long task on a slow CPU
  • A filter box whose letters lag, because every key draws 1,000 reviews again
  • A page that crashes once its data passes 300 MB
  • A page that reads navigator.deviceMemory and sends a lighter page to small devices
  • A page that gets slower after ten minutes of use on a warm day
  • An animation that stutters because the phone's GPU is slow
Try it yourself
0 of 6 correct

Sort each problem by the cheapest test that shows it.

Choose a category for every card. You can change an answer at any time; Reset clears them all.

Common mix-ups

  • "20× slowdown is a cheap phone." No. The rate is relative to your own computer. On Ravi's laptop, DevTools' calibration matched a low-tier phone at 11.7×.
  • "CPU throttling also gives the page less memory." No. At 20×, the page still read 16 GB and a heap limit of over 4 GB.
  • "Throttling slows the whole browser." No. It stops one thread, the page's main thread, over and over. The GPU, the network and the other threads keep full speed.
  • "Remote debugging needs Android Studio." No. USB debugging on the phone and Chrome on your computer are enough. On Windows, you may also need the phone maker's USB driver.
  • "A phone gives the same time on every run." No. Its speed depends on its thermal state, which changes with the weather and recent use.
  • "Low-end mode makes Chrome slow." No. It changes how Chrome uses memory. Slow the CPU separately, with DevTools.

Practice exercises

Answer first, then use the hints.

Exercise 1 · Warm-upHow much longer?

These are the recorded times of Asha's h. What does it print?

Starter codePop out in the code editor (opens in a new tab)JavaScript
const laptop = { key: 27.9 }; // No throttling
const slowed = { key: 576.8 }; // 20× slowdown
console.log(`The h took ${(slowed.key - laptop.key).toFixed(1)} ms longer.`);

Answer, then press Check. Spacing and letter case don’t matter.

    Exercise 2 · Warm-upA 3 GB phone's old generation

    Asha's cousin has a 3 GB Android phone. What does this print?

    Starter codePop out in the code editor (opens in a new tab)JavaScript
    function oldGenerationMb(memoryMb, android) {
      const share = android ? memoryMb / 4 : memoryMb / 2;
      return Math.min(Math.max(share, 256), 4096);
    }
    console.log(oldGenerationMb(3072, true)); // a 3 GB Android phone

    Answer, then press Check. Spacing and letter case don’t matter.

      Exercise 3 · PracticeWhich phones are low-end?

      This copies Chrome's low-end check on Android. What does the second line print?

      Starter codePop out in the code editor (opens in a new tab)JavaScript
      const LOW_END_MB = 1024; // Chrome on Android
      const isLowEnd = (memoryMb) => memoryMb > 0 && memoryMb <= LOW_END_MB;
      for (const memoryMb of [512, 1024, 3072]) {
        console.log(`${memoryMb} MB: ${isLowEnd(memoryMb) ? "low-end" : "not low-end"}`);
      }

      Answer, then press Check. Spacing and letter case don’t matter.

        Exercise 4 · PracticeRead the 20× trace

        Download Ravi's 20× trace. Load it into DevTools' Performance panel. With nothing selected, the Summary tab shows where the main thread's time went. Which category is the largest?

        Answer, then press Check. Spacing and letter case don’t matter.

          Exercise 5 · ChallengeYour server on the phone

          Ravi's new project runs on his laptop at localhost:3000. In Port forwarding, he types 3000 on the left and localhost:3000 on the right. What address does he open in Chrome on the phone?

          Answer, then press Check. Spacing and letter case don’t matter.

            Exercise 6 · ChallengeHow much slower at the end?

            These are the medians of the first and last 15 seconds of the laptop's three-minute run. What does it print?

            Starter codePop out in the code editor (opens in a new tab)JavaScript
            const first = 39.1; // ms, the median job in the first 15 seconds
            const last = 65.3; // ms, the median job in the last 15 seconds
            console.log(`The last jobs took ${Math.round((last / first - 1) * 100)}% longer.`);

            Answer, then press Check. Spacing and letter case don’t matter.

              Check your understanding

              For each question, ask yourself what each test copies, and what only the real phone has.

              The low-end devices quiz · 7 questionsScore: first tries count
              1. Question 1 of 7What does DevTools' CPU throttling slow down?

                Choose an answer to see the explanation.

              2. Question 2 of 7In low-end mode, Chrome treats Ravi's laptop as a 512 MB device. What does this rounding print for it?

                Read the code, then predictPop out in the code editor (opens in a new tab)JavaScript
                // Chrome on a computer keeps navigator.deviceMemory between 2 and 32.
                const reported = (gb) => Math.min(Math.max(gb, 2), 32);
                console.log(reported(0.5)); // 512 MB is 0.5 GB

                Choose an answer to see the explanation.

              3. Question 3 of 7With DevTools' slowest CPU preset on, what did navigator.deviceMemory say on Ravi's laptop?

                Choose an answer to see the explanation.

              4. Question 4 of 7Why should a test phone rest between two sets of tests?

                Choose an answer to see the explanation.

              5. Question 5 of 7You click Inspect next to a phone's tab in chrome://inspect. Which DevTools opens?

                Choose an answer to see the explanation.

              6. Question 6 of 7What does the first line of the heap example print?

                Read the code, then predictPop out in the code editor (opens in a new tab)JavaScript
                // How V8 sizes its old generation, the biggest part of the heap.
                function oldGenerationMb(memoryMb, android) {
                  const share = android ? memoryMb / 4 : memoryMb / 2;
                  return Math.min(Math.max(share, 256), 4096);
                }
                console.log(oldGenerationMb(2048, true)); // a 2 GB Android phone
                console.log(oldGenerationMb(16384, false)); // Ravi's 16 GB laptop
                console.log(oldGenerationMb(512, false)); // low-end mode's 512 MB

                Choose an answer to see the explanation.

              7. Question 7 of 7Which service runs tests of an app you upload on real phones in a Google data center?

                Choose an answer to see the explanation.

              Key takeaways

              • CPU throttling slows one thread, the page's main thread. It leaves out the phone's memory, GPU, heat, storage and network.
              • The rate is relative to your computer. DevTools can calibrate presets for your own machine.
              • Test on a real phone near the 75th percentile, such as one with a Galaxy A24 4G's chip. Write down its model and versions.
              • With USB debugging and chrome://inspect, every DevTools panel works on the phone. Port forwarding brings your laptop's server to it.
              • Phones slow down when they get hot. Let them rest, take turns, and watch the trend.
              • Chrome sizes the JavaScript heap from the device's memory. Low-end mode shows a small phone's limits on your laptop.
              • Device clouds and labs fill in the models you don't own.

              Remember the one-liner.
              Throttling shows you a slow CPU; only a real phone shows you the whole phone.

              Sources

              The facts on this page come from these docs, posts and source files:

              Coming next: Adaptive loading. Serve a lighter page to slow devices and networks with Save-Data and client hints.

              CompleteFrontend Clear concepts. Working examples.