From owner-freebsd-performance@FreeBSD.ORG Fri Jan 2 14:09:35 2015 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C888C124 for ; Fri, 2 Jan 2015 14:09:35 +0000 (UTC) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 867ED1589 for ; Fri, 2 Jan 2015 14:09:35 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id uy5so53324213obc.4 for ; Fri, 02 Jan 2015 06:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=S6hTQBncp1217wlbhUyJOAvbveXUiCnZfhwP0zPgOgI=; b=AOy5RnowSd9eQ+iPJJ112xzScsRzgTG9CAs7Yaf1gYqh8GDulWb2MNQExSzLtl8hhB qtuqjFywhKeVSW9ysrhX3jstfuNiWlS3xNFP5W+wQcgGdnwFhtcUIa7bpcieuaGcs0KK m3VdJAzHIwnVZiGubaMWcCf6WqhwLUDeMmKC0cFTzau4EMVzpUI1OJHB+W3huYC4qeRr BeRIVVKupF/JVIIMwAH3Vb//ezzOq6NButBI9Q6ku89zJTBlzMNqfsP/uRykF20qm53D lsulCaP4+EAIChIo06XegopMeVLcIxJa+YRzzNT8U9uBBN/S1lAMTijSUhJscu70Q76y Vrkw== MIME-Version: 1.0 X-Received: by 10.202.178.87 with SMTP id b84mr33468911oif.64.1420207774806; Fri, 02 Jan 2015 06:09:34 -0800 (PST) Received: by 10.60.102.241 with HTTP; Fri, 2 Jan 2015 06:09:34 -0800 (PST) In-Reply-To: <20150102102036.0a52b072@schwanenlied.me> References: <54A43EC4.2030706@mykolab.com> <9BF461F5-D6B6-4287-BE8B-87B281FE93D0@gmail.com> <20150101033733.4b295d3b@schwanenlied.me> <54A621C2.2060408@mykolab.com> <20150102102036.0a52b072@schwanenlied.me> Date: Fri, 2 Jan 2015 09:09:34 -0500 Message-ID: Subject: Fwd: [tor-dev] gettimeofday() Syscall Issues From: grarpamp To: freebsd-performance@freebsd.org Content-Type: multipart/mixed; boundary=001a113b7a30ecd0d8050babe387 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 14:09:35 -0000 --001a113b7a30ecd0d8050babe387 Content-Type: text/plain; charset=UTF-8 Some recent FreeBSD related questions in this app area. ---------- Forwarded message ---------- From: Yawning Angel Date: Fri, Jan 2, 2015 at 5:20 AM Subject: Re: [tor-dev] gettimeofday() Syscall Issues To: tor-dev@lists.torproject.org On Thu, 01 Jan 2015 23:42:42 -0500 Libertas wrote: > The first two account for the bulk of the calls, as they are in the > core data relaying logic. > > Ultimately, the problem seems to be that the caching is very weak. At > most, only half of the calls to tor_gettimeofday_cached_monotonic() > use the cache. It appears in the vomiting print statements that > loading a single simple HTML page > (http://www.openbsd.org/faq/ports/guide.html to be exact) will cause > >30 gettimeofday() syscalls. You can imagine how that would > >accumulate for an exit carrying 800 KB/s if the caching > doesn't improve much with additional circuits. So while optimization is cool and all, I'm not seeing why this specifically is the underlying issue. Each cell can contain 498 bytes of user payload. Looking at things simplistically this is 800 KiB/s -> 1644 cells/sec, leaving you with approximately 608 microseconds of processing time per cell. On my i5-4250U box, gettimeofday() takes 22 ns on Linux, and 2441 ns on FreeBSD. I'm not sure how accurate the FreeBSD results are as it was in a VirtualBox VM (getpid() on the same VM takes 124 ns). If someone has a OpenBSD box they should benchmark gettimeofday() and see how long the call takes. Taking the FreeBSD case (since we know that tor works fine on Linux), a single gettimeofday() call takes approximately, 0.39% of the per-cell processing budget. For reference (assuming gettimeofday() in *BSD really is this shit performance wise), 7000 calls to gettimeofday() is 17.09 ms worth of calls. The clock code in tor does need love, so I wouldn't object to cleanup, but I'm not sure it's in the state where it's causing the massive performance degradation that you are seeing. Regards, -- Yawning Angel _______________________________________________ tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev --001a113b7a30ecd0d8050babe387 Content-Type: application/pgp-signature Content-Disposition: attachment Content-Transfer-Encoding: base64 X-Attachment-Id: 70fb2bcf5a99c8fc_0.0.1 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NClZlcnNpb246IEdudVBHIHYyDQoNCmlRSWNC QUVCQ2dBR0JRSlVwbkQwQUFvSkVQNHZrRm9JQjhCb2JnWVAvMmdJRzd3Vy9BbFVUcmhpcnVLRGV1 ZXcNCkE1ZTVoWWNzaEphTm9FL2JpSmZ6MnlPU3hnVXNqZnIzUVNicFdUYjNVaXYzRlR3UC9xbDJB ZENMSHNXSFRYVVINClFkRjlJUWxnM1N4eXkrdVdJRzRicm5pRENrVFJVa2pEazVjcE1hOVJjTUZI MXNIWlhCY1luY0x0eWNHdE9NcEcNCnZTcHZTSk5sZ2gwc1ZGRHEvODZ4cDduNGgzUmFmQ05NOGhF d3ZnemdidVdzK2VuUTRFTG5HSExaZ0VjTG5STCsNCjZCalZZZXllMU11ZUlyQTFtTDRyamlVaFFZ bUI1aFhzWGhiaVNnNmVyS1pJbGkrbmlMS1JpcEwxektDRVdtZkUNCnFxdnFDc21jWXVtMEw5eEtP LzJVOXJaUUJxZEFwaU5xR1RxRzBGekVLTDJoa3hZSE0zZnBPWTZ1UTFEdzB1VTYNCk4wMGdxQUdT MXlReEpSVlJsNDRBdXkrSHNOMTFzczBSSWhaNURsVVpMRVVmek91VmhjV3VFalM4cFc0Z1ZNazIN CnEzdmZ0clI1UThNNmF6aUk3Mll5NnlwMU13cHJ1dDNJUkNBdStLeTFsVWVyZjB0aXBTcnl6QnQ1 WUNLL1M3SW0NCjMzMllCaHFiOHVINFVEZGFjZitXTHVCWUlnK0Y4ekpwY0JuMTYrano2WlFjK3ZV cUhSMnlZTFk1QjMxQ0x0Rm0NCnV5cEJpK0JSdHkveDdDOVNoNjV5LzVzUUFjemNWQ0hzM1I3VHNZ azZRTHVWVkhlMDBwV3k0RFlzVG0vRnNSUW8NClhnY3VoTXp2Z3FOcDF2WnV0dGFDOTJ6KzNHUG5I OU9hSmorL0RNWUY2Q2t3TjhIdE4vNGRaL3dyNk9BV3dPR2UNCm5lUmxQTDNId2ZFRHZmNjRvekZa DQo9MFZoRQ0KLS0tLS1FTkQgUEdQIFNJR05BVFVSRS0tLS0tDQo= --001a113b7a30ecd0d8050babe387-- From owner-freebsd-performance@FreeBSD.ORG Fri Jan 2 16:59:09 2015 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C05BCA3B for ; Fri, 2 Jan 2015 16:59:09 +0000 (UTC) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 493AD1E02 for ; Fri, 2 Jan 2015 16:59:09 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u56so4748473wes.16 for ; Fri, 02 Jan 2015 08:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=KwNXwdCogdqIOpxBbd0SmROiJdBLLR6mtb6TCKUeqLQ=; b=KhOzKvO8SmCQwZx+0S12ysl71SZngp/klN2mQWbYHnQCAs23jXVa8PxfLYhDXDLPdO A19LCWVfTNjpN8XS1N1qD7QXQyI9YLKyMBRivHfJEjd4Qs8HH7YhvMuB/wLtZKaeJeAq dycCTSQGjKBADa/3iTnWI6ZO5ywoJZ6FD0K5bHnXBLc/6Gj59tIGofJxg08PdJntIYuG oAcMcA4ZZppAK7DbVELrN1pOZdnBiAXCWpy1cSpTXi+rCFFq8qqHkCAMJ8jB4uACmAvB St4M1m6YGMtpfUUihfG26S8yS27fHMBFBOiLOMCEeM9+j8KP0wg+aq46EYDoob6+wvVp VeKQ== MIME-Version: 1.0 X-Received: by 10.194.5.37 with SMTP id p5mr29997375wjp.20.1420217947680; Fri, 02 Jan 2015 08:59:07 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Fri, 2 Jan 2015 08:59:07 -0800 (PST) In-Reply-To: References: <54A43EC4.2030706@mykolab.com> <9BF461F5-D6B6-4287-BE8B-87B281FE93D0@gmail.com> <20150101033733.4b295d3b@schwanenlied.me> <54A621C2.2060408@mykolab.com> <20150102102036.0a52b072@schwanenlied.me> Date: Fri, 2 Jan 2015 08:59:07 -0800 X-Google-Sender-Auth: g0KpO-tYpDsN-YEn6cuEyeOmsAM Message-ID: Subject: Re: [tor-dev] gettimeofday() Syscall Issues From: Adrian Chadd To: grarpamp Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Mailing Lists X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 16:59:09 -0000 What's their benchmark call? What about clock_gettime() versus gettimeofday() ? -adrian On 2 January 2015 at 06:09, grarpamp wrote: > Some recent FreeBSD related questions in this app area. > > > ---------- Forwarded message ---------- > From: Yawning Angel > Date: Fri, Jan 2, 2015 at 5:20 AM > Subject: Re: [tor-dev] gettimeofday() Syscall Issues > To: tor-dev@lists.torproject.org > > > On Thu, 01 Jan 2015 23:42:42 -0500 > Libertas wrote: > >> The first two account for the bulk of the calls, as they are in the >> core data relaying logic. >> >> Ultimately, the problem seems to be that the caching is very weak. At >> most, only half of the calls to tor_gettimeofday_cached_monotonic() >> use the cache. It appears in the vomiting print statements that >> loading a single simple HTML page >> (http://www.openbsd.org/faq/ports/guide.html to be exact) will cause >> >30 gettimeofday() syscalls. You can imagine how that would >> >accumulate for an exit carrying 800 KB/s if the caching >> doesn't improve much with additional circuits. > > So while optimization is cool and all, I'm not seeing why this > specifically is the underlying issue. > > Each cell can contain 498 bytes of user payload. Looking at things > simplistically this is 800 KiB/s -> 1644 cells/sec, leaving you with > approximately 608 microseconds of processing time per cell. > > On my i5-4250U box, gettimeofday() takes 22 ns on Linux, and 2441 ns on > FreeBSD. I'm not sure how accurate the FreeBSD results are as it was > in a VirtualBox VM (getpid() on the same VM takes 124 ns). If someone > has a OpenBSD box they should benchmark gettimeofday() and see how long > the call takes. > > Taking the FreeBSD case (since we know that tor works fine on Linux), a > single gettimeofday() call takes approximately, 0.39% of the per-cell > processing budget. > > For reference (assuming gettimeofday() in *BSD really is this shit > performance wise), 7000 calls to gettimeofday() is 17.09 ms worth of > calls. > > The clock code in tor does need love, so I wouldn't object to cleanup, > but I'm not sure it's in the state where it's causing the massive > performance degradation that you are seeing. > > Regards, > > -- > Yawning Angel > > _______________________________________________ > tor-dev mailing list > tor-dev@lists.torproject.org > https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev > > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" From owner-freebsd-performance@FreeBSD.ORG Fri Jan 2 17:25:01 2015 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 701D8F97 for ; Fri, 2 Jan 2015 17:25:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE1626620B for ; Fri, 2 Jan 2015 17:25:00 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t02HOmjF076447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2015 19:24:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t02HOmjF076447 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t02HOlnn076446; Fri, 2 Jan 2015 19:24:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 2 Jan 2015 19:24:47 +0200 From: Konstantin Belousov To: grarpamp Subject: Re: Fwd: [tor-dev] gettimeofday() Syscall Issues Message-ID: <20150102172447.GT42409@kib.kiev.ua> References: <54A43EC4.2030706@mykolab.com> <9BF461F5-D6B6-4287-BE8B-87B281FE93D0@gmail.com> <20150101033733.4b295d3b@schwanenlied.me> <54A621C2.2060408@mykolab.com> <20150102102036.0a52b072@schwanenlied.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-performance@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 17:25:01 -0000 On Fri, Jan 02, 2015 at 09:09:34AM -0500, grarpamp wrote: > Some recent FreeBSD related questions in this app area. What is the question ? As a background, I can repeat that FreeBSD implements syscall-less gettimeofday() and clock_gettime() for x86 machines which have usable RDTSC. The selection of the timecounter can be verified by sysctl kern.timecounter.hardware, and enabled by default fast gettimeofday(2) can be checked by sysctl kern.timecounter.fast_gettime. On some Nehalem machine, I see it doing ~30M calls/sec with enabled fast_gettime, and ~6.25M calls/sec with disabled fast_gettime. This is measured on 2.8GHz Core i7 930 with src/tools/tools/syscall_timing. Check your timecounter hardware. Since it was noted that the tests were done in VM, check the quality of RDTSC emulation in your hypervisor. > > > ---------- Forwarded message ---------- > From: Yawning Angel > Date: Fri, Jan 2, 2015 at 5:20 AM > Subject: Re: [tor-dev] gettimeofday() Syscall Issues > To: tor-dev@lists.torproject.org > > > On Thu, 01 Jan 2015 23:42:42 -0500 > Libertas wrote: > > > The first two account for the bulk of the calls, as they are in the > > core data relaying logic. > > > > Ultimately, the problem seems to be that the caching is very weak. At > > most, only half of the calls to tor_gettimeofday_cached_monotonic() > > use the cache. It appears in the vomiting print statements that > > loading a single simple HTML page > > (http://www.openbsd.org/faq/ports/guide.html to be exact) will cause > > >30 gettimeofday() syscalls. You can imagine how that would > > >accumulate for an exit carrying 800 KB/s if the caching > > doesn't improve much with additional circuits. > > So while optimization is cool and all, I'm not seeing why this > specifically is the underlying issue. > > Each cell can contain 498 bytes of user payload. Looking at things > simplistically this is 800 KiB/s -> 1644 cells/sec, leaving you with > approximately 608 microseconds of processing time per cell. > > On my i5-4250U box, gettimeofday() takes 22 ns on Linux, and 2441 ns on > FreeBSD. I'm not sure how accurate the FreeBSD results are as it was > in a VirtualBox VM (getpid() on the same VM takes 124 ns). If someone > has a OpenBSD box they should benchmark gettimeofday() and see how long > the call takes. > > Taking the FreeBSD case (since we know that tor works fine on Linux), a > single gettimeofday() call takes approximately, 0.39% of the per-cell > processing budget. > > For reference (assuming gettimeofday() in *BSD really is this shit > performance wise), 7000 calls to gettimeofday() is 17.09 ms worth of > calls. > > The clock code in tor does need love, so I wouldn't object to cleanup, > but I'm not sure it's in the state where it's causing the massive > performance degradation that you are seeing. > > Regards, > > -- > Yawning Angel > > _______________________________________________ > tor-dev mailing list > tor-dev@lists.torproject.org > https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" From owner-freebsd-performance@FreeBSD.ORG Fri Jan 2 23:15:07 2015 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FF55FDB for ; Fri, 2 Jan 2015 23:15:07 +0000 (UTC) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E11F1A6A for ; Fri, 2 Jan 2015 23:15:07 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id x69so41797280oia.9 for ; Fri, 02 Jan 2015 15:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9p4Fqn+Mk32XnpLJouygVGzbfU40FwaeFo3S1r/dipo=; b=H0fmI5uPRN3ORHfMDBpK/p4XFCBf0QJxYvst68CvxUtfU3spuD53kAO/17N5wWomP1 g5Gp+2VoUO5WFoaxnZe9MKgem3U0QhiAdCt0Hbv1F5wUoHYDo3xVHzrizbcuuwb4e2wm HL8AQjQAeGBAYmd1EGvf/LgddenuV44gREVmwqx8hN/eYAef+EX+iTD0FDVZDJ39uIrv fVMrt0s0fjsYia0XBimvry1+XLsXKf0fq4eYCWFaq2TttFNsJdmC+2HP8xkYAlDc8Xgw FotlBUnIVkG91j0+DDdMZWbdootxEFgyFK52hiDzsT9hmj0Rp4liH68yIaYBS+/y0YVp lEhg== MIME-Version: 1.0 X-Received: by 10.202.46.196 with SMTP id u187mr43535574oiu.19.1420240506571; Fri, 02 Jan 2015 15:15:06 -0800 (PST) Received: by 10.60.102.241 with HTTP; Fri, 2 Jan 2015 15:15:06 -0800 (PST) In-Reply-To: <20150102172447.GT42409@kib.kiev.ua> References: <54A43EC4.2030706@mykolab.com> <9BF461F5-D6B6-4287-BE8B-87B281FE93D0@gmail.com> <20150101033733.4b295d3b@schwanenlied.me> <54A621C2.2060408@mykolab.com> <20150102102036.0a52b072@schwanenlied.me> <20150102172447.GT42409@kib.kiev.ua> Date: Fri, 2 Jan 2015 18:15:06 -0500 Message-ID: Subject: Re: Fwd: [tor-dev] gettimeofday() Syscall Issues From: grarpamp To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: tor-dev@lists.torproject.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 23:15:07 -0000 On Fri, Jan 2, 2015 at 12:24 PM, Konstantin Belousov wrote: > On Fri, Jan 02, 2015 at 09:09:34AM -0500, grarpamp wrote: >> Some recent FreeBSD related questions in this app area. >> > What is the question ? > > As a background, I can repeat that FreeBSD implements syscall-less > gettimeofday() and clock_gettime() for x86 machines which have > usable RDTSC. The selection of the timecounter can be verified > by sysctl kern.timecounter.hardware, and enabled by default fast > gettimeofday(2) can be checked by sysctl kern.timecounter.fast_gettime. > > On some Nehalem machine, I see it doing ~30M calls/sec with enabled > fast_gettime, and ~6.25M calls/sec with disabled fast_gettime. This is > measured on 2.8GHz Core i7 930 with src/tools/tools/syscall_timing. > > Check your timecounter hardware. Since it was noted that the tests > were done in VM, check the quality of RDTSC emulation in your hypervisor. https://lists.torproject.org/pipermail/tor-dev/2015-January/thread.html http://docs.freebsd.org/mail/current/freebsd-performance.html Maybe I can just refer non subscribers out to the two lists above that way in case anyone sees anything interesting they can join/comment as desired. Background might be that Tor operators have some large relays on *BSD and were looking to validate, and ways to improve, performance there. Cheers. https://lists.torproject.org/pipermail/tor-relays/ https://lists.torproject.org/pipermail/tor-talk/