Date: Mon, 27 Dec 1999 10:30:54 -0800 (PST) From: Kip Macy <kip@lyris.com> To: "Richard Seaman, Jr." <dick@tar.com> Cc: Steffen Merkel <d_f0rce@gmx.de>, freebsd-hackers@FreeBSD.ORG Subject: Re: Kernel threads Message-ID: <Pine.SOL.4.05.9912271014001.24487-100000@luna.lyris.com> In-Reply-To: <19991227120931.H5975@tar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.05.9912271014001.24487-100000>