Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace2:Gvfs:Experiment: read-cache: trace threading and cache-tree extension #158

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 <jeffhost@microsoft.com>
…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 <jeffhost@microsoft.com>
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
Includes changes from:

* microsoft/git#158
* microsoft/git#159
* microsoft/git#160
* microsoft/git#162

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 7, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
vdye pushed a commit that referenced this pull request Jul 19, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Aug 8, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Aug 8, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Aug 11, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
jeffhostetler added a commit that referenced this pull request Aug 23, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 3, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 3, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 3, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 8, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 14, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Nov 20, 2023
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
vdye pushed a commit that referenced this pull request Feb 27, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Apr 23, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Apr 23, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Apr 24, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Apr 29, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request May 14, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request May 14, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jun 3, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 17, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 17, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 17, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 18, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
mjcheetham pushed a commit that referenced this pull request Jul 23, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
dscho pushed a commit that referenced this pull request Jul 25, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
mjcheetham pushed a commit that referenced this pull request Jul 29, 2024
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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 <dstolee@microsoft.com>
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