From owner-freebsd-questions@freebsd.org Tue Jul 13 03:17:23 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A37764F00F for ; Tue, 13 Jul 2021 03:17:23 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GP5R63SSqz3pn4 for ; Tue, 13 Jul 2021 03:17:22 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: by mail-pj1-x1035.google.com with SMTP id b8-20020a17090a4888b02901725eedd346so1214913pjh.4 for ; Mon, 12 Jul 2021 20:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HCWs0KE2ipsfv2JEY4T4O8o3gQxyMWOCCcR/B9WmIgY=; b=m6WjzL6rbDpqYYpP9jbnruNbtvHOe7swfA6aeIklx7lBCE10R9ybA1wGkZ+MgErfdM Rsv7XQjdB06TbaNb8A/ZAl/gn8epQaxfz5kHHyC7F8wh/9/ZB8rmfnqMV7BCQWbFTF6S r10pX50red0ivhghJQfZdl7idCShqt8j8ky8cmsWPmgYKhe0HfOwZU8J9pFC23QFcVjH Icyvq6IkjDuAt10GF3qXAVTAoJbl8Q6s3+VXMdK6AoolbBKNkV2qgT3pOG+yRhYvOfCw TB+OXaedJzqgRuCg+KY0IUTVcPQ7vd0VMudHGv9bW3tN5NIr699CjsdC9uRAry92GQa8 8atQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HCWs0KE2ipsfv2JEY4T4O8o3gQxyMWOCCcR/B9WmIgY=; b=bp5Jw1rRc6E+nW6uWYO0++wbI6R+vrxLEMknTo3vsqo8EMlE2rwzu8C5aP8ssIL910 jiB2QesLk0Sb7n212tBgrd4yh9UnurcbNnQje3jryOeP1D12XgNE8LVXjzBD41ebM0yP nLYcRfdLOlDvHp1Ld1pC1nU89bhrn5y14u7KQVXPNIyYyykqF4Oqw+sW+G8nD2RP7AE9 Ec87y0IdFFVCEsKcMJ/HOXLtE0HQg3l1zf2N6Z0oFFsXWsjIvqznzwxfMvYzFgio4Upn gm+l10x/wnBkc+67DZW9D3kdaJS4A5JXL3ZoGoHYAi/w5/nONskV43PHL+ibalu5WAxq 5B8g== X-Gm-Message-State: AOAM531g2hAgIe6YL08s1LAITfSNqB0NDkBDxvS3OGWIluAPt5nUOAOz ssY8zj+AT3UwtjnDLeeq8rzspLXd2FLEu48oOA== X-Google-Smtp-Source: ABdhPJxLOlNt1OshpmDacPdiuVj6tcwk5tFXob1owH7+oDTiCQGzqJbn63Y6LBc6VZT2m6zfe50ykwg3rbCeFoKfO8s= X-Received: by 2002:a17:90b:3617:: with SMTP id ml23mr2104982pjb.236.1626146240926; Mon, 12 Jul 2021 20:17:20 -0700 (PDT) MIME-Version: 1.0 References: <0be4883a-6bf6-28bc-a14b-9cb1f6d729ae@wavecable.com> <4d1e32fc-3e77-626e-138b-6af872445c5e@wavecable.com> In-Reply-To: <4d1e32fc-3e77-626e-138b-6af872445c5e@wavecable.com> From: Paul Procacci Date: Mon, 12 Jul 2021 23:17:09 -0400 Message-ID: Subject: Re: How do I disable CPU throttling To: "Thomas D. Dean" Cc: FreeBSD Questions X-Rspamd-Queue-Id: 4GP5R63SSqz3pn4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=m6WjzL6r; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of pprocacci@gmail.com designates 2607:f8b0:4864:20::1035 as permitted sender) smtp.mailfrom=pprocacci@gmail.com X-Spamd-Result: default: False [-0.47 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::1035:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.53)[-0.526]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::1035:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.05)[0.054]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1035:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 03:17:23 -0000 On Mon, Jul 12, 2021 at 5:01 PM Thomas D. Dean wrote: > On 7/12/21 1:12 PM, Paul Procacci wrote: > > sysctl's get set generally in /etc/sysctl.conf > > > > dev.cpu.0.freq_levels <-- This format is called a mib in the native > > parlance. > > sysctl.conf(5) and sysctl(8) go into much further detail. > > > > ~Paul > > > > grep -Rail freq_levels /etc/* > shows the source of freq_levels > > I believe this is hardwired somewhere. Maybe read from the cpu? BIOS? > > Most mib's have defaults. They are compiled into the kernel statically or made available to it via kernel modules. What you are looking for is located in this source file: /usr/src/sys/kern/kern_cpu.c Really though, I can tell that's way too much for ya. Instead what you are looking to do is detailed in rc.conf(5): " powerd_enable (bool) If set to "YES", enable the system power control facility with the powerd(8) daemon." AND " performance_cpu_freq (str) CPU clock frequency to use while on AC power. The string "LOW" indicates that cpufreq(4) should use the lowest frequency available while "HIGH" indicates that the highest frequency (less power savings) should be used." What you want to most likely do is the following: echo powerd_enable=\"YES\" >> /etc/rc.conf echo performance_cpu_freq=\"HGH\" >> /etc/rc.conf Follow that up by restarting the powerd daemon: /etc/rc.d/powerd restart If you have a supported cpu, which I have no reason to believe otherwise, your goal of running your machine at full speed without throttling should be within your grasp. powerd, a userland daemon, controls this mib as necessary on the fly. rc.conf(5) is a godsend for stuff like this and its documentation is amazing. On another note, I see no reason to change this at all. CPU's are nearly instantaneous at scaling as necessary to accomodate loads for their needs. I digress however. Take Care.