From owner-freebsd-questions@FreeBSD.ORG Wed Nov 12 22:29:49 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C068D5; Wed, 12 Nov 2014 22:29:49 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF136218; Wed, 12 Nov 2014 22:29:48 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id tp5so14663311ieb.29 for ; Wed, 12 Nov 2014 14:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=d88zpEN5C19K/L1ZcBUFO0gO4HWy3TLpiyQQculc7TA=; b=Q4lL+MQPyg1AhatkXUqFT2Q5FhaCZDtORveClADTPxfIe0NNgdEMM/JRwc2s0XuQjf ztC2v2xaSRtQ8dNKw7sAltbEDWsScTalPBnu1v9I4Ozy/lP7g2fG56X2y2pVt0q6QIvn vX5JqlHDH7JjTqzpBAc8VsM6VtuIZ06trW9Qzqgyjg9ueQDmdMcy+XQpFL68S8T6vreG JXLNAlZqjy8TDqtKnVuacxorjRbKHQGA63hjYDd+JOni9fViKGbr7fTgvmQT7f1KaQUm A8OJrNNY00qmFmHe8E5gnJlaa0W5e+HLO/KvHvdGUbAbuUZnsLkblKmIWnI5mvFFKWPe AOtQ== MIME-Version: 1.0 X-Received: by 10.107.11.129 with SMTP id 1mr51732741iol.18.1415831388124; Wed, 12 Nov 2014 14:29:48 -0800 (PST) Sender: jdavidlists@gmail.com Received: by 10.43.96.202 with HTTP; Wed, 12 Nov 2014 14:29:48 -0800 (PST) In-Reply-To: References: <20141110071353.GO24601@funkthat.com> <20141112084909.GV24601@funkthat.com> Date: Wed, 12 Nov 2014 17:29:48 -0500 X-Google-Sender-Auth: tVQRAEk5UL9NKjsTZgCQNHXjr0w Message-ID: Subject: Re: How thread-friendly is kevent? From: J David To: "K. Macy" Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 22:29:49 -0000 On Wed, Nov 12, 2014 at 5:14 PM, K. Macy wrote: > This may not be related, but it's interesting: a client I worked for > many years ago switched from kqueue to poll for their web server > because kqueue did not distribute the workload evenly. I imagine this > is unchanged. It looks pretty good in testing: $ ./kqtest server Server thread ends after 2630979 events. Server thread ends after 2600452 events. Server thread ends after 2525542 events. Server thread ends after 2418386 events. Server thread ends after 2524895 events. $ That's a small-scale test on a VM with two CPU's running five threads, but the results appear to hold. (This is using the _DISPATCH model.) Thanks!