From owner-freebsd-performance@FreeBSD.ORG Mon Feb 18 06:08:57 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC2216A419 for ; Mon, 18 Feb 2008 06:08:57 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay02.pair.com (relay02.pair.com [209.68.5.16]) by mx1.freebsd.org (Postfix) with SMTP id C0CA313C46B for ; Mon, 18 Feb 2008 06:08:55 +0000 (UTC) (envelope-from silby@silby.com) Received: (qmail 81094 invoked from network); 18 Feb 2008 05:42:13 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 18 Feb 2008 05:42:13 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sun, 17 Feb 2008 23:42:12 -0600 (CST) From: Mike Silbersack To: freebsd-performance@freebsd.org Message-ID: <20080210112241.W11665@odysseus.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Syncache / syncookies performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 06:08:57 -0000 Kris Kennaway pointed me at Stefan Lambrev's benchmarks on the syncache/syncookies: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=188234+0+archive/2008/freebsd-performance/20080210.freebsd-performance Which seem to say: Syncache only (default size): 316000 pps Syncookies only: 281000 pps Syncookies + syncache: 252000 pps Syncache (larger size): 186000 pps This seems to line up with what I was told by some of the Yahoo guys a few years back. They said that the syncache gets more expensive the bigger you make its hash tables. In theory, the root of problem with the syncache is the dropping of entries; if you're just dropping entries out of the syncache before you get a response, it's not doing anything productive. What SHOULD be the optimal thing to do is to avoid using syncookies in the normal case, unless a syncache bucket fills up. In the case where a bucket is full, we should then leave the syncache entries alone (rather than purging them) and emit a syncookie at that time. I don't have time to implement that, but I'd be happy review it if someone else gets it working and is able to show that it is more efficient. Mike "Silby" Silbersack