[GHC] #9221: (super!) linear slowdown of parallel builds on 40 core machine

GHC ghc-devs at haskell.org
Tue Aug 30 12:28:12 UTC 2016


#9221: (super!) linear slowdown of parallel builds on 40 core machine
-------------------------------------+-------------------------------------
        Reporter:  carter            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  7.8.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #910, #8224       |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Sergei Trofimovich <siarheit@…>):

 In [changeset:"9d175605e52fd0d85f2548896358d96ee441c7e4/ghc"
 9d175605/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="9d175605e52fd0d85f2548896358d96ee441c7e4"
 GhcMake: limit Capability count to CPU count in parallel mode

 In Trac #9221 one of problems using high --jobs=<N>
 is amount of mutator (or GC) threads we crate.

 We use userspace spinning-and-yielding (see ACQUIRE_SPIN_LOCK)
 to acess work stealing queues. In case of
 N-worker-threads > N-CPUs fraction of time when
 thread holding spin lock gets descheduled by kernel
 increases. That causes other threads to waste CPU time
 before giving up CPU.

 Signed-off-by: Sergei Trofimovich <siarheit at google.com>

 Test Plan:
 ghc --make -j8 and -j80 have comparable sys time
 on a 8-core system.

 Reviewers: austin, gintas, bgamari, simonmar

 Reviewed By: bgamari, simonmar

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2482

 GHC Trac Issues: #9221
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9221#comment:58>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list