Closed Bug 1610560 Opened 2 months ago Closed 1 month ago

Collect Telemetry on whether the host system has SuperFetch / Prefetch disabled

Categories

(Core :: Widget: Win32, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

See https://en.wikipedia.org/wiki/Windows_Vista_I/O_technologies#SuperFetch

There are various articles on the web that advise users (likely to their detriment) to disable SuperFetch / Prefetch to (ironically) speed up their machines.

We have some data that suggests that disabling these OS services can have a serious impact on Firefox's start-up time. We'd like to know if there are users in this bucket, and how big that set is.

Data collections are usually implemented by the components doing the collection. A bit of a wild guess, but maybe widget:win32 is close enough to correct?

Component: Telemetry → Widget: Win32
Product: Toolkit → Core
Assignee: nobody → mconley

Hey mhowell, I'm trying to figure out in this patch if Superfetch or Prefetch are enabled with the default params, and if so, stash that state in Telemetry.

Superfetch is a service that was introduced in Windows Vista, and had the name "Superfetch" in the service list. Since Windows 10 1809, this service has been called "SysMain".

I think what I want to do here is switch on the release ID of Windows to determine if we should be looking for "Superfetch" or "SysMain" in the service list. What are best practices for getting this value? Can I presume we want to get it out of the registry? If so, since it's a REG_SZ string, are there any guarantees on its length, or should we query the registry for the string length and then allocate a buffer for us to write the registry value into?

Flags: needinfo?(mhowell)

We have some nice helper functions in WindowsVersion.h that you can use to gate on individual Windows 10 releases. If that isn't enough I'd still recommend using the IsWindows10BuildOrLater function there to compare against the build number for each release, rather than the version string; I like build numbers because they're so much easier to retrieve (via the GetVersionEx API), and because they work across all Windows versions, not just 10. For quick reference, the build number of 1809 is 17763.

Flags: needinfo?(mhowell)

(In reply to Molly Howell (she/her) [:mhowell] from comment #4)

We have some nice helper functions in WindowsVersion.h that you can use to gate on individual Windows 10 releases. If that isn't enough I'd still recommend using the IsWindows10BuildOrLater function there to compare against the build number for each release, rather than the version string; I like build numbers because they're so much easier to retrieve (via the GetVersionEx API), and because they work across all Windows versions, not just 10. For quick reference, the build number of 1809 is 17763.

Thanks, Molly! So it turns out that the service was always called SysMain, and it was only the display name that changed after 1809. But TIL that we have WindowsVersion.h, and it's got some great helpers. :)

Attached file Data review form
Attachment #9127685 - Flags: data-review?(chutten)
Comment on attachment 9127685 [details]
Data review form

Data Collections require publicly-accessible documentation. For Environment stuff this usually means environment.rst.
Attachment #9127685 - Flags: data-review?(chutten)
Attachment #9127685 - Flags: data-review?(chutten)
Comment on attachment 9127685 [details]
Data review form

DATA COLLECTION REVIEW RESPONSE:

    Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes. This collection is documented in its [in-tree documentation](https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/data/environment.html).

    Is there a control mechanism that allows the user to turn the data collection on and off?

Yes. This collection is Telemetry so can be controlled through Firefox's Preferences.

    If the request is for permanent data collection, is there someone who will monitor the data over time?

Yes, Mike Conley is responsible.

    Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1, Technical.

    Is the data collection request for default-on or default-off?

Default on for all channels.

    Does the instrumentation include the addition of any new identifiers?

No.

    Is the data collection covered by the existing Firefox privacy notice?

Yes.

    Does there need to be a check-in in the future to determine whether to renew the data?

No. This collection is permanent.

---
Result: datareview+
Attachment #9127685 - Flags: data-review?(chutten) → data-review+
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b67559855569
Collect Telemetry on whether or not Superfetch and Prefetch are enabled and set to default settings. r=dthayer,chutten,data-review=chutten
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.