They may be preemptive, but I saw a lot of instances with Lyris where one
thread could easily monopolize processor time at the expense of all
others and I had to add sleeps in at places.

> 
> FreeBSD user threads have fairly high context switch overhead, especially
> when there are open fds that get polled on each context switch.  Kernel
> threads are actually faster in many circumstances. 

Not Linux threads. The linux threads implementation, as parts of its
synchronization methods, disables interrupts. When Lyris previously used
one thread for each connection, performance on FreeBSD was 20-30x
that of Linux, and solaris was 30-40x that of Linux. Some simple
benchmarking by a friend of mine at Berkeley indicated that Java using
native threads on Linux was about 100x slower than using green threads.


So maybe FreeBSD kernel threads will be better, but working with Linux's
kernel threads has only made me dislike Linux more than I did previously.


                                        -Kip




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to