Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use psutil in perf for CPU affinity #2

Closed
vstinner opened this issue Jun 13, 2016 · 0 comments
Closed

Use psutil in perf for CPU affinity #2

vstinner opened this issue Jun 13, 2016 · 0 comments

Comments

@vstinner
Copy link
Member

On Python 2, the CPU affinity is not saved in metadata.

"taskset" can be replaced with "psutil.Process.cpu_affinity()" (works on Linux, Windows, FreeBSD) https://pythonhosted.org/psutil/#psutil.Process.cpu_affinity

Advice by @giampaolo who wrote psutil ;-)

I would prefer to keep psutil dependency optional whenever possible.

vstinner added a commit that referenced this issue Jun 14, 2016
Issue #2:

* Emit a warning if os.sched_setaffinity() or
  psutil.Process.cpu_affinity() are not available
* Use psutil.Process.cpu_affinity() on Python 2 to get the CPU
  affinity for metadata
* Add unit test on psutil
* Stop using the taskset command: it didn't work for loop calibration
vstinner added a commit that referenced this issue Apr 10, 2017
* Calibration: reorganize calibrations: loops #1, warmups #1,
  loops #2, warmups #2.
* format_run(): display the number of looops/warmups for calibration
  runs.
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

No branches or pull requests

1 participant