[GHC] #11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- While working on a project, I have noticed that GHC 8 takes too long to run my test suite on CI server, see for example here: https://travis-ci.org/mrkkrp/zip/builds/113059190 GHC 8 finished in 370 [seconds](https://travis-ci.org/mrkkrp/zip/jobs/113059197#L599), while GHC 7.10.3 in [82 seconds](https://travis-ci.org/mrkkrp/zip/jobs/113059195#L608), 7.10.2 and 7.10.3 demonstrated similar results (77 seconds). There are minor differences in versions of libraries used, mainly those that are shipped with GHC, I read their changelogs and it seems like it's not likely that this sort of slow-down (× 4.5) happened because of one of those libraries. Note that due to the nature of the project I test it does fair amount of IO in temporary directories, I'll be happy to provide more information if you like. BTW, here is the test suite: https://github.com/mrkkrp/zip/blob/master/tests/Main.hs -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by mrkkrp: @@ -11,1 +11,1 @@ - and 7.10.3 demonstrated similar results (77 seconds). + and 7.10.1 demonstrated similar results (77 seconds). New description: While working on a project, I have noticed that GHC 8 takes too long to run my test suite on CI server, see for example here: https://travis-ci.org/mrkkrp/zip/builds/113059190 GHC 8 finished in 370 [seconds](https://travis-ci.org/mrkkrp/zip/jobs/113059197#L599), while GHC 7.10.3 in [82 seconds](https://travis-ci.org/mrkkrp/zip/jobs/113059195#L608), 7.10.2 and 7.10.1 demonstrated similar results (77 seconds). There are minor differences in versions of libraries used, mainly those that are shipped with GHC, I read their changelogs and it seems like it's not likely that this sort of slow-down (× 4.5) happened because of one of those libraries. Note that due to the nature of the project I test it does fair amount of IO in temporary directories, I'll be happy to provide more information if you like. BTW, here is the test suite: https://github.com/mrkkrp/zip/blob/master/tests/Main.hs -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Sounds bad. The more you can help us by digging into exactly what is taking longer, the easier it'll be to help. A 4.5x slowdown ought to be very easy to zero in on. Thanks! Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by j.waldmann): don't put too much meaning into timings on travis. see this discussion https://mail.haskell.org/pipermail/haskell- cafe/2016-February/123260.html and data in ticket #10818 put "-j2" in your build scripts. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mrkkrp): Replying to [comment:3 j.waldmann]:
don't put too much meaning into timings on travis.
see this discussion https://mail.haskell.org/pipermail/haskell- cafe/2016-February/123260.html and data in ticket #10818
put "-j2" in your build scripts.
Well, that ticket is about compilation time and mine is about performance of compiled code, I don't see how `-j2` can help here. While there are many things that can influence timing on Travis, there results are quite reproducible and now (test suite has grown bigger) GHC 7.10.x finishes successfully while 8.0.1 ends up with:
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
This is really disappointing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by j.waldmann): For commit 4345f2d79e388a1f2f14c8440624f11445ea06a of the zip package, I get these timings on my local machine for "cabal test" {{{ 7.10.3 : 8 min 8.rc2 : 60 min }}} results (in dist/test/zip-0.1.0-tests.log) are identical except for the one line that contains the timing info. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Just to be clear: the slowdown is primarily at runtime, not compile time, correct? We're aware of and working on a few compile-time regressions (though none that should be this bad), but if this is at runtime, it may be a newly-discovered problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by j.waldmann): yes, my data (comment 5) is time for running the test. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mrkkrp): I will try to find time and profile tomorrow to find out what is taking so long. This package is quite fast with 7.10.3, just as fast as `zip` and `unzip` utilities. I think it's because of zlib bindings and conduits used. Just a wild guess: conduit uses rewrite rules and fusion, maybe something of this behaves differently with the new version of compiler? This is just an idea, I'm not an expert in this area. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => invalid Comment: This is due to https://github.com/haskell/filepath/commit/dd13bb32b7b563248fa2bfa232891e057... and the generate-and-check strategy used in the `Arbitrary EntrySelector` instance (and maybe others). That will almost never work now for long paths that `Windows.isValid` recognizes more characters as invalid. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11666: Severe performance degradation in GHC 8.0.1 compared to GHC 7.10.x -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mrkkrp): I'm glad it's nothing serious. Sorry for annoyance. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11666#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC