Skip to content

added per node pycache#56

Open
MarkNDeaconu wants to merge 3 commits into
masterfrom
pycache-created
Open

added per node pycache#56
MarkNDeaconu wants to merge 3 commits into
masterfrom
pycache-created

Conversation

@MarkNDeaconu

Copy link
Copy Markdown
Contributor

Cache task bytecode (.pyc) on local disk via PYTHONPYCACHEPREFIX

PYTHONPYCACHEPREFIX redirects all bytecode reads/writes to a per-node dir on /dev/shm, so imports never write to the codedir which can cause issues on nfs when using an older linux kernel (torvalds/linux@99bc9f2). PYTHONDONTWRITEBYTECODE is slower in comparison since recompiling happens per task.

@MarkNDeaconu MarkNDeaconu requested a review from haraschax June 12, 2026 18:41
@haraschax

Copy link
Copy Markdown
Contributor

Can you post some results on some tasks running with = PYTHONDONTWRITEBYTECODE, vs global temp cache, vs the per task tmp cache? Would prefer to not accumulate cache on the machine if it can be avoided.

@MarkNDeaconu

Copy link
Copy Markdown
Contributor Author

The objective is to move pycache to local disk, but keep workers using a common venv on the associated pycache. Startup and cleanup of pycache also tied to venv.

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.

2 participants