[GHC] #910: --make should have a -j flag for parallel building

GHC ghc-devs at haskell.org
Sat Aug 31 21:00:03 UTC 2013


#910: --make should have a -j flag for parallel building
-------------------------------------+------------------------------------
        Reporter:  igloo             |            Owner:
            Type:  feature request   |           Status:  patch
        Priority:  normal            |        Milestone:  _|_
       Component:  Compiler          |          Version:  6.4.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:  N/A               |       Blocked By:  8184
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by rrnewton):

 Ok, I'm trying to get a decent set of libraries installed to test this
 well.  The very first thing I cabal installed ('text') did get a small
 speedup.

 However, I'm also seeing some excessive system time.  This may have
 nothing to do with the parallel make approach and just be a function of
 the new IO manager.  In fact, if I understand the design, worker threads
 in this model should either be running or blocked on MVars.  (That's good
 for avoiding wasted user time as well, unlike work-stealing which burns
 cycles looking for work.)

 I'm running on a 32-core Intel Westmere machine, using this command to
 install `text` version 0.11.3.1:

 {{{
 time cabal install text --ghc-options="-j24" --reinstall
 }}}

 Notice that in this simple test I am relying on the `setNumCapabilities`
 behavior.  Here are the times:

 {{{
  * 1 thread:   real 1m20.028s user 1m17.921s sys 0m1.768s
  * 2 threads:  real 1m7.417s user 1m22.818s sys 0m14.891s
  * 4 threads:  real 0m59.528s user 1m29.110s sys 0m37.981s
  * 8 threads:  real 0m57.219s user 1m54.461s sys 1m31.703s
  * 16 threads: real 1m6.225s user 4m46.976s sys 3m32.661s
  * 24 threads: real 1m16.501s user 9m53.254s sys 6m3.375s
  * 31 threads: real 1m27.445s user 17m0.314s sys 8m0.175s
 }}}

 Well, it's nice that final sequential time is not much worse than the one-
 threaded time!

 Finally, here is the fingerprint:

 {{{
 .|4880dfaeafec1fc65568a5445a70ec4286949123
 ghc-tarballs|f190b3ce329422e13cbe1b5dad030058ca4bdda7
 libffi-tarballs|a0088d1da0e171849ddb47a46c869856037a01d1
 libraries/Cabal|9f374ab45e62924506b992db9157c970c7259a03
 libraries/Win32|3da00d80f2fd7d1032e3530e1af1b39fba79aac3
 libraries/array|b5779026c4d760cc380ef1fc18403534dced55c1
 libraries/base|1b725f6ada6c4ddb011172408291a64498d199cb
 libraries/binary|2799c25d85b4627200f2e4dcb30d2128488780c3
 libraries/bytestring|7d5b516ad0937b7cdc29798db33a37a598123b6c
 libraries/containers|154cd539a22e4d82ff56fec2d8ad38855f78513a
 libraries/deepseq|420507ea418db8664a79aedaa6588b772e8c97c6
 libraries/directory|571f32b2a0af7404a8483af5b1791361c5528ab6
 libraries/filepath|8d34f787e06bf3a1802992246785939901dec8aa
 libraries/ghc-prim|84fed8933a53cd15e39123a8a0067369c060e69e
 libraries/haskeline|40bcd6ac30577d1d240166674d1e328ac52c1fd5
 libraries/haskell2010|1c055868f748acb2945cb5652b3fdea6226e8862
 libraries/haskell98|40300d61f29aa8d9953079d14fb5b2f1e5e04184
 libraries/hoopl|8e0ef3b7bf6d25919209f74d65c4a77c6689934d
 libraries/hpc|a7231c6727de54d17ce14b1286cfe88c4db95783
 libraries/integer-gmp|cfcd248c0921aafe599c8547022686c5289bf743
 libraries/integer-simple|5d9c6565550fb5c9c38f69475f52a2ba1d3edf98
 libraries/old-locale|df98c76b078de507ba2f7f23d4473c0ea09d5686
 libraries/old-time|7e0df2eb500ce4381725b868440fde04fa139956
 libraries/pretty|0b8eada2d4d62dd09ee361d8b6ca9b13e6573202
 libraries/primitive|c6b1e204f0f2a1a0d6cb1df35fa60762b2fe3cdc
 libraries/process|5d47829c123c10711d14dd089b4d8d65f8289f3b
 libraries/random|4b68afd3356674f12a67a4e381fa9becd704fab2
 libraries/template-haskell|ec6d5a7c9b0c9e2fb1ce10d776cff74548e17981
 libraries/terminfo|116d3ee6840d52bab69c880d775ae290a20d64bc
 libraries/time|d4f019b2c6a332be5443b5bf88d0c7fef91523c6
 libraries/transformers|a59fb93860f84ccd44178dcbbb82cfea7e02cd07
 libraries/unix|ffdb844069497b276a719b0c89be35bd18095f22
 libraries/vector|f27156970d9480806a5defcfea5367187c2a6997
 libraries/xhtml|fb9e0bbb69e15873682a9f25d39652099a3ccac1
 testsuite|5cad49d42e434130671c3d14692d73d56253fab8
 utils/haddock|90ad0ea538d2fafed2047de8414c55627b94e879
 utils/hsc2hs|46abf34f337dbc5fa638f06912e34966a9d1a147
 }}}

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




More information about the ghc-tickets mailing list