From owner-freebsd-net@FreeBSD.ORG Wed Feb 15 17:57:21 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 309C81065670 for ; Wed, 15 Feb 2012 17:57:21 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id ABCD58FC13 for ; Wed, 15 Feb 2012 17:57:20 +0000 (UTC) Received: by yhfs35 with SMTP id s35so947717yhf.13 for ; Wed, 15 Feb 2012 09:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=PQ1022MefXcbKDvnVn0UfV/pWDGRuhbbHZgHMHHVrCk=; b=rul0JYVjcMSExiwT5+6oxWRBbV76P3psxdMKzhFd5X5abgbJoWW8Srekncu+gNw7oQ w6uXo+ORAoRFKCoKD4CFq5SsIObIwWBnZaoYwbZZptz2uc7ov09QDNOAsSbe4WkHZO9y lMgpbWvCTW9vOD8i0n5azBLRMTqaAtolaWxIY= MIME-Version: 1.0 Received: by 10.50.207.99 with SMTP id lv3mr32276643igc.24.1329326898890; Wed, 15 Feb 2012 09:28:18 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.50.170.4 with HTTP; Wed, 15 Feb 2012 09:28:18 -0800 (PST) In-Reply-To: <4F3B864D.1010000@fsn.hu> References: <4F3B864D.1010000@fsn.hu> Date: Wed, 15 Feb 2012 18:28:18 +0100 X-Google-Sender-Auth: KL62BvLcK-jrKseH9ZIP6gufJ3o Message-ID: From: "K. Macy" To: Attila Nagy Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net Subject: Re: Very bad distribution of packets between multiple listening threads X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 17:57:21 -0000 On Wed, Feb 15, 2012 at 11:17 AM, Attila Nagy wrote: > Hi, > > I'm using FreeBSD 9-STABLE on a four core machine with bce to run > multi-threaded unbound with libev (using kqueue). > Here's the first message (not a long thread so far) about the problem: > http://unbound.net/pipermail/unbound-users/2012-February/002237.html > > To summarize: > whether I run unbound in multi-threaded or multi-process mode, I get very > bad DNS query distribution between threads/processes. > > There is sometimes a 10-fold difference in the queries served (QPS) between > threads (for example thread X gets 300, thread Y gets 3000). > > What could be done to make this distribution more balanced between threads? > And where does this happens exactly? > I don't have a fix for this problem, but I can comment that an ISP I know of switched away from using kqueue with lighttpd to poll because the load was not well distributed. Cheers