Skip to content

Should the build system detect SMT/HT? #1972

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

Closed
TiborGY opened this issue Jan 19, 2019 · 5 comments
Closed

Should the build system detect SMT/HT? #1972

TiborGY opened this issue Jan 19, 2019 · 5 comments

Comments

@TiborGY
Copy link
Contributor

TiborGY commented Jan 19, 2019

As far as I can tell the build system currently detects the number of threads in the build machine, and uses that as -DMAX_CPU_NUMBER. Since using SMT/HT does not improve performance when it comes to BLAS, wouldn't it make more sense to use the number of physical cores as the default -DMAX_CPU_NUMBER instead?

@martin-frbg
Copy link
Collaborator

Still unclear I think, possibly depends on individual BLAS call and/or cpu model whether HT helps to keep the math units busy or not.

@martin-frbg
Copy link
Collaborator

See #1881 for some discussion and data.

@brada4
Copy link
Contributor

brada4 commented Jan 21, 2019

Since using SMT/HT does not improve performance

It is subject to performance/power bias MSR setting. In the power side of things it will improve using both HT halves.

I'd expect end user to HT those after reading anything recent on security of their CPU.
Also the system workarounds for problem do performance damage (like park other hyperthread while one is busy)
There is no elegant non-root way to detect on which side of patches we are building, even less running after.
Given next CPUs generations released will be fixed in this regard, perceived problem will fade in time

@TiborGY
Copy link
Contributor Author

TiborGY commented Jan 21, 2019

It is subject to performance/power bias MSR setting. In the power side of things it will improve using both HT halves.

I am not sure I quite understand what you are saying. Could you elaborate on that? I am aware that there is a performance bias option that can be tuned using x86_energy_perf_policy (requires root access), but not much more.

I'd expect end user to HT those after reading anything recent on security of their CPU.

I am sorry but I don't really get what you are saying. I am aware that there are hardware vulnerabilities in CPUs (especially Intel CPUs).

@brada4
Copy link
Contributor

brada4 commented Jan 22, 2019

This option controls execution cap on each hyper-thread among many other things... Which in turn means that SMT/HT usage does not WORSEN performance (unless it is ATOM microcoded hyperthreading)

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

3 participants