From owner-freebsd-performance@FreeBSD.ORG Mon Jul 19 09:19:25 2010 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 2AAD41065670 for ; Mon, 19 Jul 2010 09:19:25 +0000 (UTC) (envelope-from gofp-freebsd-performance@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id AAD558FC20 for ; Mon, 19 Jul 2010 09:19:24 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OamVP-0005r5-Nn for freebsd-performance@freebsd.org; Mon, 19 Jul 2010 11:19:23 +0200 Received: from nuclight.avtf.net ([217.29.94.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jul 2010 11:19:23 +0200 Received: from vadim_nuclight by nuclight.avtf.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jul 2010 11:19:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-performance@freebsd.org From: Vadim Goncharov Date: Mon, 19 Jul 2010 09:19:12 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 44 Message-ID: References: <28778099.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: nuclight.avtf.net X-Comment-To: Nikol@y User-Agent: slrn/0.9.9p1 (FreeBSD) Subject: Re: pf nat & ipfw kernel nat & ng_nat - what uses less computer resources? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 09:19:25 -0000 Hi Nikol@y! On Fri, 4 Jun 2010 03:19:41 -0700 (PDT); Nikol@y wrote about 'pf nat & ipfw kernel nat & ng_nat - what uses less computer resources?': > We have a network. Now we are using pf NAT. But we are interested in some > question: > 1. What type of NAT uses less computer resources? > a) pf NAT > b) ipfw kernel NAT > c) NG_NAT ? AFAIK, ipfw nat uses slightly less resources than ng_nat (not significant), and pf uses more reosurces than two others. > 2. BINAT or NAT - what is better? Which one of them is more faster and uses > less computer resources with one of firewall? In theory I think that BINAT > faster than NAT, because there is no necessary to track connections. Not in implementation, it always does. > 3. I know that the firewall PF does not support threads. I read that IPFW is > (in FreeBSD 8.0, for example). But in my test I haven`t seen threads when > used IPFW. Maybe there are some special options to compile kernel or > configure IPFW? For tests I compiled kernel with: There are no special threads for ipfw, it runs in the context of other threads (driver, netisr or swi1, depending on settings and compile options). > 4. I can`t find any information about BINAT in ipfw+ng_nat? Does anyone use > this technology? Or maybe you know interesting information about it? It is no "so binat" as in pf, but it can be emulated. Read these: man natd man libalias man ng_nat and use redirect_address (all three use the same underlying libalias, so even for different implementations techniques are valid). -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-performance@FreeBSD.ORG Mon Jul 19 11:07:41 2010 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 2D88E1065674 for ; Mon, 19 Jul 2010 11:07:41 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 089C08FC15 for ; Mon, 19 Jul 2010 11:07:40 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OaoCC-0002r3-Ca for freebsd-performance@freebsd.org; Mon, 19 Jul 2010 04:07:40 -0700 Message-ID: <29203466.post@talk.nabble.com> Date: Mon, 19 Jul 2010 04:07:40 -0700 (PDT) From: Nikolay Dmukha To: freebsd-performance@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cosmic17@gmail.com References: <28778099.post@talk.nabble.com> Subject: Re: pf nat & ipfw kernel nat & ng_nat - what uses less computer resources? 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: Mon, 19 Jul 2010 11:07:41 -0000 Thanks for your reply. I think I`ll use ipfw kernel nat. But first I would like to test nat through iptables in Linux to compare the results. I read that in iptables there is some special option (config_ip_nf_conntract). It is very interesting for me what is the difference in work with and without this option. -- View this message in context: http://old.nabble.com/pf-nat---ipfw-kernel-nat---ng_nat---what-uses-less-computer-resources--tp28778099p29203466.html Sent from the freebsd-performance mailing list archive at Nabble.com. From owner-freebsd-performance@FreeBSD.ORG Mon Jul 19 12:35:03 2010 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 B86A11065687 for ; Mon, 19 Jul 2010 12:35:03 +0000 (UTC) (envelope-from chris.compagnon@free.fr) Received: from smtpfb1-g21.free.fr (smtpfb1-g21.free.fr [212.27.42.9]) by mx1.freebsd.org (Postfix) with ESMTP id 03F038FC13 for ; Mon, 19 Jul 2010 12:35:01 +0000 (UTC) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by smtpfb1-g21.free.fr (Postfix) with ESMTP id 748272D126 for ; Mon, 19 Jul 2010 14:15:43 +0200 (CEST) Received: from spooler8-g27.priv.proxad.net (unknown [172.20.243.233]) by smtp5-g21.free.fr (Postfix) with ESMTP id CB3F0D48132 for ; Mon, 19 Jul 2010 14:15:36 +0200 (CEST) Date: Mon, 19 Jul 2010 14:15:35 +0200 (CEST) From: chris.compagnon@free.fr To: freebsd-performance@freebsd.org Message-ID: <174253078.4054151279541735578.JavaMail.root@spooler8-g27.priv.proxad.net> In-Reply-To: <1378275745.4053601279541488405.JavaMail.root@spooler8-g27.priv.proxad.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [unknown,171.18.2.109] X-Mailer: Zimbra 5.0 (ZimbraWebClient - FF3.0 (Win)/5.0.15_GA_2815.UBUNTU8_64) X-Authenticated-User: chris.compagnon@free.fr Subject: FreeBSD 8.0 + ZFS : erratic network performances 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: Mon, 19 Jul 2010 12:35:03 -0000 Hello ! I have installed a fresh freeBSD 8.0 (with kernel building, etc.) and activated ZFS. There are 3 SATA disks for 1 raidz1 pool (through Promise TX4 contoler card). and 1 IDE disk for cache. (I remove the cache disk for testing --> Persitant problem) With 1 GB or RAM and default parameters : During transfering data to the ZFS server (through samba or FTP), the data are temporaly stored on cache disk, so transfered on pool. when the data pass from cache to pool, all transfers halt : 12 seconds : transfer 2/3 second : halt 12 seconds : transfer. ... How obtain continuous transfers ? Thanks. Chris. From owner-freebsd-performance@FreeBSD.ORG Wed Jul 21 01:12:31 2010 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 202831065676 for ; Wed, 21 Jul 2010 01:12:31 +0000 (UTC) (envelope-from ssanders@softhammer.net) Received: from oproxy1-pub.bluehost.com (oproxy1-pub.bluehost.com [66.147.249.253]) by mx1.freebsd.org (Postfix) with SMTP id E62C98FC12 for ; Wed, 21 Jul 2010 01:12:30 +0000 (UTC) Received: (qmail 31980 invoked by uid 0); 21 Jul 2010 00:13:21 -0000 Received: from unknown (HELO host358.hostmonster.com) (66.147.240.158) by oproxy1.bluehost.com.bluehost.com with SMTP; 21 Jul 2010 00:13:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=softhammer.net; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:X-Enigmail-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=r6KpAKw8T2+Nap0mZtDP66rmBAqz7EEe9EKP1I+BGBpcakJvQdIl9ghLokrrI9n+fw3cvgLsbt1HAAzazbrA7kSoyGP+uTuPyDrUITycC+2RUaTC6H8Tg50yeIrbfQz4; Received: from pool-74-96-233-244.washdc.fios.verizon.net ([74.96.233.244] helo=onyx.softhammer.net) by host358.hostmonster.com with esmtpa (Exim 4.69) (envelope-from ) id 1ObNrJ-0001v5-Ul for freebsd-performance@freebsd.org; Tue, 20 Jul 2010 19:12:30 -0600 Message-ID: <4C46497D.7030207@softhammer.net> Date: Tue, 20 Jul 2010 21:12:29 -0400 From: Stephen Sanders User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-performance@freebsd.org References: <4C33BDCC.1020004@softhammer.net> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Identified-User: {2492:host358.hostmonster.com:softhamm:softhammer.net} {sentby:smtp auth 74.96.233.244 authed with ssanders@softhammer.net} Subject: Re: More Controllers != Higher Through Put 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: Wed, 21 Jul 2010 01:12:31 -0000 We found that in order to get the dual controller case up to speed we had to set vfs.lorunningspace=1MB and vfs.hirunningspace=8MB. On 07/07/2010 10:12 AM, Ivan Voras wrote: > On 07/07/10 01:35, Stephen Sanders wrote: > >> I'm wondering if anyone has heard of this. >> >> I've a system with a 3ware 9650 servicing 4 7200RPM Segate 1TB drives >> and the motherboard servicing 2 7200 RPM Segate 1TB drives. >> > So far so good. > > >> The 4 disk array is RAID 6 while the 2 disk array is RAID 1. The drives >> should deliver about 100MB/s. >> > Ok, so you've reduced the 4-drive array's write performance nearly to > equivalent of 2 drives and the 2-drive array to 1 drive. It should be > even worse for random IOs. > > Since FreeBSD doesn't support RAID-6 I guess you are using hardware RAID? > > For the 2-disk RAID-1 : you are probably using software RAID, right? > (on-board "SATA RAID" controllers usually are just software > implementations). > > >> 1. The most the 4 disk array is developing is 250MB/s write performance >> > This is too much. It almost looks like something is caching what > shouldn't be cached. How did you get this result? > > I'd expect less than 200 MB/s sequential writes on a 4-drive RAID-6 with > 100 MB/s drives. > > >> while the 2 disk array is coming in at 90MB/s write performance. >> > This is as expected - write performance of any size RAID-1 is equivalent > of 1 drive or less. > > >> The 4 disk array seems slow. >> > Nope - the contrary should be true. It looks like you are doing > something you shouldn't if you get that much performance, or your test > is overly simplistic (e.g. you're testing cache). > > >> 2. Attempting to write to both arrays simultaneously causes the rate on >> the 4 disk array to drop to 150MB/s and the 2 disk array drops to 60MB/s >> > Are you running on an Atom CPU? What kind of system are you using? > > >> I'd expect the 4 disk array should look more like 300+MB/s while the 2 >> disk array is about right. >> > No, you cannot get 300 MB/s from simple RAID6 of 4 drives in any direction. > > Think about it: all the data needs to be a) written as-is to 2 of the > drives, then b) parity/ECCs calculated and c) the same amount of data > written to 2 more drives. You cannot get write performance of more than > 2 drives equivalent in this scheme, and will probably be worse. For > reads, only if your RAID controller is very, very smart (meaning: it > probably isn't), you can recover some performance by using this > parity/ECC data to reconstruct more data than is read from the two > "plain" drives. I think ZFS does this in a limited way. > > >> I don't get why there should be a 'coupling' between the rates on >> separate controllers. >> > This is the only thing which is puzzling a bit. I > > >> The system is running FreeBSD 8.0, has 16GB of RAM in the system, and >> the test program is using O_DIRECT for writes in order to avoid the page >> daemon. >> > You should use some benchmark which knows how to deal with OS cache, for > example bonnie++ from the ports. > > Use a benchmark with random IO to see just how horrible your RAID-6 > performance will be for random writes. > > _______________________________________________ > 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 Sat Jul 24 14:18:07 2010 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 B06581065676 for ; Sat, 24 Jul 2010 14:18:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9E78FC12 for ; Sat, 24 Jul 2010 14:18:06 +0000 (UTC) Received: by fxm13 with SMTP id 13so5992259fxm.13 for ; Sat, 24 Jul 2010 07:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=7JVcqq3uEKxPBISQ1Dm9Lwx8feU0ezKVm6y2MQYqwco=; b=haGJlr+b573RE6SDFKT+L4w7lzbid8eM8BgvHB+vV7wSPRZ7HaLH5qxSs9UT9Y+C+M oLBgiO4OwGZ7e8P5XgrKYgrw+R0hoDiKK7JB0tINBZC9/PHpFhvZ9NKro0v1e4+SHs49 gRRmavv5j4NHi0/K0aI1QB02zZCxSXu1YZ4kk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ltVw/MrbkrHEPmJuf0WF3tF2NYlLkMfSHvmsi9VRlYiOALyefFxux1uuPJUgo+gG3i 8LQKg0PYhdLAm3AKp5JAyeIS606xRrcHyGhth37LojV52OhIt35LfDT8JM4pFAS7Q3e+ jW9U0Q43nfK//a3eghnSxiLB+S/e6nB5MxvCM= Received: by 10.86.33.3 with SMTP id g3mr3382717fgg.73.1279979663693; Sat, 24 Jul 2010 06:54:23 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id k15sm521713fai.40.2010.07.24.06.54.22 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 06:54:23 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4AF046.40507@FreeBSD.org> Date: Sat, 24 Jul 2010 16:53:10 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-performance@freebsd.org, freebsd-hackers@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 24 Jul 2010 14:39:09 +0000 Cc: Subject: Intel TurboBoost in practice 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: Sat, 24 Jul 2010 14:18:07 -0000 Hi. I've make small observations of Intel TurboBoost technology under FreeBSD. This technology allows Intel Core i5/i7 CPUs to rise frequency of some cores if other cores are idle and power/thermal conditions permit. CPU core counted as idle, if it has been put into C3 or deeper power state (may reflect ACPI C2/C3 states). So to reach maximal effectiveness, some tuning may be needed. Here is my test case: FreeBSD 9-CURRENT on Core i5 650 CPU, 3.2GHz + 1/2 TurboBoost steps (+133/+266MHz) with boxed cooler at the open air. I was measuring building time of the net/mpd5 from sources, using only one CPU core (cpuset -l 0 time make). Untuned system (hz=1000): 14.15 sec Enabled ACPI C2 (hz=1000+C2): 13.85 sec Enabled ACPI C3 (hz=1000+C3): 13.91 sec Reduced HZ (hz=100): 14.16 sec Enabled ACPI C2 (hz=100+C2): 13.85 sec Enabled ACPI C3 (hz=100+C3): 13.86 sec Timers tuned* (hz=100): 14.10 sec Enabled ACPI C2 (hz=100+C2): 13.71 sec Enabled ACPI C3 (hz=100+C3): 13.73 sec All numbers tested few times and are repeatable up to +/-0.01sec. *) Timers were tuned to reduce interrupt rates and respectively increase idle cores sleep time. These lines were added to loader.conf: sysctl kern.eventtimer.timer1=i8254 sysctl kern.eventtimer.timer2=NONE kern.eventtimer.singlemul=1 kern.hz="100" PS: In this case benefit is small, but it is the least that can be achieved, depending on CPU model. Some models allow frequency to be risen by up to 6 steps (+798MHz). PPS: I expect even better effect achieved by further reducing interrupt rates on idle CPUs. -- Alexander Motin From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 17:30:33 2010 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 66FE9106564A for ; Sat, 24 Jul 2010 17:30:33 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4E98FC19 for ; Sat, 24 Jul 2010 17:30:32 +0000 (UTC) Received: by qwk3 with SMTP id 3so1046523qwk.13 for ; Sat, 24 Jul 2010 10:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=NSndOLtx6dFrCtibNbGmOn2fSi09dAGSpCjqWH1NdUA=; b=K4S6ly3V886mYJ14D4of4Mg9gSkOnHR75g18wn2UpgTXJMhIfZzjqSx4GEjPiytecH Cu3vZaA0kF/lDac5tL13FtTDFJEOU9AuVLGAIuL+bhT+ZMylQhA6My9wbEz6EJqf+BlO PE5wUwU+zRnKPY5s9d0jZLTJy6VN7zzP2/Dck= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=KNzBR/j8hvwqBHREV+jSO9q+SHJ0Wsyisqkz+J11+4+O6mDs20W7SB8s6TzpOBch6V nE5qqJccHZv9NA39slAdUx2x3xUP/sF/0lFwIDaLJ51l4PKhV+CERlblvXWH7Xq8WuQ+ RwWflWm650cdavpp+ltCivS/qH80wXWXjc45E= MIME-Version: 1.0 Received: by 10.224.2.85 with SMTP id 21mr4026542qai.74.1279990737006; Sat, 24 Jul 2010 09:58:57 -0700 (PDT) Received: by 10.229.239.5 with HTTP; Sat, 24 Jul 2010 09:58:56 -0700 (PDT) In-Reply-To: <4C4AF046.40507@FreeBSD.org> References: <4C4AF046.40507@FreeBSD.org> Date: Sat, 24 Jul 2010 11:58:56 -0500 Message-ID: From: Alan Cox To: Alexander Motin X-Mailman-Approved-At: Sat, 24 Jul 2010 18:37:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org Subject: Re: Intel TurboBoost in practice X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 17:30:33 -0000 2010/7/24 Alexander Motin > Hi. > > I've make small observations of Intel TurboBoost technology under > FreeBSD. This technology allows Intel Core i5/i7 CPUs to rise frequency > of some cores if other cores are idle and power/thermal conditions > permit. CPU core counted as idle, if it has been put into C3 or deeper > power state (may reflect ACPI C2/C3 states). So to reach maximal > effectiveness, some tuning may be needed. > > [snip] > > PPS: I expect even better effect achieved by further reducing interrupt > rates on idle CPUs. > > I'm currently testing a patch that eliminates another 31% of the global TLB shootdowns for a "buildworld" on an amd64 machine. So, you can expect improvement in this area. Alan From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 18:20:04 2010 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 040A41065670 for ; Sat, 24 Jul 2010 18:20:04 +0000 (UTC) (envelope-from rpaulo@lavabit.com) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id F15308FC1A for ; Sat, 24 Jul 2010 18:20:03 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 553E6157557; Sat, 24 Jul 2010 11:18:57 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id L8XA8AD94AJ4; Sat, 24 Jul 2010 11:18:57 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=l+aMJL/LfnbeJ4XKHCZDtoUzIETWHdqkMTjbIYyf+Y0qEfv22Y87QBYyjw0WbrYy07rcoLBX4xOed9QOiUB0lfuZLIc+hVSHzvtrM5RfOom4LgblcSg2q6ARcDytXCKNOkFNkUjJU2pcVDiljGBn0C++4tJdCn/Bks1Ko26ME8Y=; h=Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <4C4AF046.40507@FreeBSD.org> Date: Sat, 24 Jul 2010 17:18:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4C4AF046.40507@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1081) X-Mailman-Approved-At: Sat, 24 Jul 2010 19:33:54 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org Subject: Re: Intel TurboBoost in practice 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: Sat, 24 Jul 2010 18:20:04 -0000 On 24 Jul 2010, at 14:53, Alexander Motin wrote: > Hi. >=20 > I've make small observations of Intel TurboBoost technology under > FreeBSD. This technology allows Intel Core i5/i7 CPUs to rise = frequency > of some cores if other cores are idle and power/thermal conditions > permit. CPU core counted as idle, if it has been put into C3 or deeper > power state (may reflect ACPI C2/C3 states). So to reach maximal > effectiveness, some tuning may be needed. >=20 > Here is my test case: FreeBSD 9-CURRENT on Core i5 650 CPU, 3.2GHz + = 1/2 > TurboBoost steps (+133/+266MHz) with boxed cooler at the open air. I = was > measuring building time of the net/mpd5 from sources, using only one = CPU > core (cpuset -l 0 time make). >=20 > Untuned system (hz=3D1000): 14.15 sec > Enabled ACPI C2 (hz=3D1000+C2): 13.85 sec > Enabled ACPI C3 (hz=3D1000+C3): 13.91 sec > Reduced HZ (hz=3D100): 14.16 sec > Enabled ACPI C2 (hz=3D100+C2): 13.85 sec > Enabled ACPI C3 (hz=3D100+C3): 13.86 sec > Timers tuned* (hz=3D100): 14.10 sec > Enabled ACPI C2 (hz=3D100+C2): 13.71 sec > Enabled ACPI C3 (hz=3D100+C3): 13.73 sec >=20 > All numbers tested few times and are repeatable up to +/-0.01sec. >=20 > *) Timers were tuned to reduce interrupt rates and respectively = increase > idle cores sleep time. These lines were added to loader.conf: > sysctl kern.eventtimer.timer1=3Di8254 > sysctl kern.eventtimer.timer2=3DNONE > kern.eventtimer.singlemul=3D1 > kern.hz=3D"100" >=20 > PS: In this case benefit is small, but it is the least that can be > achieved, depending on CPU model. Some models allow frequency to be > risen by up to 6 steps (+798MHz). The numbers that you are showing doesn't show much difference. Have you = tried buildworld? >=20 > PPS: I expect even better effect achieved by further reducing = interrupt > rates on idle CPUs. >=20 > --=20 > Alexander Motin > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" >=20 > = __________________________________________________________________________= __________ > Use the link below to report this message as spam. > https://lavabit.com/apps/teacher?sig=3D1225540&key=3D3283483970 > = __________________________________________________________________________= __________ Regards, -- Rui Paulo From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 19:16:20 2010 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 2622B1065673 for ; Sat, 24 Jul 2010 19:16:20 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1C7638FC15 for ; Sat, 24 Jul 2010 19:16:19 +0000 (UTC) Received: by iwn35 with SMTP id 35so1769657iwn.13 for ; Sat, 24 Jul 2010 12:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=x8WrFernJS3ixnlIu0yCG6CERO/SGfoJmJpVQxg4qc4=; b=vzIYX1R8uy+GFctqG53jC9RJnuIggzjOiGbjG7DQ5rFe6Q82bxTOA0mzqMzUA8AQ4/ StTT6gnRpBnj7IKEW1kOQyiJ5QGS0wc/OVOwS9jgGtnD6m+/kbyWcisKpd3aAuaBByA7 cw+d64vTbxSBX/CpZ5IGQkTtjYAnROYGUy+Vs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=C8IaIwN94o+BfH5sJCsbeKRXXbgpgafHg+DkhAdVI/WKkAGjJwphAjcDhGgpLnVX4F GkKTdN+F7VZSSNR3cDmGsTvduyqvAIu9UvHab7/Gk44JLWNNRtzZsJiY574TMiWKKTvY KRbn/vTYpOVhDpt5F1BvWOMWusWb8FZtveul0= MIME-Version: 1.0 Received: by 10.231.184.1 with SMTP id ci1mr6027814ibb.39.1279997130674; Sat, 24 Jul 2010 11:45:30 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.169.18 with HTTP; Sat, 24 Jul 2010 11:45:30 -0700 (PDT) In-Reply-To: References: <4C4AF046.40507@FreeBSD.org> Date: Sat, 24 Jul 2010 11:45:30 -0700 X-Google-Sender-Auth: DYycNkdElj3oewjlwGwek8Qanfw Message-ID: From: Garrett Cooper To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 24 Jul 2010 19:57:35 +0000 Cc: freebsd-hackers@freebsd.org, Alexander Motin , freebsd-performance@freebsd.org Subject: Re: Intel TurboBoost in practice 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: Sat, 24 Jul 2010 19:16:20 -0000 On Sat, Jul 24, 2010 at 9:18 AM, Rui Paulo wrote: > > On 24 Jul 2010, at 14:53, Alexander Motin wrote: > >> Hi. >> >> I've make small observations of Intel TurboBoost technology under >> FreeBSD. This technology allows Intel Core i5/i7 CPUs to rise frequency >> of some cores if other cores are idle and power/thermal conditions >> permit. CPU core counted as idle, if it has been put into C3 or deeper >> power state (may reflect ACPI C2/C3 states). So to reach maximal >> effectiveness, some tuning may be needed. >> >> Here is my test case: FreeBSD 9-CURRENT on Core i5 650 CPU, 3.2GHz + 1/2 >> TurboBoost steps (+133/+266MHz) with boxed cooler at the open air. I was >> measuring building time of the net/mpd5 from sources, using only one CPU >> core (cpuset -l 0 time make). >> >> Untuned system (hz=3D1000): =A0 =A0 14.15 sec >> Enabled ACPI C2 (hz=3D1000+C2): 13.85 sec >> Enabled ACPI C3 (hz=3D1000+C3): 13.91 sec >> Reduced HZ (hz=3D100): =A0 =A0 =A0 =A0 =A014.16 sec >> Enabled ACPI C2 (hz=3D100+C2): =A013.85 sec >> Enabled ACPI C3 (hz=3D100+C3): =A013.86 sec >> Timers tuned* (hz=3D100): =A0 =A0 =A0 14.10 sec >> Enabled ACPI C2 (hz=3D100+C2): =A013.71 sec >> Enabled ACPI C3 (hz=3D100+C3): =A013.73 sec >> >> All numbers tested few times and are repeatable up to +/-0.01sec. >> >> *) Timers were tuned to reduce interrupt rates and respectively increase >> idle cores sleep time. These lines were added to loader.conf: >> sysctl kern.eventtimer.timer1=3Di8254 >> sysctl kern.eventtimer.timer2=3DNONE >> kern.eventtimer.singlemul=3D1 >> kern.hz=3D"100" >> >> PS: In this case benefit is small, but it is the least that can be >> achieved, depending on CPU model. Some models allow frequency to be >> risen by up to 6 steps (+798MHz). > > The numbers that you are showing doesn't show much difference. Have you t= ried buildworld? Agreed. The numbers are small enough that there could be a large degree of variation just based on environmental factors alone; there are other things that go into that as well, such as disk I/O, etc, that probably shouldn't be factored into a CPU performance test. Thanks, -Garrett From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 20:48:02 2010 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 407841065673; Sat, 24 Jul 2010 20:48:02 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Sun, 25 Jul 2010 05:48:01 +0900 From: Norikatsu Shigemura To: Alexander Motin Message-Id: <20100725054801.ffb36259.nork@FreeBSD.org> In-Reply-To: <4C4AF046.40507@FreeBSD.org> References: <4C4AF046.40507@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 24 Jul 2010 21:22:02 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org Subject: Re: Intel TurboBoost in practice 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: Sat, 24 Jul 2010 20:48:03 -0000 Hi mav. On Sat, 24 Jul 2010 16:53:10 +0300 Alexander Motin wrote: > PS: In this case benefit is small, but it is the least that can be > achieved, depending on CPU model. Some models allow frequency to be > risen by up to 6 steps (+798MHz). I tested on Core i7 640UM (Arrandale 1.2GHz -> 2.26GHz) with openssl speed (w/o aesni(4)) and /usr/src/tools/tools/crypto/cryptotest.c (w/ aesni(4)). http://people.freebsd.org/~nork/aesni/aes128cbc-noaesni.pdf [1] http://people.freebsd.org/~nork/aesni/aes128cbc-aesni.pdf [2] [1] $ /usr/bin/cpuset -l$i /usr/bin/openssl speed -elapsed -mr -multi $n aes128-cbc $i = 0 1 2 3 0,1 0,2 0,3 1,2 1,3 2,3 0,1,2 0,1,3 0,2,3 1,2,3 0,1,2,3 $n = numbers of core, $((`echo $i | wc -c`/2)) [2] $ /usr/bin/cpuset -l$i ./cryptotest -t $n -z 50000 8192 $i = 0 1 2 3 0,1 0,2 0,3 1,2 1,3 2,3 0,1,2 0,1,3 0,2,3 1,2,3 0,1,2,3 $n = numbers of core, $((`echo $i | wc -c`/2)) In my environment, according to aes128cbc-noaesni.pdf, at least, 30% performace up by Turbo Boost (I think). And according to aes128cbc-aesni.pdf, at least, 100% performance up by Turbo Boost (I think). And I understand reducing single thread performance by Hyper Threading:-). -- Norikatsu Shigemura From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 22:03:56 2010 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 B8A381065673; Sat, 24 Jul 2010 22:03:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id ECB578FC19; Sat, 24 Jul 2010 22:03:55 +0000 (UTC) Received: by fxm13 with SMTP id 13so6100387fxm.13 for ; Sat, 24 Jul 2010 15:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=bH8L3Uu/0DXElub7Uq7OzmKvMSgl1fQCcm6R+CydrXE=; b=vpb8BwcdPfJhlG2LN3hLVBNgXlEM6cpC9tKKI46NBt3WPvXfrQPfSZbnIfahhMtx8f An+G+23iNma5iUpPqNeDYxOxk0lQK/jThnID0Gqf6U08Suewaq/HAdyyvJMUUg8LtfBi nELX5mwU+NiodG0fBMfzDyWN8lsP3Fjo5OuAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=uSOaHu/f4DqOIB4DEEo9gAPEIGbVBsGL2Ihouis6m0m7A0zaONYoxhoBZbfZWnDyoe qamHRmkY6VbWzAsXBO2AfwMU5S1yBhqVCWuQGS4/T/cAOyrqsaaGtDT7prPXvdMIGHqu 5t0WfFeMKhrKgOoUBek1sR7zlkRNBjtqg9fBw= Received: by 10.86.70.9 with SMTP id s9mr3673877fga.7.1280009034815; Sat, 24 Jul 2010 15:03:54 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r10sm670729faq.29.2010.07.24.15.03.53 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 15:03:54 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4B6347.1070802@FreeBSD.org> Date: Sun, 25 Jul 2010 01:03:51 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Norikatsu Shigemura , freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org References: <4C4AF046.40507@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 24 Jul 2010 22:30:41 +0000 Cc: Subject: Re: Intel TurboBoost in practice 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: Sat, 24 Jul 2010 22:03:56 -0000 Norikatsu Shigemura wrote: > On Sat, 24 Jul 2010 16:53:10 +0300 > Alexander Motin wrote: >> PS: In this case benefit is small, but it is the least that can be >> achieved, depending on CPU model. Some models allow frequency to be >> risen by up to 6 steps (+798MHz). > > I tested on Core i7 640UM (Arrandale 1.2GHz -> 2.26GHz) with > openssl speed (w/o aesni(4)) and > /usr/src/tools/tools/crypto/cryptotest.c (w/ aesni(4)). > > http://people.freebsd.org/~nork/aesni/aes128cbc-noaesni.pdf [1] > http://people.freebsd.org/~nork/aesni/aes128cbc-aesni.pdf [2] > > In my environment, according to aes128cbc-noaesni.pdf, at least, > 30% performace up by Turbo Boost (I think). The numbers are interesting, though they are not proving much, because of many other factors may influence on result. It would be more informative to do the tests with C1 and C2/C3 states used. > And according to aes128cbc-aesni.pdf, at least, 100% performance > up by Turbo Boost (I think). This IMHO is even more questionable. Single, even boosted core shouldn't be faster then 2, 3 and 4. I would say there is some scalability problem. May be context switches, locking, or something else. -- Alexander Motin