Default options for -threaded

Phyx lonetiger at
Mon Oct 10 10:33:02 UTC 2016

Oops, sorry, only just now seen this. It seems my overly aggressive filters
couldn't decide where to put the email :)

I do agree to some extend with this. I'd prefer if I made a mistake for my
system not to hang. The one downside to this default though is that you
can't just hand a program over to user and have it run at full capabilities.

If it possible to set this from inside a program? My guess is no, since by
the time you get to main the rts is already initialized?

Would a useful alternative be to provide a compile flag that would change
the default? e.g. opt-in? Since now there is a small burden on the end user.


On Sat, Oct 8, 2016 at 5:55 PM, Ben Gamari <ben at> wrote:

> lonetiger at writes:
> > Hi All,
> >
> > A user on has asked why
> > -N -qa isn’t the default for -threaded.
> >
> I'm not sure that scheduling on all of the cores on the user's machine by
> default is a good idea, especially given that our users have
> learned to expect the existing default. Enabling affinity by default
> seems reasonable if we have evidence that it helps the majority of
> applications, but we would first need to introduce an additional
> flag to disable it.
> In general I think -N1 is a reasonable default as it acknowledges the
> fact that deploying parallelism is not something that can be done
> blindly in many (most?) applications. To make effective use of
> parallelism the user needs to understand their hardware, their
> application, and its interaction with the runtime system and configure
> the RTS appropriately.
> Of course, this is just my two-cents.
> Cheers,
> - Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list