High CPU usage on Mac OS

22 views
Skip to first unread message

Prodromos Kolyvakis

unread,
Jan 19, 2019, 12:25:03 PM1/19/19
to haskell-stack
Hello to all,

I have made a fresh install of Haskell Platform on Mac OS Mojave. After that I moved on building Hakyll though cabal and I noticed an extremely high CPU usage. 
When I allowed for 4 threads the whole system got stacked and I had to killed it. So finally, I built it with only one thread where again I noticed an extremely high CPU usage. FYI, I used the following command: 

cabal new-install -j1 hakyll

After the successful instalationl, I tried to build my site with: stack build however the CPU usage turned again extremely high (including of course the temperature). Do you know if it is a common issue with either stack or ghc?

Thanks in advance!

Michael Snoyman

unread,
Jan 20, 2019, 1:03:56 PM1/20/19
to Prodromos Kolyvakis, haskell-stack
If it's high with both cabal and stack, it's most likely the compilation with GHC itself. The best way to check would be to open up Activity Monitor, turn to the CPU tab, sort by CPU usage descending, and then start compiling. The culprit should be readily apparent.

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/d551e4f8-602a-4eac-8467-cf5b380292f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prodromos Kolyvakis

unread,
Jan 21, 2019, 6:23:46 AM1/21/19
to haskell-stack
Hello again,

Thanks for the prompt reply. I just checked it and GHC is indeed the prime reason. Do you know if it is a known bug or if there is a workaround?
Because, I cannot for sure continue like this...!

Thanks in advance!

Michael Snoyman

unread,
Jan 23, 2019, 1:02:13 AM1/23/19
to Prodromos Kolyvakis, haskell-stack
I'm not sure if it's a bug. GHC does take significant CPU to compile some code.

Reply all
Reply to author
Forward
0 new messages