commercialhaskell / commercialhaskell/stack
Builds are kind of not using Hyper Threading
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments
On Mac OS processor hyper threading is not well utilised.
### Steps to reproduce
For example:
1. stack install hoogle on a clean configuration
2. Most of the time when all the cores are utilised it will be without any usage of Hyper Threading.
### Expected
To use all available logical cores, not just physical ones.
### Actual
Currently most build processes are fully utilising only single logical thread per core.
Tested on iMac and MacBook Pro with latest OSX Mojave.
See this video: https://drive.google.com/file/d/1YRPBURxrj6pr5AeTepUm3iCXwgvM4Hj7/view?usp=sharing
On the top you could see in green/red the logical cores of the system. Most of the time they are utilizing to only half of all (6 cores with HT = 12 logical cores). If more cores are used we would see that more than 6 are utilised. From time to time there are used all 12, but either they are less than 6, or they are 12. So I think that GHC build processes run on 6 cores and from time to time we could observe two GHC processes with 6 cores. It's strange.
Do someone else observe that on Mac? I'm even not sure it's from Stack. It could be Cabal or GHC build. But I'm trying to start from somewhere.
### Stack version
```
$ stack --version
Version 1.9.1, Git revision f9d0042c141660e1d38f797e1d426be4a99b2a3c (6168 commits) x86_64 hpack-0.31.0
```
### Method of installation
* Official binary
Contributor guide
Assessment
This issue has not been assessed yet.