Received: from sonic305-3.consmr.mail.bf2.yahoo.com (sonic305-3.consmr.mail.bf2.yahoo.com [74.6.133.42]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 8391122597C for <~alpine/users@lists.alpinelinux.org>; Mon, 30 Sep 2024 21:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1727731242; bh=7SJ6XvjsYtJUHLtC+8+cCP56GnOqjUn6xY8GFlL9I8g=; h=References:In-Reply-To:From:Date:Subject:To:From:Subject:Reply-To; b=ZHjvJ1rNAZxpAtGH4B4WXV5cKKEf4iMW4S0bEVMAdSulanHxBVZ/Zf3M/lJ0RonVXaMnDuQkOTv5Z3ZtwXM9134bSGucpTCs0wzPFdlTsimjw8UpZmIxgWCt6RiRFOzNann+mz5sSHQSqWYIzCrqCIne8AIm7EI+t5BKsyyFCD9Y0oapUTAouc/rY2J8gF/slA0BnozDPS7VZ0xRFbuFI+bgnWbiHKJS1QRJfAbc9ebYbuzEky2qIQ0ahn7dhE5MakgMnPhkasfZ3T99e0l8xryWbHvGUYTb0eG0ih0f5cOLjq2SNROsmV+Gd8TedbpZHjYkP+O+gKiyar4ZOdaLlg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1727731242; bh=wFcT24HDk3woltLiQVOLWAfF0tSUi9ubt17Vu/Uiwm0=; h=X-Sonic-MF:From:Date:Subject:To:From:Subject; b=MBYODVIfKa1N2ceexLmm/lQn+DX9iBCZDztgp6pphEPrZzl5hdG7KHINB2gpvi3HJ89KJca1LlQ8pCFYuVLZRCivIPErieHOvmoWNEP5pGxHzWQ4qvXhEIvumQ6sLIdzd7spAHLyahB28VuhcGW0tHgCBwse0xG864BLCa6EXY59SaohLn2MkZmf0tPnEO2yaEV1QrjYCegVQuAe2N2tF7i0vHNLZ5/GndWPOC+c1Jaf1mdf81XbHcc3OxbdT6VvArry/7XWuodzRvqzftL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rdOMUzfAX0WUKYgdfIW.tJfLXdGpTmCIJvYMGnH..OkYUkhq0ftzgSvd uE4W7hcRROmiiE3isfudvmEg455IHsdXOlw3um1yYs98PtS.EryqyBKC6bKF1LzYNghn8EkrqVtS 8uISqxU9uTLqyWcGCATcnfC20l_NZ9OSHOlSL4PZ6eyYXB5xIroXqeF_.rpg0xK5ljIX9Od48pIP iQDaH.IXm.E1SG7ZS0UJqbgiTOCBm3DvpS1M5TA3.tzzd4NfLJJaMWXFIitrUNX.NEkC_7gc4Ayn TTUgugsyUdsaK X-Sonic-MF: X-Sonic-ID: 4b482970-5bd2-4262-a223-f2751ec7797b Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Mon, 30 Sep 2024 21:20:42 +0000 Received: by hermes--production-ir2-6664f499fc-545d6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e118e6cb3bf4b9ece43dbfbbed62d46b; Mon, 30 Sep 2024 21:20:40 +0000 (UTC) Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2facf40737eso15782331fa.0 for <~alpine/users@lists.alpinelinux.org>; Mon, 30 Sep 2024 14:20:40 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWS8UUjzfZcjAg1MmwMdo6weMCciYa3iJ7xWMrSktj9x4FMxEL5ubHDuqhvrnLR7aZprNKP5PAzpIluWcTc@lists.alpinelinux.org X-Gm-Message-State: AOJu0Yy1ZYiRcVPK5n6TNp0o2FEFf2Yt2GDSZRfvYRTed82SctOZ6sHT cIy6HaLN1Uv8vDZlAFeDK5CcMVU8SkkyIEj1Mu89fOul3KPJZqyI36ljpKPWWxPHMeUxp+bA/jP oI8Cb0YWEyGpR9o8djrubEu3OEA== X-Google-Smtp-Source: AGHT+IHoWAbMa+ouNkv6uuhKdZjCs/PNVANjBMh1WUiApcMxBlIW1IjBPK30c/FatC62fxZk5nEvjZsvAiWWPvlPliU= X-Received: by 2002:a05:6512:1044:b0:534:5453:ecda with SMTP id 2adb3069b0e04-5389fc44fe5mr7288380e87.23.1727731239231; Mon, 30 Sep 2024 14:20:39 -0700 (PDT) MIME-Version: 1.0 References: <20240930202728._Cgmke2m@steffen%sdaoden.eu> In-Reply-To: <20240930202728._Cgmke2m@steffen%sdaoden.eu> From: Jerome Marc Date: Mon, 30 Sep 2024 23:20:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: freeze / connection delay after idling for a while ? To: Jerome Marc , ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000c8381906235cc60f" X-Mailer: WebService/1.1.22645 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo --000000000000c8381906235cc60f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 performance 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 latency > |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 t= he > |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 us= e > 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) > --000000000000c8381906235cc60f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Steffen,

Thanks !
Unfortunately = 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 driver: = 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 software:= 0 1 2 3
=C2=A0 maximum transition latency: =C2=A0Cannot determine or is= not supported.
=C2=A0 hardware limits: 600 MHz - 900 MHz
=C2=A0 avai= lable frequency steps: =C2=A0600 MHz, 700 MHz, 800 MHz, 900 MHz
=C2=A0 a= vailable cpufreq governors: conservative ondemand userspace performance sch= edutil
=C2=A0 current policy: frequency should be within 600 MHz and 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 range.
= =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 <ste= ffen@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)
--000000000000c8381906235cc60f--