Skip to content

Conversation

@jeffhostetler
Copy link

This series adds per-thread tracing to the do_read_index() and adds regions around the cache-tree extension. The intent is to show / confirm that index read time is now bounded by the cache-tree
extension (now that we have Ben's multi-threading changes (both the N-1 cache-entry and
the single extension worker threads)).

Add trace2_thread_start() and trace2_thread_exit() events to the worker
threads used to read the index.  This gives per-thread perf data.

These workers were introduced in:
abb4bb8 read-cache: load cache extensions on a worker thread
77ff112 read-cache: load cache entries on worker threads

Signed-off-by: Jeff Hostetler <[email protected]>
…ension

Add regions around code to read and write the cache-tree extension
when the index is read or written.

This is an experiment and may be dropped in future releases if
we don't need it anymore.

This experiment demonstrates that it takes more time to parse and
deserialize the cache-tree extension than it does to read the
cache-entries.

Commits [1] and [2] spreads cache-entry reading across N-1 cores
and dedicates a single core to simultaneously read the index extensions.

Local testing (on my machine) shows that reading the cache-tree extension
takes ~0.28 seconds.  The 11 cache-entry threads take ~0.08 seconds.
The main thread is blocked for 0.15 to 0.20 seconds waiting for the
extension thread to finish.

Let's use this commit to gather some telemetry and confirm this.

My point is that improvements, such as index V5 which makes the
cache entries smaller, may improve performance, but the gains may
be limited because of this extension.  And that we may need to
look inside the cache-tree extension to truly improve do_read_index()
performance.

[1] abb4bb8 read-cache: load cache extensions on a worker thread
[2] 77ff112 read-cache: load cache entries on worker threads

Signed-off-by: Jeff Hostetler <[email protected]>
Copy link
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jeffhostetler jeffhostetler merged commit 87a148b into microsoft:vfs-2.22.0 Jul 10, 2019
derrickstolee added a commit to derrickstolee/VFSForGit that referenced this pull request Jul 24, 2019
derrickstolee added a commit to microsoft/VFSForGit that referenced this pull request Jul 24, 2019
Includes changes from:

* microsoft/git#158 (experimental tracing: trace threading and cache-tree extension)
* microsoft/git#159 (experimental tracing: prime_cache_tree())
* microsoft/git#160 (experimental tracing: checkout and reset perf)
* microsoft/git#162 (support building with GCC v9.x)
derrickstolee pushed a commit that referenced this pull request Jun 1, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Jul 20, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Jul 27, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Jul 28, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 6, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 6, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Oct 6, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 9, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 9, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 16, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee pushed a commit that referenced this pull request Oct 19, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
mjcheetham pushed a commit that referenced this pull request Dec 15, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
mjcheetham pushed a commit that referenced this pull request Dec 15, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Dec 18, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Dec 24, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Dec 28, 2020
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Mar 4, 2021
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Sep 18, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Sep 24, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Oct 8, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
mjcheetham pushed a commit that referenced this pull request Dec 3, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Dec 17, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Dec 18, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jan 1, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jan 1, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jan 1, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Feb 10, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Feb 27, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Mar 5, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
mjcheetham pushed a commit that referenced this pull request Mar 12, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
mjcheetham pushed a commit that referenced this pull request Mar 17, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 6, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 11, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 13, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 16, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 16, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jun 16, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Jul 8, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 5, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 5, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 8, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 8, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 13, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Aug 19, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Oct 17, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Oct 17, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit that referenced this pull request Oct 28, 2025
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants