From owner-freebsd-net@FreeBSD.ORG Tue Jan 11 18:50:33 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8940716A4CE for ; Tue, 11 Jan 2005 18:50:33 +0000 (GMT) Received: from web80602.mail.yahoo.com (web80602.mail.yahoo.com [66.218.79.91]) by mx1.FreeBSD.org (Postfix) with SMTP id 52E0943D39 for ; Tue, 11 Jan 2005 18:50:33 +0000 (GMT) (envelope-from mohan_srinivasan@yahoo.com) Message-ID: <20050111185033.73879.qmail@web80602.mail.yahoo.com> Received: from [209.79.44.104] by web80602.mail.yahoo.com via HTTP; Tue, 11 Jan 2005 10:50:33 PST Date: Tue, 11 Jan 2005 10:50:33 -0800 (PST) From: Mohan Srinivasan To: freebsd-net@freebsd.org, jbehl@fastclick.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: %cpu in system - squid performance in FreeBSD 5.3 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2005 18:50:33 -0000 Following up to a mail from Jeff Behl and Sean Chittenden back in Dec. http://lists.freebsd.org/pipermail/freebsd-net/2004-December/006074.html >From your description, it looks like moving a kqueue based Squid will help considerably (it looks like there is a version of Squid that is kqueue based - not sure how stable that is though). If you drop a quick kernel profile, you will see most of the system CPU being spent in select() caused polling of descriptors. In my previous experience with a Squid-based proxy several years ago, once you dropped more than a couple of hundred connections into select(), CPU utilization spiked sharply because of the descriptor polling. We then hoisted Squid on top of a (homebrew) version of kqueue, which caused system CPU to drop dramatically, because all the descriptor polling was avoided. mohan