From owner-freebsd-current@FreeBSD.ORG Mon Nov 8 12:10:13 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A090B1065673 for ; Mon, 8 Nov 2010 12:10:13 +0000 (UTC) (envelope-from admin@kkip.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id E50168FC14 for ; Mon, 8 Nov 2010 12:10:12 +0000 (UTC) Received: from static-78-8-144-74.ssp.dialog.net.pl ([78.8.144.74] helo=[192.168.0.2]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1PFQAX-000HDD-Jj for freebsd-current@freebsd.org; Mon, 08 Nov 2010 12:45:58 +0100 Message-ID: <4CD7E2EB.1070708@kkip.pl> Date: Mon, 08 Nov 2010 12:45:47 +0100 From: Bartosz Stec User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100702 Lanikai/3.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org X-Authenticated-User: admin@kkip.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -8.6 X-Spam-Score-Int: -85 X-Exim-Version: 4.72 (build at 10-Jun-2010 13:05:33) X-Date: 2010-11-08 12:45:58 X-Connected-IP: 78.8.144.74:65108 X-Message-Linecount: 192 X-Body-Linecount: 182 X-Message-Size: 7846 X-Body-Size: 7460 X-Received-Count: 1 X-Recipient-Count: 1 X-Local-Recipient-Count: 1 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: powerd vs network throughput X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 12:10:13 -0000 Hello. I'm using r214746 FreeBSD system as a home fileserver/router, with athlon xp mobile onboard: CPU: mobile AMD Athlon(tm) XP 2200+ (1800.10-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x681 Family = 6 Model = 8 Stepping = 1 Features=0x383fbff AMD Features=0xc0480800 I've set powerd in rc.conf: powerd_enable="YES" powerd_flags="-a hadp -b hadp -n max" And it seems to work as intended: # sysctl -a | grep cpu kern.ccpu: 0 kern.sched.cpusetsize: 4 kern.smp.cpus: 1 kern.smp.maxcpus: 1 net.inet.tcp.per_cpu_timers: 0 debug.cpufreq.verbose: 0 debug.cpufreq.lowest: 0 hw.ncpu: 1 hw.acpi.cpu.cx_lowest: C1 security.jail.param.cpuset.id: 0 dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.CPU1 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq: 787 dev.cpu.0.freq_levels: 1800/-1 1687/-1 1575/-1 1462/-1 1350/-1 1237/-1 1125/-1 1012/-1 900/-1 787/-1 675/-1 562/-1 450/-1 337/-1 225/-1 112/-1 dev.cpu.0.cx_supported: C1/0 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% last 834us dev.acpi_throttle.0.%parent: cpu0 dev.cpufreq.0.%driver: cpufreq dev.cpufreq.0.%parent: cpu0 PC is connected to home network via 3Com NIC: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xec00-0xec7f mem 0xdfffff80-0xdfffffff irq 17 at device 6.0 on pci0 miibus0: on xl0 xlphy0: <3Com internal media interface> PHY 0 on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xlphy1: <3Com internal media interface> PHY 24 on miibus0 xlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: Ethernet address: 00:50:da:d8:23:cd # ifconfig xl0 xl0: flags=8843 metric 0 mtu 1500 options=82009 ether 00:50:da:d8:23:cd inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 inet6 fe80::250:daff:fed8:23cd%xl0 prefixlen 64 scopeid 0x1 nd6 options=29 media: Ethernet autoselect (100baseTX ) status: active Now here's the problem: When I try to write a file on a samba share on this PC while it's idle, I got ridiculous throughput like 6-120kB/s on 100Mbit link, but If machine is busy, speed increase to 5-6 MB/s. It seems that throughput is limited by CPU frequency and powerd doesn't increase cpu frequency level in this case (I suppose that if CPU is set at very low frequency, it's dealing mostly with interrupt requests from NIC). Is it expected behaviour? I hope not because it makes powerd useless on fileserver ;) If it's worth anything this is ZFS-only RAIDZ system with 1GB RAM. -- Bartosz Stec