Received: from sonic316-11.consmr.mail.bf2.yahoo.com (sonic316-11.consmr.mail.bf2.yahoo.com [74.6.130.121]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 33C23225A98 for <~alpine/users@lists.alpinelinux.org>; Tue, 1 Oct 2024 12:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1727787104; bh=suxjQ1EQBLhIdlztuVXSCSXD+AEUq2bMsV3EOgRipDA=; h=References:In-Reply-To:From:Date:Subject:To:From:Subject:Reply-To; b=iI2eb2AvzokRTueMi7hpKT/SePLQFiWJSIVV5/Yt2JpiTgY7h287ivXg17LeKZEDsL+8ckmQ/JkjKQjfuULYiggaJ3sWG2Knf1ivK5ye8kO7vmoq/2kXb/fNc5FBn0mhjsP8geTS8WS/NI9gea5gRH4m80FdtcGKWOax4waAzWAv24eUu+HRPk+c1nsL4AeHMh1YX7fxojkzMM7plyoUfU9rykiN2ibH0peqZXF9lgZhBxjBcXllnJLV8HYPi6szh4YonB3BYkjlisPbrkIpA8Wq2Ija4SvR6onn8EjsvvguEuj/SrrtLktxhZi+vhonjBoL4RXg9RIPs+rh0jWITA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1727787104; bh=m5WptLmOHQyOn1n7JxAVHj647wz3GaGgutg2bXBY3Cg=; h=X-Sonic-MF:From:Date:Subject:To:From:Subject; b=kSwO3WjmPMkpRBPhLp7Qjx9Vf3pQmHeHat8XZUDkKpGpmhCeO9DpkuK5lkj2CBONe+mj98GzRrC3r+cBpn+PVUM9e9Bhwv+sEjQduCRcAj1dhr7/Vs1TymRQDHk76yiuAGZcmdiCwtVfXHs/oE7iQy9zvUSoYntaXyeQIlXiS4iEMCMyKJ4z4X/LA4fer/YspZ1LMMhLzhnd5i8/Iw7u4+pqF+z+xVqmGJ0rkT9+6I62UU1zzWrMIDtd/ukuv8VqsywnyeTX/fc4pA5I3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IWN1ksP2MkLTqyDgbXKBGTY7hQ4GFCHedVh_riYqD7kTkBLSvqpeZC9eCuLcohbc7B9LoY OWTTBR_HdpeRolsbq1dz_9EgYiYHAG2tKUN9ANbVKGsVmwOqEXjEUQHvvKxvxsMIorwp6rd4NPb8 Jhv88xITXwCPxqGXjHHWge6E4JshoeIKJgoD0ISmRNlySPnOOgZds9pIVlwMe5MwN9WHt2jLOdU7 FPIo7o_iZSU3tr1P647wipz1NSfoWnuJ4PIbELyqbmzc2z.orzE0JbiqkVlQFys9smhfAl6_sCV7 zc3s- X-Sonic-MF: X-Sonic-ID: 64d21720-15d9-4935-ae4d-bfee4ce94ee7 Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Tue, 1 Oct 2024 12:51:44 +0000 Received: by hermes--production-ir2-6664f499fc-l95lq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 38b070511604facb072e2e59c673d6e1; Tue, 01 Oct 2024 12:51:38 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-53992157528so2702091e87.2 for <~alpine/users@lists.alpinelinux.org>; Tue, 01 Oct 2024 05:51:38 -0700 (PDT) X-Gm-Message-State: AOJu0Yyi/omDrF7sPcePyU8WZYJHFjr3204chQLzTeQzz9qK3fVhpGZ1 xF0Btv95Yucd6BFi2qTuMJp5Zs1F6oc2V+3cbCqI/WYb3qFN2g3kQifpQtr4GRGrwyT0iZVkmLW 81Peg1UlRBi2JQb2MJZ/0mlodFA== X-Google-Smtp-Source: AGHT+IEUy2E2YnbmRnw6FZ8zY6/jsIYxXZgMbAt+ORexMYSwSsGTMIw4SjUrGMxSohIpAvfeUuKSkDe0PBFpPe8h/W0= X-Received: by 2002:a05:6512:3b99:b0:52e:e3c3:643f with SMTP id 2adb3069b0e04-5389fc30fcbmr8066281e87.2.1727787097087; Tue, 01 Oct 2024 05:51:37 -0700 (PDT) MIME-Version: 1.0 References: <20240930202728._Cgmke2m@steffen%sdaoden.eu> In-Reply-To: From: Jerome Marc Date: Tue, 1 Oct 2024 14:51:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: freeze / connection delay after idling for a while ? To: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="0000000000002b71d1062369c865" X-Mailer: WebService/1.1.22645 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo --0000000000002b71d1062369c865 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok I found the culprit. It was a network issue. The problem was happening when initiating the connection from a wlan which is bridged with the wired lan. For some reason, my Internet router forgets the presence of the RPI. Therefore IP address resolution can be slow. I suppose it's because there is no traffic coming from the RPI. I installed the avahi daemon, I think it will make the RPI visible continuously. Le lun. 30 sept. 2024 =C3=A0 23:20, Jerome Marc a =C3= =A9crit : > Hi Steffen, > > Thanks ! > Unfortunately there is cpupower rc service running and I don't have wifi. > I installed cpupower and got this output : > > alpine:~# cpupower frequency-info > analyzing CPU 0: > driver: cpufreq-dt > CPUs which run at the same hardware frequency: 0 1 2 3 > CPUs which need to have their frequency coordinated by software: 0 1 2 = 3 > maximum transition latency: Cannot determine or is not supported. > hardware limits: 600 MHz - 900 MHz > available frequency steps: 600 MHz, 700 MHz, 800 MHz, 900 MHz > available cpufreq governors: conservative ondemand userspace performanc= e > schedutil > current policy: frequency should be within 600 MHz and 900 MHz. > The governor "schedutil" may decide which speed to use > within this range. > current CPU frequency: 600 MHz (asserted by call to hardware) > > Looks good... > > Le lun. 30 sept. 2024 =C3=A0 22:27, Steffen Nurpmeso = a > =C3=A9crit : > >> Jerome Marc wrote in >> : >> |I just installed Alpine 3.20.3 on a RPI 2 in diskless mode.(headless, >> |minimal installation) >> | >> |I noticed that if I let the device idling, I have a few seconds latenc= y >> |when I try to connect the machine with SSH for example. Even when >> connected >> |I can have my SSH session frozen for a few seconds if I do nothing in >> the >> |terminal. >> |I notice the same when using a nodejs app (HTTP) therefore this is a >> |general thing (not just about SSH) >> | >> |I don't see anything weird in logs. Any idea ? Is that a power saving >> |feature ? >> >> It *could* be that cpupower-openrc is indeed the >> tools/power/cpupower of the linux kernel sources, it seems to be >> widely available (architecture-wise, on Alpine). >> If that is so, then running it should output stuff like >> >> #?0|kent:~# bin/cpupower.sh >> analyzing CPU 0: >> driver: intel_pstate >> CPUs which run at the same hardware frequency: 0 >> CPUs which need to have their frequency coordinated by software: 0 >> maximum transition latency: Cannot determine or is not supported. >> hardware limits: 400 MHz - 3.40 GHz >> available cpufreq governors: performance powersave >> current policy: frequency should be within 400 MHz and 3.40 GHz. >> The governor "powersave" may decide which speed to u= se >> within this range. >> current CPU frequency: Unable to call hardware >> current CPU frequency: 800 MHz (asserted by call to kernel) >> boost state support: >> Supported: yes >> Active: yes >> >> On the reserve laptop however the EFI(BIOS) "always" sets back >> cpupower, and we start with "powersave" governor and low >> frequency, and so the initial decrypting of the hard disk takes >> seeeeconds. I btw drive it via >> >> #!/bin/sh - >> #@ /root/bin/cpupower.sh >> # cpupower is in Linux src, tools/power/cpupower >> >> : ${HOSTNAME:=3D$(uname -n)} >> >> if [ -f /root/hosts/${HOSTNAME}/cpupower ]; then >> . /root/hosts/${HOSTNAME}/cpupower >> else >> logger -s -t /root/bin/cpupower.sh "MISS >> /root/hosts/${HOSTNAME}/cpupower" >> exit 1 >> fi >> >> if command -v cpupower >/dev/null 2>&1; then :; else >> logger -s -t /root/bin/cpupower.sh 'no cpupower tool' >> exit 1 >> fi >> >> if [ $# -gt 0 ]; then >> x=3D >> case $1 in >> lo) x=3D$lo;; >> med) x=3D$med;; >> hi) x=3D$hi;; >> default) x=3D$default;; >> 75) x=3D$x75;; >> *) echo >&2 'Synopsis: cpupower [lo|med|hi|default[|75]]';; >> esac >> [ -n "$x" ] && cpupower frequency-set -u $x >> fi >> >> cpupower frequency-info >> >> and that /root/hosts/$HOSTNAME/cpupower is (here) >> >> #@ /root/hosts/self/cpupower >> lo=3D'400M -g powersave' >> med=3D'1600M -g powersave' >> hi=3D'3400M -g performance' >> default=3D'3400M -g powersave' >> x75=3D'2500M -g performance' >> >> (i use "hi" only for kernel and port builds). >> It makes "a hell of a difference". >> >> Other than that i have seen similar things because (a) the >> kernel's crng came up slowly (up to 30 minutes at times), but this >> *should* be a thing of the past (dunno Alpine 3.20, i always use >> [edge]), or because of WiFi chip powersafe stuff, i usually do >> that though, i use "iw dev $dev set power_save on": >> >> # iw dev wlp1s0 get power_save >> Power save: on >> >> Other than that i am out of ideas. >> >> --steffen >> | >> |Der Kragenbaer, The moon bear, >> |der holt sich munter he cheerfully and one by one >> |einen nach dem anderen runter wa.ks himself off >> |(By Robert Gernhardt) >> > --0000000000002b71d1062369c865 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok I found the culprit. It was a network issue. The proble= m was happening when initiating the connection from a wlan which is bridged= with the wired lan.
For some reason,=C2=A0my Internet router forgets t= he presence of the RPI. Therefore IP address resolution can be slow. I supp= ose it's because there is no traffic coming from the RPI.
I i= nstalled the avahi daemon, I think it will make the RPI visible continuousl= y.


Le=C2=A0lun. 30 sept. 2024 =C3=A0=C2=A023:20, Jerome= Marc <marcjero@yahoo.com> = a =C3=A9crit=C2=A0:
Hi Steffen,

Thanks !
Unfortunat= ely there is cpupower rc service running and I don't have wifi.
I installed cpupower and got this output=C2=A0:

alpine:~# cpupower frequency-info
analyzing CPU 0:
=C2=A0 driv= er: cpufreq-dt
=C2=A0 CPUs which run at the same hardware frequency: 0 1= 2 3
=C2=A0 CPUs which need to have their frequency coordinated by softw= are: 0 1 2 3
=C2=A0 maximum transition latency: =C2=A0Cannot determine o= r is not supported.
=C2=A0 hardware limits: 600 MHz - 900 MHz
=C2=A0 = available frequency steps: =C2=A0600 MHz, 700 MHz, 800 MHz, 900 MHz
=C2= =A0 available cpufreq governors: conservative ondemand userspace performanc= e schedutil
=C2=A0 current policy: frequency should be within 600 MHz an= d 900 MHz.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 The governor "schedutil" may decide which speed to use
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 within this ran= ge.
=C2=A0 current CPU frequency: 600 MHz (asserted by call to hardware)=

Looks good...

Le=C2=A0lun. 30 sept. 2024= =C3=A0=C2=A022:27, Steffen Nurpmeso <steffen@sdaoden.eu> a =C3=A9crit=C2=A0:
Jerome Marc wrote in =C2=A0<CAD1Ag0wW0nw-BR1aqKkD66LLO_yndJAy__i= 6yg9TWvU_Z6QEDA@mail.gmail.com>:
=C2=A0|I just installed Alpine 3.20.3 on a RPI 2 in diskless mode.(headless= ,
=C2=A0|minimal installation)
=C2=A0|
=C2=A0|I noticed that if I let the device idling, I have a few seconds late= ncy
=C2=A0|when I try to connect the machine with SSH for example. Even when co= nnected
=C2=A0|I can have my SSH session frozen for a few seconds if I do nothing i= n the
=C2=A0|terminal.
=C2=A0|I notice the same when using a nodejs app (HTTP) therefore this is a=
=C2=A0|general thing (not just about SSH)
=C2=A0|
=C2=A0|I don't see anything weird in logs. Any idea ? Is that a power s= aving
=C2=A0|feature ?

It *could* be that cpupower-openrc is indeed the
tools/power/cpupower of the linux kernel sources, it seems to be
widely available (architecture-wise, on Alpine).
If that is so, then running it should output stuff like

=C2=A0 #?0|kent:~# bin/cpupower.sh
=C2=A0 analyzing CPU 0:
=C2=A0 =C2=A0 driver: intel_pstate
=C2=A0 =C2=A0 CPUs which run at the same hardware frequency: 0
=C2=A0 =C2=A0 CPUs which need to have their frequency coordinated by softwa= re: 0
=C2=A0 =C2=A0 maximum transition latency:=C2=A0 Cannot determine or is not = supported.
=C2=A0 =C2=A0 hardware limits: 400 MHz - 3.40 GHz
=C2=A0 =C2=A0 available cpufreq governors: performance powersave
=C2=A0 =C2=A0 current policy: frequency should be within 400 MHz and 3.40 G= Hz.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The g= overnor "powersave" may decide which speed to use
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 withi= n this range.
=C2=A0 =C2=A0 current CPU frequency: Unable to call hardware
=C2=A0 =C2=A0 current CPU frequency: 800 MHz (asserted by call to kernel) =C2=A0 =C2=A0 boost state support:
=C2=A0 =C2=A0 =C2=A0 Supported: yes
=C2=A0 =C2=A0 =C2=A0 Active: yes

On the reserve laptop however the EFI(BIOS) "always" sets back cpupower, and we start with "powersave" governor and low
frequency, and so the initial decrypting of the hard disk takes
seeeeconds.=C2=A0 I btw drive it via

=C2=A0 #!/bin/sh -
=C2=A0 #@ /root/bin/cpupower.sh
=C2=A0 # cpupower is in Linux src, tools/power/cpupower

=C2=A0 : ${HOSTNAME:=3D$(uname -n)}

=C2=A0 if [ -f /root/hosts/${HOSTNAME}/cpupower ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 . /root/hosts/${HOSTNAME}/cpupower
=C2=A0 else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 logger -s -t /root/bin/cpupower.sh "= ;MISS /root/hosts/${HOSTNAME}/cpupower"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1
=C2=A0 fi

=C2=A0 if command -v cpupower >/dev/null 2>&1; then :; else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 logger -s -t /root/bin/cpupower.sh '= no cpupower tool'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1
=C2=A0 fi

=C2=A0 if [ $# -gt 0 ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 x=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case $1 in
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lo) x=3D$lo;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 med) x=3D$med;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 hi) x=3D$hi;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 default) x=3D$default;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 75) x=3D$x75;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *) echo >&2 'Synopsis: cpupow= er [lo|med|hi|default[|75]]';;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 esac
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [ -n "$x" ] && cpupowe= r frequency-set -u $x
=C2=A0 fi

=C2=A0 cpupower frequency-info

and that /root/hosts/$HOSTNAME/cpupower is (here)

=C2=A0 #@ /root/hosts/self/cpupower
=C2=A0 lo=3D'400M -g powersave'
=C2=A0 med=3D'1600M -g powersave'
=C2=A0 hi=3D'3400M -g performance'
=C2=A0 default=3D'3400M -g powersave'
=C2=A0 x75=3D'2500M -g performance'

(i use "hi" only for kernel and port builds).
It makes "a hell of a difference".

Other than that i have seen similar things because (a) the
kernel's crng came up slowly (up to 30 minutes at times), but this
*should* be a thing of the past (dunno Alpine 3.20, i always use
[edge]), or because of WiFi chip powersafe stuff, i usually do
that though, i use "iw dev $dev set power_save on":

=C2=A0 # iw dev wlp1s0 get power_save
=C2=A0 Power save: on

Other than that i am out of ideas.

--steffen
|
|Der Kragenbaer,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The= moon bear,
|der holt sich munter=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0he cheerfully= and one by one
|einen nach dem anderen runter=C2=A0 wa.ks himself off
|(By Robert Gernhardt)
--0000000000002b71d1062369c865--