Consider running multiple iterations of nav-bench navigations per browser launch
Categories
(Testing :: Performance, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: acreskey, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxp][operational][vision][todo])
Currently nav-bench does the following:
- launches,
- idles a bit,
- run the ~11 navigation tests
- shut down.
It would be more efficient (and also more amenable to AI driven performance optimization) if we could get more signal from a single run.
So consider running multiple iterations per launch.
e.g.
- launch
- idle a bit (minimal amount)
- for i=1 to n
- run the ~11 navigation tests
- clear network cache, active connections, etc
- shut down
Updated•1 month ago
|
Updated•1 month ago
|
Comment 1•25 days ago
|
||
i have been thinking about this. I don't see why not to do it (i guess data would tell us otherwise)
the multiple browser cycles thing was a legacy picked up from tp6 while prototyping this.
i would suspect and hope that forcing a GC/clear network cache/active connections as mentioned would be a good stand in for a new browser cycle
| Reporter | ||
Comment 2•25 days ago
|
||
It's easy to try ;)
Comment 3•22 days ago
|
||
prelim results...
overall
| platform | score base → new | cov across jobs base → new | median task time |
|---|---|---|---|
| linux | 78.7 → 85.0 (+8%) | 1.2% → 1.3% | 24 → 22 min |
| macos | 154.8 → 167.9 (+8.5%) | 1.7% → 1.2% | 22 → 19 min |
| windows | 92.4 → 106.4 (+15%) | 0.6% → 0.9% | 27 → 24 min |
overall cov holds up but a few subtests get a lot noisier within a job:
| subtest | linux | macos | windows | pattern across iterations |
|---|---|---|---|---|
| google-nav-load | 4% → 12% | 9% → 14% | 8% → 30% | iter 1 matches base, iters 2 to 5 are 25 to 100% faster |
| wikipedia-nav-load | 6% → 14% | 4% → 16% | 8% → 18% | flat for iters 1 to 3, jumps ~30% at iters 4 and 5 |
| duckduckgo-nav-load | 4% → 6% | 2% → 8% | 4% → 12% | flips high/low every iteration |
| facebook-nav-load | 7% → 11% | windows only, iters 2+ faster |
(within job cov of each subtest's 5 samples, averaged over ~10 jobs per side)
everything else (amazon, bbc, reddit, yahoo, google docs, subnavs) stays about as noisy as base, some a bit better
so the score bump is mostly from those pages getting faster after iteration 1. cache + connections + gc doesn't fully stand in for a new browser cycle yet, something carries over between iterations for those sites.
will have to investigate further. gecko profile runs might have a clue
Comment 4•19 days ago
|
||
using profiler-cli:
looked through the gecko profiles from the multi iteration try run (9 nav-bench-p jobs, 3 per platform). two things show up in every job
google: iteration 1 is slow because the first tls handshake after startup seems to wait on the pkcs#11 utility process starting up. that process is on by default in nightly since bug 2079970. in the parent there's a UtilityProcessManager::StartUtility marker for PKCS11_MODULE that lines up with the first google doc request, and it's not there in iteration 2+
| platform | google doc request, iter 1 | pkcs#11 process start | google doc request, iter 2+ |
|---|---|---|---|
| linux | ~400 ms | ~390 ms | ~20 to 50 ms |
| macos | ~72 ms | ~27 ms | ~24 ms |
| windows | ~44 ms | ~29 ms | ~30 ms |
so in base, every google sample includes this since each one is a fresh launch. on linux it's almost all of the tls time. i think that explains a lot of why google looks faster (and noisier) with multi iteration. this is just from the timings lining up though, i don't have a stack showing the handshake actually blocked on it
wikipedia: fcp and the doc request don't change, but lcp drops ~55% starting at iteration 4 (linux ~1250 → ~510 ms, mac ~305 → ~135, win ~720 → ~295). probably site state carrying over between iterations since we clear caches but not cookies/localstorage... not sure yet what exactly changes on the page
duckduckgo and yahoo don't show any trend in fcp/lcp/doc timings
| Reporter | ||
Comment 5•18 days ago
|
||
(In reply to Kash Shampur [:kshampur] ⌚EST from comment #4)
using profiler-cli:
...
google: iteration 1 is slow because the first tls handshake after startup seems to wait on the pkcs#11 utility process starting up. that process is on by default in nightly since bug 2079970. in the parent there's a UtilityProcessManager::StartUtility marker for PKCS11_MODULE that lines up with the first google doc request, and it's not there in iteration 2+
Ah, good find.
Since most users don't have third party modules installed, waiting for that process doesn't seem ideal. But we will have to ask the security folks, I don't have a good understanding of this.
Description
•