on the number of ghc_worker threads on executables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

on the number of ghc_worker threads on executables

Ruben Astudillo
Dear list

I noticed that on -threaded programs, even with just 1 capability (+RTS
-N1) the number of worker tasks is usually more than 3. Examples of this
are glirc and taffybar. What factors determine the number of
Tasks/worker Tasks (OS threads) on a program?

--
-- Ruben Astudillo
-- PGP: 4EE9 28F7 932E F4AD


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: on the number of ghc_worker threads on executables

Niklas Hambüchen
Others may have more insights, but with -threaded, `safe` FFI calls run
in their own threads as to not block your Haskell thread.

So even with -N1 you can have (arbitrarily?) many OS threads, depending
on how many safe foreign calls you do.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Loading...