From owner-freebsd-performance@FreeBSD.ORG Fri Feb 10 10:56:27 2012 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 F363C106564A for ; Fri, 10 Feb 2012 10:56:26 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6E49F8FC14 for ; Fri, 10 Feb 2012 10:56:26 +0000 (UTC) Received: from outgoing.leidinger.net (p4FC41EEA.dip.t-dialin.net [79.196.30.234]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 6F3E0844720; Fri, 10 Feb 2012 11:40:19 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::3:102]) by outgoing.leidinger.net (Postfix) with ESMTPS id A94682C4D; Fri, 10 Feb 2012 11:40:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1328870416; bh=04pfdGFOGqEsrnxAmHTPLcdv+owcE9/t8Jk9+Y6Uv60=; h=Date:Message-ID:From:To:Cc:Subject:References:In-Reply-To: Content-Type:MIME-Version; b=V6Gtf1lx52uHnW0afbW/2rIWVSCyNrK1nALCxf0wlC27t8L4r48B0xK4gBbDHaqwn dUza6XKDHsBOVh8x/evVi2zD4iSQH+o+wGwoGHo8LO2M6uSC/HlMeRBWbcDv9PFi+G B5ovtlBQb8KUj6zvIJiayUZu0wT3RCXaOliXbIbaUZ1he1JPaeKRtX2PvLueBE/2su p6BUWi6cpfRJUWCfGkOzkhsJ7uWq61BOxpxLrmg6d1knKwZ47+bGy6lg8BJCZ9y2p8 SVH0o6d1m9PGVhwI4MPfhCPGNPqYer2fQZ9pVk9u+eag2yPODBbqUQL4M2yj4KpR1r osoWMLCEsvt6A== Received: (from www@localhost) by webmail.leidinger.net (8.14.5/8.14.4/Submit) id q1AAeG6N085477; Fri, 10 Feb 2012 11:40:16 +0100 (CET) (envelope-from Alexander@Leidinger.net) X-Authentication-Warning: webmail.leidinger.net: www set sender to Alexander@Leidinger.net using -f Received: from 85.94.224.19 ([85.94.224.19]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 10 Feb 2012 11:40:16 +0100 Date: Fri, 10 Feb 2012 11:40:16 +0100 Message-ID: <20120210114016.Horde.NRmcWJjmRSRPNPQQLsmBORA@webmail.leidinger.net> From: Alexander Leidinger To: Julian Wissmann References: <7FE9C466-2459-4C0E-949A-7C0843B04BB4@gmail.com> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H4 (5.0.18) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 6F3E0844720.A1400 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.614, required 6, autolearn=disabled, AWL -0.50, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, T_RP_MATCHES_RCVD -0.01) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1329475220.28695@tPTA8c6JA7/Nj07axfVE3A X-EBL-Spam-Status: No Cc: Adrian Chadd , freebsd-performance@freebsd.org Subject: Re: Tor on FreeBSD Performance issues 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: Fri, 10 Feb 2012 10:56:27 -0000 Quoting Julian Wissmann (from Wed, 8 Feb 2012 18:33:53 +0100): > 1086 tor RET read 1568/0x620 > 1086 tor CALL clock_gettime(0xd,0x7fffffffd910) > 1086 tor RET clock_gettime 0 > 1086 tor CALL > kevent(0x3,0x3e18000,0x2,0x3dbe000,0x400,0x7fffffffd920) > 1086 tor GIO fd 3 wrote 64 bytes > > 1086 tor RET kevent 3 > 1086 tor CALL clock_gettime(0x4,0x7fffffffd940) > 1086 tor RET clock_gettime 0 > 1086 tor CALL gettimeofday(0x7fffffffd930,0) > 1086 tor RET gettimeofday 0 > 1086 tor CALL recvfrom(0xbc2,0x4822020,0x3e40,0,0,0) > 1086 tor GIO fd 3010 read 4096 bytes > > As I understand kevent to be part of queue I go with yes here. What > I also take from it is a huge number of clock_gettime() and > gettimeofday() calls. And there you have probably the cause of the slowdown. The clock subsystem in FreeBSD is working at a higher prcession than what you get in FreeBSD. If possible, try to trim down the number of calls, or use a less precise (and faster) clocksource, e.g. one of the _FAST ones (see http://www.freebsd.org/cgi/man.cgi?clock_gettime). Bye, Alexander. -- Corruption is not the No. 1 priority of the Police Commissioner. His job is to enforce the law and fight crime. -- P.B.A. President E. J. Kiernan http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137