Logging to one process from thousands: How does it work?
Joel Reymont
joelr1@REDACTED
Tue Jan 3 13:36:48 CET 2006
Folks,
I have just rewrote some code from Haskell to Erlang and there's one
thing that baffles me.
I tried to approach Haskell the way I would code in Erlang and set up
a logger thread with an unbounded message queue. I then launched a
few hundred/thousand threads that traced to the logger periodically.
This is no different than using disk_log in Erlang, I think.
The Haskell logger thread got quickly overwhelmed with messages I
think. The queue build-up was huge. How does it work with Erlang? Is
the scheduler specially tuned somehow to give different priorities to
different threads? The Haskell scheduler, I believe, is just round-
robin.
Thanks, Joel
--
http://wagerlabs.com/
More information about the erlang-questions
mailing list