Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Meta: Don't fsync on startup

ASSIGNED
Unassigned

Status

()

Core
XPCOM
ASSIGNED
7 years ago
3 years ago

People

(Reporter: (dormant account), Unassigned)

Tracking

(Depends on: 4 bugs, Blocks: 2 bugs, {meta, perf})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ts] [Snappy:p2])

Attachments

(5 attachments, 1 obsolete attachment)

(Reporter)

Description

7 years ago
This is to keep track of startup-killing fsyncers
(Reporter)

Updated

7 years ago
Depends on: 611839
(Reporter)

Updated

7 years ago
Blocks: 572459
(Reporter)

Updated

7 years ago
Depends on: 611840
(Reporter)

Updated

7 years ago
Depends on: 611843
(Reporter)

Updated

7 years ago
Depends on: 611874
(Reporter)

Updated

7 years ago
Depends on: 609310
(Reporter)

Comment 1

7 years ago
To clarify, at the moment our first startup consists of ~100 fsyncs. I'd like to get that down to 0.
It's really stupid to fsync on first startup since the files being created can not possibly contain useful user data.
Assignee: nobody → vdjeric
Depends on: 686706
Assignee: vdjeric → nobody
I have traced fsync during first startup on MacOS X. See attachment for details.

A few key informations:
- 89 calls to fsync;
- 64 threads created;
- about 12 threads still active at the end of startup (sorry, I forgot to write down the actual number).
Created attachment 561211 [details]
Notes regarding calls to fsync during startup with an empty profile
Keywords: perf
My tracing session left me thinking that most of the [fsync]s are due to creating empty databases. If so, we could simply ship FF with a set of empty databases and copy the files, which should be much faster.
Traced fsync during second startup on MacOS X. See attachment for details.

A few key informations:
- 2 calls to fsync on critical path to startup;
- 5 calls to fsync backgrounded that may or may not occur during startup;
- about 30 threads created - actual count seems to vary between runs;
- about 19 threads still active at the end of startup - actual count seems to vary between runs.
Created attachment 561422 [details]
Tracing fsync during start-up with a non-empty profile.
Assignee: nobody → dteller
Status: NEW → ASSIGNED
Depends on: 688193
Blocks: 447581
Keywords: meta
Depends on: 689955
Depends on: 691268
Created attachment 565470 [details]
A list of all SQlite requests executed at startup, based on a non-trivial profile

For reference, here's a list of SQLite requests at startup, taken from my active profile, on Mac.
Created attachment 565482 [details]
A list of all SQlite files opened at startup, based on a non-trivial profile on Mac
Created attachment 565505 [details]
A list of all SQlite requests executed at startup, sorted by database, based on a non-trivial profile

Here's a refined list of requests executed at startup. Thanks, mak, for the suggestions.
Attachment #565470 - Attachment is obsolete: true
Created attachment 565507 [details]
The extension used to parse the output

In case anybody needs it, here's the code I used to parse the output of mozStorage:5.
(Reporter)

Updated

6 years ago
Whiteboard: [ts] → [ts] [Snappy]

Updated

6 years ago
Whiteboard: [ts] [Snappy] → [ts] [Snappy:p1]
(Reporter)

Updated

6 years ago
Whiteboard: [ts] [Snappy:p1] → [ts] [Snappy:p2]
Assignee: dteller → nobody
You need to log in before you can comment on or make changes to this bug.