Opened 8 years ago

Closed 8 years ago

#865 closed bug (fixed)

runghc extremely slow when output redirected to file on NFS

Reported by: greenrd@… Owned by:
Priority: normal Milestone: 6.6
Component: GHCi Version: 6.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When I compile my program using ghc and run the generated executable, the compilation is slow but the executable is very fast. When I run the program using runghc, it's extremely slow if I redirect the output to a file on NFS - but it's not using lots of CPU, it just sits there.

My best guess is that runghc turns off output buffering entirely and outputs one character at a time - which murders NFS performance, so I'm told.

Change History (1)

comment:1 Changed 8 years ago by simonpj

  • Milestone set to 6.6
  • Resolution set to fixed
  • Status changed from new to closed

Assuming your diagnosis is right (it seems very plausible), the right thing seems to be that we should use un-buffered I/O only when doing truly interactive GHCi, and not when doing runghc, or ghc -e.

So we've made that change, and will push the change into 6.6.

Can you test a nightly-build snapshot to see if it fixes your problem?

Meanwhile, we're closing the bug. Thanks for reporting it

Simon

Note: See TracTickets for help on using tickets.