Closed Bug 774444 Opened 12 years ago Closed 12 years ago

Compare prefetch performance for profiles recorded with warm startup vs cold

Categories

(Mozilla QA :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: taras.mozilla, Assigned: jsmith)

References

Details

(Whiteboard: [Snappy:p1], [testing-request])

We need to test startup with different prefetch (warm vs cold) conditions on netbook-class hard-drived machine.

Set Firefox to open to about:home on every startup(ie make about:home homepage)

Step 0(preparation): 
Open c:\Windows\Prefetch, find FIREFOX*.pf files, delete them.

Step 1: Gather prefetch files.


Step 1a: Gather warm prefetch file
Start firefox, close it, go to prefetch directory, delete the FIREFOX*pf file in there.
Start firefox again. This time wait 30s. Close Firefox.  Move the FIREFOX*pf file to a firefox-warm/ directory for safe-keeping.

Step 1b: Gather cold prefetch file
Ensure no FIREFOX*pf file exists in prefetch directory. Reboot.
Start firefox again. This time wait 30s. Close Firefox.  Move the FIREFOX*pf file to a firefox-cold/ directory for safe-keeping.

Step 2:
For each of the files saved in step 1:
Close Firefox. Copy .pf file back to prefetch dir. Reboot. Wait for startup activity to settle. Start Firefox, after it loads go to about:startup. Copy the blue line from about:startup(https://addons.mozilla.org/en-us/firefox/addon/about-startup/) to your notes.
Reboot + record data 3 times per warm and cold .pf files.
Whiteboard: [Snappy]
Summary: Compared prefetch performance for profiles recorded with warm startup vs cold → Compare prefetch performance for profiles recorded with warm startup vs cold
Product: Core → Mozilla QA
Keywords: qawanted
Whiteboard: [Snappy] → [Snappy], [testing-request]
What's the goal you are trying to figure out? I thought the prefetch elimination feature was being backed out. So what's the story here?
(In reply to Jason Smith [:jsmith] from comment #1)
> What's the goal you are trying to figure out? I thought the prefetch
> elimination feature was being backed out. So what's the story here?

Turned out having prefetch is a win(so nuking it is a bad idea, thus the backout). What's not clear is whether prefetch performance depends on when it is recorded. This is what this bug is for. If prefetch performance depends on warmness of startup, we should not remove the code to remove prefetch files. 
To record prefetch info on cold startup we need to delete prefetch files on shutdown. To delete prefetch files on shutdown we need to not backout prefetch deletion code. This is why this bug is urgent.
jsmith, so if Taras' theory is correct, the difference here is we'd delete instead of disabling (marking as 0 size and read-only). And it would be a 1 time operation. We'd do that on shutdown so that the prefetch file is primed for a cold start.
Assignee: nobody → jsmith
Whiteboard: [Snappy], [testing-request] → [Snappy:p1], [testing-request]
Jason, this is urgent, it's blocking bug 770911. Do you have an ETA?
Blocks: 770911
(In reply to Taras Glek (:taras) from comment #4)
> Jason, this is urgent, it's blocking bug 770911. Do you have an ETA?

I'm planning on looking into this today in the afternoon (around 1pm).
First run done below. Going to the next two runs shortly.

Prefetch Warm - 1st Run

	* Main: 2886
	* startupCrashDetectionBegin: 3682
	* startupCrashDetectionEnd: undefined
	* firstPaint: 5368
	* sessionRestored: 5602
	* createTopLevelWindow: 4088
	* firstLoadURI: 5212

Prefetch Cold - 1st Run

	* Main: 2543
	* startupCrashDetectionBegin: 3260
	* startupCrashDetectionEnd: undefined
	* firstPaint: 4697
	* sessionRestored: 4868
	* createTopLevelWindow: 3463
	* firstLoadURI: 4541
Finished.

Prefetch Warm - 1st Run

	* Main: 2886
	* startupCrashDetectionBegin: 3682
	* startupCrashDetectionEnd: undefined
	* firstPaint: 5368
	* sessionRestored: 5602
	* createTopLevelWindow: 4088
	* firstLoadURI: 5212

Prefetch Cold - 1st Run

	* Main: 2543
	* startupCrashDetectionBegin: 3260
	* startupCrashDetectionEnd: undefined
	* firstPaint: 4697
	* sessionRestored: 4868
	* createTopLevelWindow: 3463
	* firstLoadURI: 4541

Prefetch Warm - 2nd Run

	* Main: 12636
	* startupCrashDetectionBegin: 14758
	* startupCrashDetectionEnd: undefined
	* firstPaint: 16803
	* sessionRestored: 17052
	* createTopLevelWindow: 15101
	* firstLoadURI: 16662

Prefetch Cold - 2nd Run

	* Main: 2184
	* startupCrashDetectionBegin: 2574
	* startupCrashDetectionEnd: undefined
	* firstPaint: 4026
	* sessionRestored: 4197
	* createTopLevelWindow: 2808
	* firstLoadURI: 3854

Prefetch Warm - 3rd Run

	* Main: 2496
	* startupCrashDetectionBegin: 2964
	* startupCrashDetectionEnd: undefined
	* firstPaint: 4334
	* sessionRestored: 4510
	* createTopLevelWindow: 3230
	* firstLoadURI: 4198

Prefetch Cold - 3rd Run

	* Main: 2184
	* startupCrashDetectionBegin: 2543
	* startupCrashDetectionEnd: undefined
	* firstPaint: 3963
	* sessionRestored: 4104
	* createTopLevelWindow: 2792
	* firstLoadURI: 3792
Hmm...so looking at the data above seems to imply that our startup perf is faster on a cold startup than a warm startup based on differences in the prefetch files for warm vs. cold. So bbondy's implementation suggestion sounds like a direction to go with this. Is my understanding of the implications of the data correct?
(In reply to Jason Smith [:jsmith] from comment #8)
> Hmm...so looking at the data above seems to imply that our startup perf is
> faster on a cold startup than a warm startup based on differences in the
> prefetch files for warm vs. cold. So bbondy's implementation suggestion
> sounds like a direction to go with this. Is my understanding of the
> implications of the data correct?

I think you mean startup is faster when we do a cold recording of prefetch. Not sure which suggestion you are referring to.

Thanks for doing the analysis. It's also interesting that we are consistently loading urls ~150ms before painting browser chrome.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.