From owner-freebsd-arch@FreeBSD.ORG Fri Dec 27 23:39:57 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBCAEC03; Fri, 27 Dec 2013 23:39:57 +0000 (UTC) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 69BD71A5D; Fri, 27 Dec 2013 23:39:57 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id o15so9023482qap.3 for ; Fri, 27 Dec 2013 15:39:56 -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=euVm13lQMBGYGbmeF4iXt2gwQUt2FHdyV62kJFi4930=; b=h5q7UAk/seZV5/9Yh9r6oCrCmdCtYHWHbfI/DY+6RTYMwwTnHNtemS0H9k6MOziuGt 4tLwVQ6JUYoojHQOeKIdij/L3TT9GWTuIMhYhmrH2lPwn8Qm95U1fIYtcpMqX49QvnV7 bC0aYV+5bVwv6dDH8IhYIbufxrZgYFHVpB6Zorklh/PwkkyUf9NgADEnKOuywGWgHMTR bq9iWuYM12kD+k25MbVdwDAcj4BK5v8W/R4zqhjD4UQZsFkWUMXNfjiuXexBa1Atf91j nw5RJjaKiqKO6LiivFcSlQlLgZNJeoDAgCEUB81qNLHnpK3MYA0oTi3F3ozRSTIJBW5k HXzw== MIME-Version: 1.0 X-Received: by 10.224.124.195 with SMTP id v3mr85068620qar.55.1388187596280; Fri, 27 Dec 2013 15:39:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Fri, 27 Dec 2013 15:39:56 -0800 (PST) In-Reply-To: <52BE0D40.5020304@freebsd.org> References: <52BE0D40.5020304@freebsd.org> Date: Fri, 27 Dec 2013 15:39:56 -0800 X-Google-Sender-Auth: NwSvGF9bQLCJvswPHaJazdxeu1g Message-ID: Subject: Re: Default knote hash table size is too .. small From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:39:57 -0000 On 27 December 2013 15:29, Alfred Perlstein wrote: > Cool! What about auto-tune to maxfiles? Well, ideally it'd be tunable per actual kqueue rather than a global. That way some crazy ioctl could be done to set the knote hash size per queue. I'm just worried that for some people doing say, high throughput UDP with one connected socket, it's just wasted RAM. But for mad parallel TCP the hash has to be bigger. But then if yo'ure doing say, 30 worker processes versus 1000 sockets each versus say, 8 worker processes doing 4000 sockets each, you need a different hash size. See? It's not as easy as tune to maxfiles. the only thing that is that simple is "can we massively overspecify it." :-) I'll do a followup at some point to allow an ioctl to set/get it on a per-kqfd basis. Then we won't need the build limit. Thanks, -a