Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 2021 10:59:11 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: RPi and powerd, was: Re: RPI4 clock speeds and serial port ( temperatures idle and -j4 buildworld buildkernel )
Message-ID:  <CDE1E924-4EBC-405D-ABC9-C59894B00151@yahoo.com>
In-Reply-To: <C7115179-7D5B-4F7E-8B81-83A35110E35E@yahoo.com>
References:  <FDBC2E89-8473-4C3A-B12E-78821949FDDB@yahoo.com> <20210320005302.GA40542@www.zefox.net> <81CB0CCA-59AC-49A2-9372-4E2C22E3214D@googlemail.com> <20210320155638.GA41617@www.zefox.net> <63E61033-667C-4A08-9012-7D987B652176@yahoo.com> <20210320182821.GA49050@www.zefox.net> <AD8A445A-DF90-4525-8042-EA2A667558FE@yahoo.com> <5BF4DC26-8CCC-48E8-802F-34C42084D47F@yahoo.com> <20210321181339.GA56351@www.zefox.net> <01787975-3D1A-4D28-8F0F-957D6842D487@googlemail.com> <YFnzio4lC/D7ffFh@ceres.zyxst.net> <59B618B3-7AC9-41DF-9807-173DE34B0F8D@yahoo.com> <EA000404-7CDC-4D2A-B0C6-3D6BAC599406@yahoo.com> <70CED341-5638-49EE-A32D-2BD0AC22687C@yahoo.com> <C7115179-7D5B-4F7E-8B81-83A35110E35E@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[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:
>=20
>> On 2021-Mar-23, at 16:15, Mark Millard <marklmi at yahoo.com> wrote:
>>=20
>>> On 2021-Mar-23, at 12:57, Mark Millard <marklmi at yahoo.com> wrote:
>>>>=20
>>>>=20
>>>> On 2021-Mar-23, at 06:56, tech-lists <tech-lists at zyxst.net> =
wrote:
>>>>=20
>>>>> Hi,
>>>>>=20
>>>>> latest build run:
>>>>=20
>>>> Had a -mcpu=3Dcortext-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?
>>>=20
>>> I've started an experimental build in my
>>> -mcpu=3Dcortex-a72 tuned context . . .
>>>=20
>>>>>>>> World built in 22976 seconds, ncpu: 4, make -j6
>>>>> --------------------------------------------------------------
>>>>>=20
>>>>> 6 Hours : 22 Minutes : 56 Seconds
>>>>>=20
>>>>> 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
>>>>> --------------------------------------------------------------
>>>>>=20
>>>>> 0 Hours : 34 Minutes : 46 Seconds
>>>>>=20
>>>>> commands used:
>>>>> 1. cd /usr/src
>>>>> 2. git pull --ff-only
>>>=20
>>> I'm simply from-scratch rebuilding what I'm
>>> already running, based on main 7381bbee29df from
>>> 2021-03-12:
>>>=20
>>> # ~/fbsd-based-on-what-freebsd-main.sh=20
>>> 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
>>>=20
>>>>> 3. make -j10 cleanworld
>>>>> 4. make -j10 cleandir
>>>>> 5. make -j10 clean
>>>=20
>>> My /usr/obj/cortexA72_clang/ was empty at the
>>> start of the buildworld buildkernel .
>>> devel/ccache is still not installed.
>>>=20
>>>> 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.
>>>>=20
>>>>> 6. make -j6 buildworld
>>>>> 7. make -j6 buildkernel
>>>=20
>>> I'm using "-j6 buildworld buildkernel".
>>>=20
>>>>> here's the src.conf :
>>>>> https://cloud.zyxst.net/~john/FreeBSD/rpi4-main/src.conf
>>>=20
>>> 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.)
>>>=20
>>>> I seem to get intermittent access to
>>>> https://cloud.zyxst.net/ but got to
>>>> see the file content eventually.
>>>>=20
>>>>> relevant rc.conf settings:
>>>>> powerd_enable=3D"YES"
>>>>> powerd_flags=3D"-r 1"
>>>=20
>>> 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 .
>>>=20
>>>>> sysctl.conf settings:
>>>>> vfs.read_max=3D128 # default 64 # Cluster read-ahead max block =
count
>>>=20
>>> I added the above line to my /etc/sysctl.conf .
>>>=20
>>>>> config.txt:
>>>>> kernel=3Du-boot.bin
>>>>> over_voltage=3D6
>>>>> arm_freq=3D2000
>>>>> sdram_freq_min=3D3200
>>>=20
>>> Ignoring comment differences, mine matches
>>> for such lines.
>>>=20
>>> I rebooted on the basis of all these changes
>>> before starting the "-j6 buildworld buildkernel"
>>> style build.
>>>=20
>>>> Thanks much for the information.
>>>>=20
>>>=20
>>> 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.
>>>=20
>>=20
>> Summary: Overall somewhat under 9 hrs historically
>> turned into somewhat under 15 hrs 35 min, adding
>> somewhat over 6.5 hours to the time. Not a
>> configuration that I'm likely to generally use.
>>=20
>> The details:
>>=20
>> 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:
>>=20
>> 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
>>=20
>> So a few minutes under 9 hr total for my
>> normal configuration.
>>=20
>> By contrast, for the configuration in this
>> experiment:

Context description correction:
The below was for using neither powerd nor forcing
the arm clock rate: left as u-boot set it. (But
the RAM clock rate was still forced).

>> World build completed on Wed Mar 24 06:10:39 PDT 2021
>> World built in 52030 seconds, ncpu: 4, make -j6
>> Kernel build for GENERIC-NODBG completed on Wed Mar 24 07:16:50 PDT =
2021
>> Kernel(s)  GENERIC-NODBG built in 3971 seconds, ncpu: 4, make -j6
>>=20
>>=20
>> Notes on some of what may be going on here:
>>=20
>> Given the RPi4's memory subsystem and its RAM caching,
>> my first guess is that the -j6 (instead of -j4) leads
>> to the RAM caching being far less effective and so RAM
>> access looks far slower overall, with more waiting for
>> other threads memory activity (memory bus contention).
>>=20
>> In some past experiments, I've seen configurations
>> where -j3 did buildworld buildkernel faster than
>> -j4 : before I started setting the RAM clock rate
>> minimum as well. So this "-jM < -jN" is faster for
>> the smaller M is not a new type of potential
>> conclusion and -j4 (or -j3) vs. -j6 may be another
>> example.
>>=20
>> I've also done a type of benchmarking that saturates
>> what the RPi4 can do --with fewer than 4 cores
>> involved in order to reach saturation in the
>> benchmark.
>>=20
>> (Benchmark on a scale-of-problem and RAM access
>> pattern that makes the RAM caching fairly ineffective.
>> A MACCHIATObin Double Shot also has 4 Cortex-A72
>> cores and does not have this property for the
>> benchmark: different RAM caching. Even runninf the
>> RPi4B and MACCHIATObin Double Shot at the same
>> arm CPU speed, the MACCHIATObin Double Shot takes
>> less time for the same work.)
>>=20
>> So I might retry the build with, say, -j4 but the
>> rest being the same (after clearing out the existing
>> build). That would likely hint at if the hypothesis
>> has a chance of being correct vs. incorrect.
>>=20
>=20
> Turns out that the -j4 buildworld timing almost
> exactly matches -j6 for the type of context:
> buildworld took about 81 sec longer (out of
> somewhat more than 52000 sec). (The 8 GB RPi4B's
> have sufficient RAM to not run out during -j6 .
> 4GB ones might as well. 2GB ones likely would
> runout [swap/page activity].)
>=20
> As similar point goes for buildkernel: around
> 33 sec longer (out of somewhat less than 4000
> seconds).

Context description correction:
The below was for using neither powerd nor forcing
the arm clock rate: left as u-boot set it. (But
the RAM clock rate was still forced).

> World build completed on Thu Mar 25 04:43:53 PDT 2021
> World built in 52111 seconds, ncpu: 4, make -j4
> Kernel build for GENERIC-NODBG completed on Thu Mar 25 05:50:38 PDT =
2021
> Kernel(s)  GENERIC-NODBG built in 4004 seconds, ncpu: 4, make -j4
>=20
> So using -j6 was not an notable improvement over
> using -j4 for the type of context but also was not
> a significant harm either (sufficient RAM present
> to avoid consequences of that type).
>=20



=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CDE1E924-4EBC-405D-ABC9-C59894B00151>