Skip to content

gh-135898: Add section to free-threading howto about memory usage. - #143279

Merged
kumaraditya303 merged 7 commits into
python:mainfrom
nascheme:gh-135898-ft-memory-usage-howto
May 30, 2026
Merged

gh-135898: Add section to free-threading howto about memory usage.#143279
kumaraditya303 merged 7 commits into
python:mainfrom
nascheme:gh-135898-ft-memory-usage-howto

Conversation

@nascheme

@naschemenascheme commented Dec 30, 2025

Copy link
Copy Markdown
Member

This higher memory usage (if it actually does happen) is mostly due to design decisions and not due to bugs or implementation flaws. So, I think we should document them somewhere in the user facing docs.


📚 Documentation preview 📚: https://cpython-previews--143279.org.readthedocs.build/

@nascheme

nascheme commented Jan 17, 2026

Copy link
Copy Markdown
MemberAuthor

As suggested by @kumaraditya303, we should add some additional details about objects that get per-thread reference counting. Currently that's heap allocated types and code objects. See the Include/internal/pycore_uniqueid.h file for some details.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label May 17, 2026
@nascheme
nascheme marked this pull request as ready for review May 28, 2026 13:38
Comment threadDoc/howto/free-threading-python.rst Outdated
Comment threadDoc/howto/free-threading-python.rst Outdated
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) May 30, 2026 10:34
@kumaraditya303kumaraditya303 added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 30, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32915012 | 📁 Comparing ca61593 against main (5c3deca)

🔍 Preview build

4 files changed
±howto/free-threading-python.html
±library/difflib.html
±library/functions.html
±library/tkinter.messagebox.html

@kumaraditya303
kumaraditya303 merged commit 62a45fa into python:mainMay 30, 2026
38 checks passed
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsMay 30, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @nascheme for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label May 30, 2026
kumaraditya303 added a commit that referenced this pull request May 30, 2026
…age (GH-143279) (#150608)
gh-135898: Add section to free-threading howto about memory usage (GH-143279)
(cherry picked from commit 62a45fa)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
kumaraditya303 added a commit that referenced this pull request May 30, 2026
…age (GH-143279) (#150607)
gh-135898: Add section to free-threading howto about memory usage (GH-143279)
(cherry picked from commit 62a45fa)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip newsstaleStale PR or inactive for long period of time.topic-free-threading

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

@nascheme@kumaraditya303