From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 17:02:56 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAA3916A420 for ; Tue, 22 Jan 2008 17:02:56 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E9FD513C457; Tue, 22 Jan 2008 17:02:55 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <479621BE.2060907@FreeBSD.org> Date: Tue, 22 Jan 2008 18:02:54 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Stefan Lambrev References: <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no> <4795FE54.9090606@moneybookers.com> <86lk6i0vzk.fsf@ds4.des.no> <479605E2.6070709@moneybookers.com> In-Reply-To: <479605E2.6070709@moneybookers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= , freebsd-hackers@FreeBSD.org Subject: Re: gettimeofday() in hping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 17:02:56 -0000 Stefan Lambrev wrote: > Hi, > > Dag-Erling Smørgrav wrote: >> Stefan Lambrev writes: >> >>> I tested all different combination. The performance change is almost >>> invisible (100-200KB/s), and can't be compared with the performance >>> boost that TSC gain over ACPI-fast timecounter. Unfortunately TSC >>> doesn't play nice with power saving modes. >>> >> >> This will vary greatly from machine to machine, depending on the exact >> hardware and the ACPI BIOS. >> >> More modern machines have an HPET timer which is supposedly faster than >> ACPI yet more reliable than TSC. >> >> DES >> > I do not have HEPT on the servers that I test, but simple test on my > laptop shows > that hping can generate with ACPI-fast ~4MB/s traffic, 5MB/s with HPET > and 8MB/s with TSC. I didn't check dummy time counter. > Also I noticed that there is a kern.timecounter.tc.XXX.quality (read only). > Can this be used to reduce quality and speed up performance? No, they are meaningless values only used to rank the time counters and choose one at boot. You should use hwpmc to verify where the application is really spending time, since gettimeofday doesn't seem to account for it all. Kris