Open Bug 911582 Opened 8 years ago Updated 4 years ago

cookies xpcshell tests (test_cookies_async_failure.js and test_cookies_read.js) perform a lot of write I/O


(Core :: Networking: Cookies, defect, P3)





(Reporter: gps, Unassigned)


(Blocks 2 open bugs)


(Whiteboard: [buildfaster:4][necko-backlog])

Awesome intern Mihnea hooked resource monitoring up to xpcshell tests to allow us to get per-test metrics for CPU, I/O, and memory. As you can see, test_cookies_async_failure.js incurs 1.4 GB of write I/O (wchar)! Although - and this is somewhat strange - only ~11 MB are being written to disk (at least while the process is alive). The ~11 MB isn't that bad. But the 1.4 GB of raw write I/O is drastically more than any other xpcshell test (see graph). I suspect the test is doing something silly. (Please note that wchar encompasses all writes. This includes writing to the terminal and pipes) That, or the underlying functionality being tested is grossly inefficienct in some way (and might warrant perf investigation).

test_cookies_read.js also incurs a lot of I/O - ~370 MB wchar.

Now that xpcshell tests are running in parallel, tests are I/O bound on release infrastructure. So any work to decrease I/O in these tests will likely make tests run faster and increase automation capacity. (And yes, we should be running tests on an SSD or ramdisk, but that's another discussion.)
Whiteboard: [buildfaster:4] → [buildfaster:4][necko-backlog]
Blocks: fastci
Junior, was this handled by your patch in bug 1370454?
Flags: needinfo?(juhsu)
(In reply to Shian-Yow Wu [:swu] from comment #1)
> Junior, was this handled by your patch in bug 1370454?

It's more or less handled. We comprise thousands transactions into one.
It could reduce the amount of IO write and number of operations.

However, test_cookies_async_failure.js requires lots of IO by design.
I have no idea how much IO would be written after bug 1370454.

FWIW, test_cookies_read.js should use Services.cookies.runInTransaction, too.
Flags: needinfo?(juhsu)
Bulk change to priority:
Priority: -- → P1
Bulk change to priority:
Priority: P1 → P3
You need to log in before you can comment on or make changes to this bug.