-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Triage and improve remote cache hit rate for desktop usage #12203
Comments
Agreed that measurement is critical, but we know everything downstream of a PEX build will be a cache miss by "design", right?: pants/src/python/pants/backend/python/util_rules/pex.py Lines 679 to 682 in 61193e1
|
This ticket is intended to cover cases where multiple desktop machines are using the same platform: I'll clarify that. |
Another cause for cache-misses we have theorized to cause issues are API keys. Some of our tests run against 3rd party systems and authenticated via an API key. With each developer having a unique key we believe this would effectively nullify any benefits of remote caching. Given the design of the system, the API key is irrelevant and ignoring any security concerns a singular key could be used by all developers. Or |
I did a little bit of thinking about this before we decided to start #13682, so will braindump some of that for now. I believe that a path forward to allow for "adjusting" the fingerprint that is included in a
The hope would be that these types would be composable, such that they didn't add much complexity to constructing a |
I enabled remote caching when upgrading to 2.18, and am seeing similar issues -- but even on the same machine by enabling our You can see here; that even the fingerprints match, but we get a cache miss when running with only base config:
This is a I've not dug more into it yet, but I'll diff the actual process invocations when I have time and see if I can prove that it's the Python interpreter location that matters. For completeness; this is the [GLOBAL]
colors = true
print_stacktrace = true
plugins.add = [
"hdrhistogram",
]
backend_packages.add = [
"pants.backend.python.providers.experimental.pyenv",
]
remote_cache_write = true
[stats]
log = true
[test]
use_coverage = true
[coverage-py]
report = ["json"]
global_report = true
[pytest]
args = ["-vv", "--no-header", "--benchmark-disable"]
[python]
default_resolve = "cpu"
[oci]
rootless = false
uid_map = ["0:0:65536"]
gid_map = ["0:0:65536"]
[pyenv-python-provider]
installation_extra_env_vars = [
"PYTHON_CONFIGURE_OPTS=--with-lto=thin",
"PYTHON_CFLAGS=-march=native -mtune=native",
] |
When a remote cache is configured, desktop usage (even among identical platforms) gets lower cache hit rates than CI usage. This is primarily due to inconsistent PATH/env entries between differently configured boxes.
We should:
add enough information to workunits/metrics to validate that this is the case (i.e. to use a(done in Add cache and runtime metadata to Process workunits #12469)StreamingWorkunitHandler
to compare cache lookups across different desktop machines)Some of the differences identified for a series of runs across multiple users:
--python-path
The text was updated successfully, but these errors were encountered: