From owner-freebsd-net@FreeBSD.ORG Fri Nov 7 08:58:04 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0F5D106567C for ; Fri, 7 Nov 2008 08:58:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7DADE8FC0C for ; Fri, 7 Nov 2008 08:58:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 0859946B5B; Fri, 7 Nov 2008 03:58:04 -0500 (EST) Date: Fri, 7 Nov 2008 08:58:03 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Anton Yuzhaninov In-Reply-To: <49137561.80403@citrin.ru> Message-ID: References: <49137561.80403@citrin.ru> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: sysctl net.inet.tcp.syncache.count 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: Fri, 07 Nov 2008 08:58:04 -0000 On Fri, 7 Nov 2008, Anton Yuzhaninov wrote: > % sysctl net.inet.tcp.syncache > net.inet.tcp.syncache.rst_on_sock_fail: 1 > net.inet.tcp.syncache.rexmtlimit: 3 > net.inet.tcp.syncache.hashsize: 1024 > net.inet.tcp.syncache.count: -84 > net.inet.tcp.syncache.cachelimit: 102400 > net.inet.tcp.syncache.bucketlimit: 100 > > Why number of entries in syncache is negative? The syncache entry is no longer protected by a single lock, since the locks on the syncache are now per-hash bucket, so it looks like it's been corrupted. This won't lead to other problems, as the count is updated as a statistic but never used to, for example, enforce limits. We should probably eliminate the statistic, since UMA already maintains the syncache entry count coherently as part of its own statistics, along with other useful information: robert@fledge:~> vmstat -z | head -1 ; vmstat -z | grep -i syncache ITEM SIZE LIMIT USED FREE REQUESTS FAILURES syncache: 104, 15392, 0, 222, 2638489, 0 I'm not convinced its worth adding the overhead of coherent statistics gathering for the cache entry count if we already have it elsewhere. Robert N M Watson Computer Laboratory University of Cambridge