Walt Mankowski via plug on 12 Dec 2021 14:42:26 -0800
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- From: Walt Mankowski via plug <plug@lists.phillylinux.org>
- To: plug@lists.phillylinux.org
- Subject: [PLUG] CPU Scaling
- Date: Sun, 12 Dec 2021 17:41:33 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= mime-version:message-id:date:from:to:subject:content-type; s= sasl; bh=iofBnJ8+UPn+cBJIASXXnhbbDwsphDKvgmcEPtfbwTY=; b=tDDAeGx PhArkpoubNIAvnoLCO3AMqCz40WAcA9Y0/5mtYnSW8dHIqHcfEq4bVxv5++2mfAi MW2I5nHu0hXRMYbWme1p4yxb8PeVFZhM+3WLJmKqMesa+HO4hDOnIzqZ/2r2MgKR 6gH+A1VHoafrniMLaYr1vSjJde41DEWnqi/4=
- Reply-to: Walt Mankowski <waltman@pobox.com>
- Sender: "plug" <plug-bounces@lists.phillylinux.org>
- User-agent: Cyrus-JMAP/3.5.0-alpha0-4514-g2bdc19e04f-fm-20211209.002-g2bdc19e0
Hi,
As usual in December I've been working my way through the awesome
Advent of Code problems. (This year we're saving Christmas by riding around in a submarine. Don't ask.)
While working on
today's problem I noticed that my code ran about twice as fast on my Apple laptop than my Ubuntu desktop, despite the fact that my desktop's CPUs are over 50% faster (3.5 GHz AMD vs 2.3 GHz Intel Core i7). When I looked in
/proc/cpuinfo
I saw that the "cpu MHz" field was only 1400!
I did some searches online and discovered this seems to be due to something called "CPU Scaling". I've looked at /proc/cpuinfo
subsequently and I've also run cpufreq-info(1)
and the numbers vary quite a bit. I'm guessing the system is dynamically adjusting the CPU speed based on the current system load.
I've never noticed this before so I don't know if it's been in effect for a while, or if it's something new in Ubuntu 21.10. I'm not sure yet if I want to keep it or turn it off, but I would like to know more about where it's set and how to tune it. Unfortunately most of the information I've been able to find out about it seems fairly dated and predates Ubuntu's adoption of systemd. Can anyone point me to more up to date information?
Thanks.
Walt
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug