
#15891: Excessive system time during execution of GHC-built executables on macOS ----------------------------------------+--------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- It seems that the executables built by GHC on my configuration of macOS are slow, clocking in 80% of my machine's cycles in system time. Here is what I know. - Everything tested bootstrapping with both GHC 8.6.1 and GHC 8.6.2. There is no observable difference between these bootstrapping compilers. The detailed data reported is all from GHC 8.6.1. - When I try to build GHC, stage 1 builds snappily. But once stage-1 gets used, it slows to a crawl. - Activity Monitor reports that my computer is spending roughly 80% of its time in the System space, not the User space. (While building ghc-stage1 itself, there is barely any system activity.) - I have sampled ghc-stage1 during a rts_dist_HC call. Samples are at https://gist.github.com/goldfirere/7316920ad37d776c25c15dbb0ed5996f - I then `dtruss`d the same, with output at https://gist.github.com/goldfirere/621ce9072e1204d30e96e7daecc80d02 - System information: * macOS High Sierra, 10.13.6 * Processor: 3.5 GHz Intel Core i5 * Memory: 16 GB 2400 MHz DDR4 * SSD main storage, formatted with APFS * happy 1.19.9 * alex 3.2.4 * XCode 10.1 * gcc is clang-1000.11.45.5, Apple LLVM version 10.0.0, thread model: posix Others (see [https://mail.haskell.org/pipermail/ghc- devs/2018-November/016507.html thread]) have not been able to repro, but this is very reliable for me. Any ideas? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15891 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler