RPi and powerd, was: Re: RPI4 clock speeds and serial port ( temperatures idle and -j4 buildworld buildkernel )
Mark Millard
marklmi at yahoo.com
Fri Mar 26 20:00:36 UTC 2021
On 2021-Mar-26, at 01:33, Mark Millard <marklmi at yahoo.com> wrote:
> On 2021-Mar-25, at 18:18, Mark Millard <marklmi at yahoo.com> wrote:
>
>> [Eliminating bad history and replacing with test
>> information from corrected context, just -j6 for
>> now.]
>>
>> On 2021-Mar-25, at 10:59, Mark Millard <marklmi at yahoo.com> wrote:
>>
>>> [Turns out I somehow ended up with /etc/rc.conf not edited
>>> to enable powerd : that is what I found when I went back
>>> to disable it. Now I get to re-run the tests.]
>>>
>>> On 2021-Mar-25, at 10:23, Mark Millard <marklmi at yahoo.com> wrote:
>>>
>>>> On 2021-Mar-24, at 14:13, Mark Millard <marklmi at yahoo.com> wrote:
>>>>
>>>>> On 2021-Mar-23, at 16:15, Mark Millard <marklmi at yahoo.com> wrote:
>>>>>
>>>>>> On 2021-Mar-23, at 12:57, Mark Millard <marklmi at yahoo.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021-Mar-23, at 06:56, tech-lists <tech-lists at zyxst.net> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> latest build run:
>>>>>>>
>>>>>>> Had a -mcpu=cortext-a72 world and kernel been
>>>>>>> installed and booted first? Was the system
>>>>>>> running a world and kernel that had not been
>>>>>>> tuned for the Cortex-A72?
>>>>>>
>>>>>> I've started an experimental build in my
>>>>>> -mcpu=cortex-a72 tuned context . . .
>>>>>>
>>>>>>>>>>> World built in 22976 seconds, ncpu: 4, make -j6
>>>>>>>> --------------------------------------------------------------
>>>>>>>>
>>>>>>>> 6 Hours : 22 Minutes : 56 Seconds
>>>>>>>>
>>>>>>>> created kernel.bin from kernel.full
>>>>>>>> --------------------------------------------------------------
>>>>>>>>>>> Kernel build for GENERIC-NODEBUG completed on Mon Mar 22 13:54:53
>>>>>>>>>>> UTC 2021
>>>>>>>> --------------------------------------------------------------
>>>>>>>>>>> Kernel(s) GENERIC-NODEBUG built in 2086 seconds, ncpu: 4, make -j6
>>>>>>>> --------------------------------------------------------------
>>>>>>>>
>>>>>>>> 0 Hours : 34 Minutes : 46 Seconds
>>
>> Based on the later results reported, I get a build that
>> takes a little less time for buildworld+buildkernel, a
>> build that does not involve devel/ccache .
>>
>> So it could be that devel/cache had an empty cache for
>> your build for all I can tell from the timing information.
>>
>>>>>>>> commands used:
>>>>>>>> 1. cd /usr/src
>>>>>>>> 2. git pull --ff-only
>>>>>>
>>>>>> I'm simply from-scratch rebuilding what I'm
>>>>>> already running, based on main 7381bbee29df from
>>>>>> 2021-03-12:
>>>>>>
>>>>>> # ~/fbsd-based-on-what-freebsd-main.sh
>>>>>> merge-base: 7381bbee29df959e88ec59866cf2878263e7f3b2
>>>>>> merge-base: CommitDate: 2021-03-12 20:29:42 +0000
>>>>>> def0058cc690 (HEAD -> mm-src) mm-src snapshot for mm's patched build in git context.
>>>>>> 7381bbee29df (freebsd/main, freebsd/HEAD, pure-src, main) cam: Run all XPT_ASYNC ccbs in a dedicated thread
>>>>>> FreeBSD RPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT mm-src-n245445-def0058cc690 GENERIC-NODBG arm64 aarch64 1400005 1400005
>>>>>>
>>>>>>>> 3. make -j10 cleanworld
>>>>>>>> 4. make -j10 cleandir
>>>>>>>> 5. make -j10 clean
>>>>>>
>>>>>> My /usr/obj/cortexA72_clang/ was empty at the
>>>>>> start of the buildworld buildkernel .
>>>>>> devel/ccache is still not installed.
>>>>>>
>>>>>>> This does not show ccache being cleared out
>>>>>>> before the below. So the times may be examples
>>>>>>> of "with ccache benefit" times. The contrast
>>>>>>> with mine and Bob P.'s times suggests a
>>>>>>> nice time-benefit can occur.
>>>>>>>
>>>>>>>> 6. make -j6 buildworld
>>>>>>>> 7. make -j6 buildkernel
>>>>>>
>>>>>> I'm using "-j6 buildworld buildkernel".
>>>>>>
>>>>>>>> here's the src.conf :
>>>>>>>> https://cloud.zyxst.net/~john/FreeBSD/rpi4-main/src.conf
>>>>>>
>>>>>> I'm using my normal src.conf equivalent, not
>>>>>> yours. (So the experiment is comparable to my
>>>>>> normal past experiments in this respect, matching
>>>>>> what I've reported in the past.)
>>>>>>
>>>>>>> I seem to get intermittent access to
>>>>>>> https://cloud.zyxst.net/ but got to
>>>>>>> see the file content eventually.
>>>>>>>
>>>>>>>> relevant rc.conf settings:
>>>>>>>> powerd_enable="YES"
>>>>>>>> powerd_flags="-r 1"
>>>>>>
>>>>>> I commented out the config.txt line that assigned
>>>>>> arm_freq_min and the /etc/sysctl/conf line that
>>>>>> assigned an arm frequency.
>>>
>>> I get to retry, attempting to actually do what I said
>>> I'd done for powerd enabling . . . I've rebooted and
>>> verified powerd now shows with the appropriate command
>>> line in top. So I've cleared things out in
>>> /usr/obj/cortexA72_clang/ and started a -j6 experiment
>>> as the first one.
>>>
>>>>>> I put the 2 powerd_* lines above in my /etc/rc.conf .
>>>>>>
>>>>>>>> sysctl.conf settings:
>>>>>>>> vfs.read_max=128 # default 64 # Cluster read-ahead max block count
>>>>>>
>>>>>> I added the above line to my /etc/sysctl.conf .
>>>>>>
>>>>>>>> config.txt:
>>>>>>>> kernel=u-boot.bin
>>>>>>>> over_voltage=6
>>>>>>>> arm_freq=2000
>>>>>>>> sdram_freq_min=3200
>>>>>>
>>>>>> Ignoring comment differences, mine matches
>>>>>> for such lines.
>>>>>>
>>>>>> I rebooted on the basis of all these changes
>>>>>> before starting the "-j6 buildworld buildkernel"
>>>>>> style build.
>>>>>>
>>>>>>> Thanks much for the information.
>>>>>>>
>>>>>>
>>>>>> So, 6..10(?) of hours from when the
>>>>>> build started I should have time frames
>>>>>> to report for a "no ccache benefit"
>>>>>> build to compare to my past reported
>>>>>> build times.
>>>>>>
>>
>> With powerd actually enabled ("-r 1") this time . . .
>>
>> -j6 summary: Overall somewhat under 9 hrs historically
>> for -j4 in my non-powerd configuration turned into
>> somewhat under 6 hrs 45 min for -j6 in the test powerd
>> configuration, somewhat over 2 hr 10 min faster.
>>
>> I plan on a -j4 test in the context as well.
>
> -j4 summary: somewhat under 6 hrs 45 min for -j4 in the
> powerd configuration but just a little longer than -j6 .
> In more detail: a little over 4 min longer than -j6 .
>
> I plan on a -j4 build without the vfs.read_max=128
> as the next test of a related context.
-j4 without vfs.read_max=128 summary: somwhat under
6 hrs 50 min total for the powerd configuration.
In more detail: a little over 7 min longer than -j6
with vfs.read_max=128 took.
I plan on a non-powerd test but with force_turbo=1
in config.txt (but not arm_freq_min) for -j4
without vfs.read_max=128. So config.txt will have
for overclocking:
over_voltage=6
arm_freq=2000
sdram_freq_min=3200
force_turbo=1
In /etc/sysctl.conf it will use:
dev.cpu.0.freq=2000
(Although that might not be necessary.)
I'll note that one of the RPi
engineers/forum-monitors reported in a reply
that they do not set the overclock warranty bit
for RPi4s, allowing experimenting with over_voltage
and force_turbo together. See:
https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=283911&p=1719405
>> The -j6 details . . .
>> (builds are via a EtherNet ssh session)
>>
>> First a reminder of the prior timing that I
>> reported for my normal configuration of my
>> normal -j4 buildworld buildkernel in my
>> usual overclocking style:
>>
>> World build completed on Thu Mar 11 18:39:37 PST 2021
>> World built in 29780 seconds, ncpu: 4, make -j4
>> Kernel build for GENERIC-NODBG completed on Thu Mar 11 19:18:02 PST 2021
>> Kernel(s) GENERIC-NODBG built in 2305 seconds, ncpu: 4, make -j4
>>
>> So a few minutes under 9 hr total for my
>> normal configuration.
>>
>> By contrast, for the -j6 powerd configuration in this
>> experiment:
>>
>> World build completed on Thu Mar 25 16:52:56 PDT 2021
>> World built in 22324 seconds, ncpu: 4, make -j6
>> Kernel build for GENERIC-NODBG completed on Thu Mar 25 17:21:16 PDT 2021
>> Kernel(s) GENERIC-NODBG built in 1700 seconds, ncpu: 4, make -j6
>>
>> So somewhat under 6 hrs 45 min. Nice!
>> (It is a little bit faster than the total for
>> the build times that you reported.)
>>
>> Interestingly, after the build and some idle time
>> I see no evidence of the CPUs being slowed down:
>>
>> # sysctl dev.cpu.0.freq
>> dev.cpu.0.freq: 2000
>>
>> # sysctl hw.cpufreq.arm_freq
>> hw.cpufreq.arm_freq: 2000000000
>>
>> For reference: the cpu's had definitely cooled
>> (from the low 50C's range):
>>
>> # sysctl hw.cpufreq.temperature
>> hw.cpufreq.temperature: 37447
>>
>> # sysctl dev.cpu.0.temperature
>> dev.cpu.0.temperature: 36.4C
>>
>> Also:
>>
>> # sysctl dev.bcm2835_cpufreq.0.freq_settings
>> dev.bcm2835_cpufreq.0.freq_settings: 2000/-1 600/-1
>>
>> # sysctl dev.cpu.0.freq_levels
>> dev.cpu.0.freq_levels: 2000/-1 600/-1
>>
>> [Fedora gives a much longer list (in other
>> units) when the minimum is not forced:
>> int f over 6<=f<=20: (f*100)*1MHz . But, as
>> I remember, other linux OS's gave an even
>> different list. Seems to be a choice as to
>> what possibilities to expose of many
>> that can be set up.]
>>
>> I note that sysctl reports:
>>
>> # sysctl hw.cpufreq.turbo
>> hw.cpufreq.turbo: 1
>>
>> I'm not sure of the value that shows up in in my normal
>> configuration but I do not explicitly set it in any
>> configuration.
>>
>>
>> FYI: my modified version of top reported Maximum
>> Observed for Active+Wired of: 3468Mi MaxObs(Act+Wir),
>> suggesting that a 4 GiByte RPi4B might be a little
>> constrained at some point(s) in the build by the more
>> limited RAM and 2 GiByte RPi4B's or less would be
>> constrained for sure.
>>
>
> The -j4 details . . .
> (builds are via a EtherNet ssh session)
> (I reboot before testing)
>
> World build completed on Fri Mar 26 00:44:13 PDT 2021
> World built in 22552 seconds, ncpu: 4, make -j4
> Kernel build for GENERIC-NODBG completed on Fri Mar 26 01:12:48 PDT 2021
> Kernel(s) GENERIC-NODBG built in 1715 seconds, ncpu: 4, make -j4
>
> So somewhat under 6 hrs 45 min. Nice!
> (It is a little bit faster than the total for
> the build times that you reported.)
>
> The sysctl value information is similar to what it
> was for -j16, not repeated here.
>
> FYI: my modified version of top reported Maximum
> Observed for Active+Wired of: 2589Mi MaxObs(Act+Wir),
> suggesting that a 2 GiByte RPi4B would be somewhat
> constrained at some point(s) in the build by the more
> limited RAM but a 4 GiByte one would not. (Memory use
> is a -j4 vs -j6 tradeoff.)
The -j4 without vfs.read_max=128 details . . .
(builds are via a EtherNet ssh session)
(I reboot before testing, first doing rm -fr /usr/obj/cortexA72_clang/* )
(USB3 SSD media)
World build completed on Fri Mar 26 08:25:00 PDT 2021
World built in 22738 seconds, ncpu: 4, make -j4
Kernel build for GENERIC-NODBG completed on Fri Mar 26 08:53:31 PDT 2021
Kernel(s) GENERIC-NODBG built in 1711 seconds, ncpu: 4, make -j4
So somewhat under 6 hr 50 min.
FYI: my modified version of top reported Maximum
Observed for Active+Wired of: 2920Mi MaxObs(Act+Wir),
indicating that a 2 GiByte RPi4B would be somewhat
constrained at some point(s) in the build by the more
limited RAM but a 4 GiByte one would not. This is
somewhat more than -j4 with vfs.read_max=128 used.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-arm
mailing list