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 more than one core #267

Open
Eclips4 opened this issue Feb 19, 2023 · 6 comments
Open

Use more than one core #267

Eclips4 opened this issue Feb 19, 2023 · 6 comments

Comments

@Eclips4
Copy link
Member

Eclips4 commented Feb 19, 2023

On the current moment, pyperformance loads a single core
Is there any reason why this is so?

@Eclips4 Eclips4 changed the title Usage more than one core Use more than one core Feb 19, 2023
@rockdrilla
Copy link

I'd suggest to implement -j threads rather than running on all available cores. I'm using pyperformance for gathering profiling data in own weird Python PGO+LTO build.

@corona10
Copy link
Member

corona10 commented Apr 21, 2023

@rockdrilla

I'm using pyperformance for gathering profiling data in own weird Python PGO+LTO build.

If you don't mind, would you like to introduce your use case?
These days I have an interest in increasing the coverage of profiling for PGO.

@rockdrilla
Copy link

rockdrilla commented Apr 21, 2023

@corona10 it's pretty weird solution. 😄

In short: build Python with shared library, install "somewhere" pyperformance using "shared" Python, reconfigure Python for static binary and build it - it will run pyperformance while gathering PGO data.

applied patches (related for this case):

build script: debian/rules from package template

upd: benchmark results.

@corona10
Copy link
Member

upd: benchmark results.

Wow supercool!

I am still conservative with direct supporting profiling workload based on pyperformance suite
but I am open to improving the current PGO and LTO for better performance.
(For example, thinLTO is fast but fullLTO based on GCC is slow if you don't pass the core count or auto flag)
or we can create a new configuration for designating the pre-gen profile directory, which can be used for external profiled data.

@rockdrilla
Copy link

rockdrilla commented Apr 21, 2023

I'd suggest to using fixed core count rather than "auto" in -flto=X because I've seen a lot of times situation where (gnu) make launches up to N (in case of make -j N) jobs with gcc and each (!) gcc spawned up to N processes. It's confusing me a lot but container runtime confuses whole build process even more when running in a container with limited core count.

upd: you may use -fprofile-dir=path flag with gcc in order to separate PGO data from build directory.

@corona10
Copy link
Member

I'd suggest to using fixed core count rather than "auto" in -flto=X because I've seen a lot of times situation where (gnu) make launches up to N (in case of make -j N) jobs with gcc and each (!) gcc spawned up to N processes

Okay, I agree with you. Let's pile the issue on the CPython and discuss the better way to solve it.
I prefer that we can use seamless ways to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants