From owner-freebsd-amd64@FreeBSD.ORG Fri May 31 16:44:27 2013 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BD050EEF for ; Fri, 31 May 2013 16:44:27 +0000 (UTC) (envelope-from k.oikonomou@att.net) Received: from nm7.access.bullet.mail.mud.yahoo.com (nm7.access.bullet.mail.mud.yahoo.com [66.94.237.208]) by mx1.freebsd.org (Postfix) with ESMTP id 65279F27 for ; Fri, 31 May 2013 16:44:27 +0000 (UTC) Received: from [66.94.237.193] by nm7.access.bullet.mail.mud.yahoo.com with NNFMP; 31 May 2013 16:38:33 -0000 Received: from [98.139.221.48] by tm4.access.bullet.mail.mud.yahoo.com with NNFMP; 31 May 2013 16:38:33 -0000 Received: from [127.0.0.1] by smtp101.sbc.mail.bf1.yahoo.com with NNFMP; 31 May 2013 16:38:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1370018313; bh=zb1mQ9Q91fnADkZ8tIZZjvRJYiLU4jjhjx7NvA2TxtA=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:Organization:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type; b=okzQ5cXXVhxFLwf/qJUjX2S+Wcct+DheUxsqzjcGEDCun1yGy+rn6E73GcU4eIU/fgdZvglvGRZssRwMxrlDq1ZYLWHyN27gT3uLXR6PFwOmgdYiJUhFmAbfBuFJmgshyTsrzvRjHq2+WfFe3xGUpNqJfbWOU2CYCg1zTVeIrQ8= X-Yahoo-Newman-Id: 36217.94842.bm@smtp101.sbc.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 7RKogu0VM1k34lvSRDt7IPRpH6KrABV6tF6ukebgD14LmBH PC8pUrg0EMbycKJdqIZ4cXH7G4_PLhu.4L77s2wAdfOnq_rO6XAwi5WV2nuy Cod4u27oXzX0MTI37VO1TM0OYIqdJfWFe.hFewiHOxRJ5CjQHM4FXRt56_jJ eq3lt.lZWV7k1XqeLnKuIP6stYdw02jIaCVKOQK8IdkTj3eQZfU4MzCO9H8I YvVxLPVObArAtmPH03jO2sEQLnnt7v15GFT3IVluauaHrwCsl1tmlij1hyJl FsbgvtpjvWIddFlLunmMkI69E7D5x6hAXpOYf9wtnqEetNKOaGPQ6F7u5vKR GCwTDiT8pLXHGX.ONC4PQAVyDGlLgV27DvfGHdWU70lN2kivKnTOzFqFLH7W zsB3_mo2F8EBL_zQgi5IgAduHv.DX89h22ntzQhONiU4lysQ0G_u_1naJI7t mBTRwLiL28NY38aAJSrioI97doiub9bA- X-Yahoo-SMTP: dQDeuIqswBBZlqxPL_idatjeqZFsZlQC4MQ5I3DYpsI- X-Rocket-Received: from [135.207.130.55] (k.oikonomou@135.207.130.55 with plain) by smtp101.sbc.mail.bf1.yahoo.com with SMTP; 31 May 2013 09:38:32 -0700 PDT Message-ID: <51A8D208.2040702@att.net> Date: Fri, 31 May 2013 12:38:32 -0400 From: Kostas Oikonomou Organization: Home User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130407 Thunderbird/17.0.5 MIME-Version: 1.0 To: John Baldwin Subject: Re: idle process keeping cpu 150% busy in freebsd 9.1-amd64 References: <51A7B693.8050705@att.net> <201305310836.02815.jhb@freebsd.org> <51A8B806.5090100@att.net> <201305311127.13846.jhb@freebsd.org> In-Reply-To: <201305311127.13846.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-amd64@freebsd.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 May 2013 16:44:27 -0000 John, Thanks. I am trying your suggestions on my Dell laptop (Intel Core i7, 4 cores). First off, my /etc/rc.conf already had ------------------------------------------------------------------------ # powerd: adaptive speed while on AC power, adaptive while on battery power powerd_enable="YES" powerd_flags="-a hiadaptive -b adaptive" # set CPU frequency ------------------------------------------------------------------------ and powerd was running. With that, the output of sysctl was like what you sent (the default). Now my /etc/rc.conf reads ------------------------------------------------------------------------ # powerd: adaptive speed while on AC power, adaptive while on battery power powerd_enable="YES" powerd_flags="-a hiadaptive -b adaptive" # set CPU frequency # per John Baldwin email performance_cx_lowest=LOW ------------------------------------------------------------------------ and I rebooted. This is what sysctl shows now: [ko@hui-neng ~]$ sysctl dev.cpu | grep cx_ dev.cpu.0.cx_supported: C1/3 C2/205 C3/245 dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_usage: 18.65% 3.89% 77.44% last 2564us dev.cpu.1.cx_supported: C1/3 C2/205 C3/245 dev.cpu.1.cx_lowest: C3 dev.cpu.1.cx_usage: 18.05% 3.42% 78.52% last 2426us dev.cpu.2.cx_supported: C1/3 C2/205 C3/245 dev.cpu.2.cx_lowest: C3 dev.cpu.2.cx_usage: 16.73% 3.63% 79.62% last 6272us dev.cpu.3.cx_supported: C1/3 C2/205 C3/245 dev.cpu.3.cx_lowest: C3 dev.cpu.3.cx_usage: 15.78% 3.42% 80.78% last 2413us But still one core is at 400%, and the fan started running: [ko@hui-neng ~]$ ps -aux | head USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 11 398.0 0.0 0 64 ?? RL 12:28PM 5:24.77 [idle] root 0 0.0 0.1 0 2832 ?? DLs 12:28PM 0:00.54 [kernel] root 1 0.0 0.0 6276 416 ?? SLs 12:28PM 0:00.05 /sbin/init -- root 2 0.0 0.0 0 16 ?? DL 12:28PM 0:00.00 [crypto] root 3 0.0 0.0 0 16 ?? DL 12:28PM 0:00.00 [crypto return root 4 0.0 0.0 0 16 ?? DL 12:28PM 0:00.00 [ctl_thrd] root 5 0.0 0.0 0 16 ?? DL 12:28PM 0:00.00 [cbb0 event th root 6 0.0 0.0 0 16 ?? IL 12:28PM 0:00.00 [fw0_probe] root 7 0.0 0.0 0 96 ?? DL 12:28PM 0:00.02 [zfskern] [ko@hui-neng ~]$ Kostas On 05/31/2013 11:27, John Baldwin wrote: > On Friday, May 31, 2013 10:47:34 am Kostas Oikonomou wrote: >> Thanks very much for the reply. >> >> Being new to FreeBSD, this still seems weird to me. (My >> background is Solaris.) >> >> On both machines, the core that's running at 150% in the >> case of the HP machine, and at 400% in the case >> of the Dell laptop, is causing the fans to come on. Would >> you call that "idle"? I'm worried that the cores will >> eventually be damaged. > Do you have deeper Cx states enabled? By default FreeBSD will only enter C1. > Try setting 'performance_cx_lowest=LOW' in /etc/rc.conf and either rebooting > or running '/etc/rc.d/power_profile start' to see if that helps. You can see > which Cx states are being used by running 'sysctl dev.cpu | grep cx_'. For > example: > > dev.cpu.0.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.0.cx_lowest: C1 > dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 324us > dev.cpu.1.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.1.cx_lowest: C1 > dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 300us > dev.cpu.2.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.2.cx_lowest: C1 > dev.cpu.2.cx_usage: 100.00% 0.00% 0.00% last 192us > dev.cpu.3.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.3.cx_lowest: C1 > dev.cpu.3.cx_usage: 100.00% 0.00% 0.00% last 157us > > This is on a machine with the default setup. After changing it to use the > lowest setting: > > dev.cpu.0.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.0.cx_lowest: C3 > dev.cpu.0.cx_usage: 5.84% 92.86% 1.28% last 145us > dev.cpu.1.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.1.cx_lowest: C3 > dev.cpu.1.cx_usage: 0.99% 94.92% 4.08% last 293us > dev.cpu.2.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.2.cx_lowest: C3 > dev.cpu.2.cx_usage: 0.45% 88.50% 11.04% last 174us > dev.cpu.3.cx_supported: C1/3 C2/59 C3/93 > dev.cpu.3.cx_lowest: C3 > dev.cpu.3.cx_usage: 6.40% 86.89% 6.69% last 203us > > Another option is to run powerd which will throttle your CPUs down to lower > clock speeds when they are idle. You can enable this by setting > powerd_enable="YES" in /etc/rc.conf and running '/etc/rc.d/powerd start'. >