mathoudebine / mathoudebine/turing-smart-screen-python

Feature request: Processor Cores affinity?

Open
#650 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rich Text Format
Stars
2.3k
Forks
412
Avg merge
21h 10m
Merged PRs (30d)
7

Description

Hi, firstly many thanks for this, a great useful app.

The one issue I witnessed with this was that you can't set the affinity of the python process in Windows to specific cores, so it is always running on core 0, which adds latency to quite a few games etc, meaning I need to kill the python app first, play a game or whatnot, and then restart this app after finishing.

What would be good is to be able to assign a specific core affinity? I've seen this done with other projects, apparently you just need to import the multiprocessor lib and launch the main process on a particular core.

Ideally I prefer to not run background apps on the first 4 cores, and I can change the affinity for the apps via the Task Manager in Windows. Maybe a config.yaml entry to specify which cores should be permitted, the OS manages the threads then accordingly but among the chosen cores?

Hope this is doable as this is a great app, but being forced to it running on Core 0, impacts the core latency for other tasks. Not usually noticeable until you hit a very demanding unit of work in an app such as a game etc.

Heres a short example:
https://stackoverflow.com/questions/36172101/designate-specific-cpu-for-a-process-python-multiprocessing?noredirect=1&lq=1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the main Python process entry point and the config.yaml handling mentioned in the issue, then review the linked Windows multiprocessing example. Done means the app can restrict its process affinity to user-selected cores on Windows without requiring manual Task Manager changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.