Skip to content

gh-150114: Reduce memory usage of test_free_threading.test_iteration - #150115

Merged
colesbury merged 1 commit into
python:mainfrom
colesbury:gh-150114-reduce-test-iteration-memory
May 19, 2026
Merged

gh-150114: Reduce memory usage of test_free_threading.test_iteration#150115
colesbury merged 1 commit into
python:mainfrom
colesbury:gh-150114-reduce-test-iteration-memory

Conversation

@colesbury

@colesburycolesbury commented May 19, 2026

Copy link
Copy Markdown
Contributor

Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full test_free_threading suite drops from ~850 MB to ~175 MB.

…ation
Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.
@colesbury
colesbury marked this pull request as ready for review May 19, 2026 20:41
@zooba

Copy link
Copy Markdown
Member

There's a resource for tests with lots of memory available that we could probably use here. Let me find a reference for you...

@colesbury

Copy link
Copy Markdown
ContributorAuthor

It's much more valuable to have the test run for fewer iterations in the GitHub CI than more iterations behind a memory resource guard.

@zooba

Copy link
Copy Markdown
Member

Yeah, you're right. Also the test filter has changed since I last looked at it and doesn't really suit this kind of switch so well anymore.

@cmaloney

Copy link
Copy Markdown
Contributor

In addition to bigmemtest there is also an arbitrary "resource name" system (requires()). but also not well suited. 👍 to just reducing resource usage. Have restarted quite a few jobs with this error in the sprint.

@colesbury
colesbury merged commit 61f1221 into python:mainMay 19, 2026
61 checks passed
@colesburycolesbury added awaiting merge needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 19, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@colesbury
colesbury deleted the gh-150114-reduce-test-iteration-memory branch May 19, 2026 21:37
@bedevere-app

Copy link
Copy Markdown

GH-150124 is a backport of this pull request to the 3.15 branch.

@bedevere-app

Copy link
Copy Markdown

GH-150123 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed needs backport to 3.15 pre-release feature fixes, bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 19, 2026
colesbury added a commit that referenced this pull request May 19, 2026
…ration (gh-150115) (#150123)
Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.
(cherry picked from commit 61f1221)
Co-authored-by: Sam Gross <colesbury@gmail.com>
colesbury added a commit that referenced this pull request May 19, 2026
…ration (gh-150115) (#150124)
Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.
(cherry picked from commit 61f1221)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dirtopic-free-threading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@colesbury@zooba@cmaloney