FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-123516: Improve JIT memory consumption by invalidating cold executors by savannahostrowski · Pull Request #124443 · python/cpython · GitHub

/ cpython Public

GH-123516: Improve JIT memory consumption by invalidating cold executors - #124443

Merged
brandtbucher merged 79 commits into
python:mainfrom
savannahostrowski:jit-inv-mem-100k
Sep 27, 2024
Merged

GH-123516: Improve JIT memory consumption by invalidating cold executors#124443
brandtbucher merged 79 commits into
python:mainfrom
savannahostrowski:jit-inv-mem-100k

Conversation

savannahostrowski commented Sep 24, 2024
edited
Loading

Copy link
Copy Markdown
Member

This PR succeeds #123402 and reworks the approach to use the eval breaker for the invalidation call instead of executor creation or gc (thanks @markshannon!). In experimenting, I tried a couple of different thresholds of 10k, 100k, and 1 million runs. The benchmarks for 100k and 1 million were most promising. Here are some relevant stats for quick reference:

100k
- -2.4% memory
- Roughly the same performance-wise

1 million

After chatting with @brandtbucher, I've opted to open this PR with the 100k threshold. One thing to note is that we are potentially a little too liberal in invalidating executors with this threshold, but with the lack of movement in performance and a more substantial decrease in memory usage, it seemed justified. We can continue to iterate here and consider making this tunable in the future.

brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is a nice change, thanks!

Comment thread Include/internal/pycore_interp.h Outdated
Comment thread Include/internal/pycore_optimizer.h Outdated
Comment thread Python/ceval_gil.c Outdated
Comment thread Python/ceval_gil.c
Comment thread Python/optimizer.c Outdated
Comment thread Python/bytecodes.c Outdated
Comment thread Python/optimizer.c
brandtbucher enabled auto-merge (squash) September 27, 2024 00:06
brandtbucher merged commit 65f1237 into python:main Sep 27, 2024
savannahostrowski deleted the jit-inv-mem-100k branch September 27, 2024 16:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL