Trauma Posted July 20, 2022 Author Share #101 Posted July 20, 2022 2 hours ago, use-nas said: Processor J3455, script currtemp=$(cut -c 1-3 </sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_input) does not correctly display the temperature of 3 digits, so the processor is always in cooling mode. currtemp=$(cut -c 1-2 </sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_input) now everything is OK)) Thanks for you're feedback. I'll need to know what kernel / model and DSM version you are using please. Quote Link to comment Share on other sites More sharing options...
use-nas Posted July 20, 2022 Share #102 Posted July 20, 2022 918 DSM 7.1 1 Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 21, 2022 Author Share #103 Posted July 21, 2022 On 7/20/2022 at 1:18 PM, use-nas said: 918 DSM 7.1 Please provide me the output of this command please : sudo dmidecode --type processor Quote Link to comment Share on other sites More sharing options...
use-nas Posted July 22, 2022 Share #104 Posted July 22, 2022 # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 3.0.0 present. Handle 0x0014, DMI type 4, 48 bytes Processor Information Socket Designation: CPUSocket Type: Central Processor Family: Celeron Manufacturer: Intel ID: C9 06 05 00 FF FB EB BF Signature: Type 0, Family 6, Model 92, Stepping 9 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz Voltage: 1.2 V External Clock: 100 MHz Max Speed: 2416 MHz Current Speed: 1500 MHz Status: Populated, Enabled Upgrade: Other L1 Cache Handle: 0x0012 L2 Cache Handle: 0x0013 L3 Cache Handle: Not Provided Serial Number: Not Specified Asset Tag: Fill By OEM Part Number: Fill By OEM Core Count: 4 Core Enabled: 4 Thread Count: 4 Characteristics: 64-bit capable Quote Link to comment Share on other sites More sharing options...
burtal Posted July 22, 2022 Share #105 Posted July 22, 2022 (edited) trying to get this working on a 3622xs 7.1.0-U2 on a microservergen8 with a xeon E3 1265v2 If i modify in scaler.sh # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }') From 4-1 to 7 -1 ....nothing happens .... if i leave the default 4-1 , only 4 cores show low freq. Am i doing something wrong here ? # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0400, DMI type 4, 42 bytes Processor Information Socket Designation: Proc 1 Type: Central Processor Family: Xeon Manufacturer: Intel ID: A9 06 03 00 FF FB EB BF Signature: Type 0, Family 6, Model 58, Stepping 9 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Xeon(R) CPU E3-1265L V2 @ 2.50GHz Voltage: 1.4 V External Clock: 100 MHz Max Speed: 4800 MHz Current Speed: 2500 MHz Status: Populated, Enabled Upgrade: Socket BGA1155 L1 Cache Handle: 0x0710 L2 Cache Handle: 0x0720 L3 Cache Handle: 0x0730 Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Core Count: 4 Core Enabled: 4 Thread Count: 8 Characteristics: 64-bit capable lsmod| grep "cpufreq" acpi_cpufreq 6429 0 cpufreq_powersave 1126 0 cpufreq_performance 1130 0 processor 26582 1 acpi_cpufreq cpufreq_stats 2865 0 Also made a trigger task in dsm to run at boot under root with this command : modprobe acpi-cpufreq && systemctl start cpufreq-userspace-scaler.service Edited July 22, 2022 by burtal Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 22, 2022 Author Share #106 Posted July 22, 2022 (edited) 4 hours ago, burtal said: trying to get this working on a 3622xs 7.1.0-U2 on a microservergen8 with a xeon E3 1265v2 If i modify in scaler.sh # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }') From 4-1 to 7 -1 ....nothing happens .... if i leave the default 4-1 , only 4 cores show low freq. Am i doing something wrong here ? # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0400, DMI type 4, 42 bytes Processor Information Socket Designation: Proc 1 Type: Central Processor Family: Xeon Manufacturer: Intel ID: A9 06 03 00 FF FB EB BF Signature: Type 0, Family 6, Model 58, Stepping 9 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Xeon(R) CPU E3-1265L V2 @ 2.50GHz Voltage: 1.4 V External Clock: 100 MHz Max Speed: 4800 MHz Current Speed: 2500 MHz Status: Populated, Enabled Upgrade: Socket BGA1155 L1 Cache Handle: 0x0710 L2 Cache Handle: 0x0720 L3 Cache Handle: 0x0730 Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Core Count: 4 Core Enabled: 4 Thread Count: 8 Characteristics: 64-bit capable lsmod| grep "cpufreq" acpi_cpufreq 6429 0 cpufreq_powersave 1126 0 cpufreq_performance 1130 0 processor 26582 1 acpi_cpufreq cpufreq_stats 2865 0 Also made a trigger task in dsm to run at boot under root with this command : modprobe acpi-cpufreq && systemctl start cpufreq-userspace-scaler.service Try to use this please : cpucorecount=$(nproc) I've tested this successfully on my config, i think it should work for hyperthreaded and standard threaded CPU's Edited July 22, 2022 by Trauma Quote Link to comment Share on other sites More sharing options...
burtal Posted July 22, 2022 Share #107 Posted July 22, 2022 (edited) cpucorecount=$(nproc) instead of {print $4-1} part ? ..... to be clear ..... here , after =? # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }') and here ? # Set load steps to trigger frequencies scaling, this user overidable lowload=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 * 0.3 * 100 }') midload=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 * 0.6 * 100 }') Edited July 22, 2022 by burtal Quote Link to comment Share on other sites More sharing options...
Craigg Posted July 22, 2022 Share #108 Posted July 22, 2022 7 часов назад, burtal сказал: trying to get this working on a 3622xs 7.1.0-U2 on a microservergen8 with a xeon E3 1265v2 If i modify in scaler.sh # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }') From 4-1 to 7 -1 ....nothing happens .... if i leave the default 4-1 , only 4 cores show low freq. Am i doing something wrong here ? # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0400, DMI type 4, 42 bytes Processor Information Socket Designation: Proc 1 Type: Central Processor Family: Xeon Manufacturer: Intel ID: A9 06 03 00 FF FB EB BF Signature: Type 0, Family 6, Model 58, Stepping 9 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Xeon(R) CPU E3-1265L V2 @ 2.50GHz Voltage: 1.4 V External Clock: 100 MHz Max Speed: 4800 MHz Current Speed: 2500 MHz Status: Populated, Enabled Upgrade: Socket BGA1155 L1 Cache Handle: 0x0710 L2 Cache Handle: 0x0720 L3 Cache Handle: 0x0730 Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Core Count: 4 Core Enabled: 4 Thread Count: 8 Characteristics: 64-bit capable lsmod| grep "cpufreq" acpi_cpufreq 6429 0 cpufreq_powersave 1126 0 cpufreq_performance 1130 0 processor 26582 1 acpi_cpufreq cpufreq_stats 2865 0 Also made a trigger task in dsm to run at boot under root with this command : modprobe acpi-cpufreq && systemctl start cpufreq-userspace-scaler.service productivity monitoring software Thanks for the detailed breakdown. Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 22, 2022 Author Share #109 Posted July 22, 2022 5 hours ago, burtal said: cpucorecount=$(nproc) instead of {print $4-1} part ? ..... to be clear ..... here , after =? # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }') and here ? # Set load steps to trigger frequencies scaling, this user overidable lowload=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 * 0.3 * 100 }') midload=$(grep cores /proc/cpuinfo | sort -u | awk '{ print $4 * 0.6 * 100 }') The complete and correct cpucorecount command should be : cpucorecount=$(nproc | awk '{ print $1 - 1 }') If it return the right value, the same method can be used for lowload etc.. Quote Link to comment Share on other sites More sharing options...
burtal Posted July 22, 2022 Share #110 Posted July 22, 2022 if i replace that code in the scaler.sh the service fails to start sudo systemctl status cpufreq-userspace-scaler.service ● cpufreq-userspace-scaler.service - ACPI cpufreq userspace scaler Loaded: loaded (/usr/lib/systemd/system/cpufreq-userspace-scaler.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2022-07-22 22:35:05 EEST; 19s ago Process: 6061 ExecStart=/usr/local/bin/scaler.sh (code=exited, status=1/FAILURE) Main PID: 6061 (code=exited, status=1/FAILURE) Jul 22 22:35:05 Polaris systemd[1]: Started ACPI cpufreq userspace scaler. Jul 22 22:35:05 Polaris systemd[1]: Starting ACPI cpufreq userspace scaler... Jul 22 22:35:05 Polaris scaler.sh[6061]: /usr/local/bin/scaler.sh: line 67: echo: write error: Invalid argument Jul 22 22:35:05 Polaris systemd[1]: cpufreq-userspace-scaler.service: main process exited, code=exited, status=1/FAILURE Jul 22 22:35:05 Polaris systemd[1]: Unit cpufreq-userspace-scaler.service entered failed state. Jul 22 22:35:05 Polaris systemd[1]: cpufreq-userspace-scaler.service failed. Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 22, 2022 Author Share #111 Posted July 22, 2022 @use-nas and @burtal this version should fix your respective issues : https://github.com/Trauma/cpufreq-userspace-scaler/tree/fix/celeron_temp Let me know. Quote Link to comment Share on other sites More sharing options...
burtal Posted July 22, 2022 Share #112 Posted July 22, 2022 (edited) while looking around the file system i found some mentioning for governors or power states in /sys/module/ folder ....maybe this also helps Why the hell synology removed the governors .....pff Edited July 22, 2022 by burtal Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 23, 2022 Author Share #113 Posted July 23, 2022 (edited) @burtal it seems like cpucorecount is not set properly for you. can you give me the output of those commands please : nproc | awk '{ print $1 - 1 }' and grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }' and grep cores /proc/cpuinfo | sort -u | awk '{ print $7 - 1 }' and ls -l /sys/devices/system/cpu/ Edited July 23, 2022 by Trauma Quote Link to comment Share on other sites More sharing options...
burtal Posted July 23, 2022 Share #114 Posted July 23, 2022 (edited) hello .... sure buddy, thanks for taking the time to debug this root@Polaris:~# nproc | awk '{ print $1 - 1 }' 7 root@Polaris:~# grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }' 3 root@Polaris:~# grep cores /proc/cpuinfo | sort -u | awk '{ print $7 - 1 }' -1 root@Polaris:~# ls -l /sys/devices/system/cpu/ total 0 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu0 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu1 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu2 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu3 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu4 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu5 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu6 drwxr-xr-x 6 root root 0 Jul 23 12:49 cpu7 drwxr-xr-x 10 root root 0 Jul 23 12:50 cpufreq drwxr-xr-x 2 root root 0 Jul 23 12:50 cpuidle -r--r--r-- 1 root root 4096 Jul 23 12:49 isolated -r--r--r-- 1 root root 4096 Jul 23 13:48 kernel_max -r--r--r-- 1 root root 4096 Jul 23 13:48 modalias -r--r--r-- 1 root root 4096 Jul 23 13:48 offline -r--r--r-- 1 root root 4096 Jul 23 12:49 online -r--r--r-- 1 root root 4096 Jul 23 13:48 possible drwxr-xr-x 2 root root 0 Jul 23 12:50 power -r--r--r-- 1 root root 4096 Jul 23 13:48 present -rw-r--r-- 1 root root 4096 Jul 23 13:48 uevent drwxr-xr-x 2 root root 0 Jul 23 12:50 vulnerabilities root@Polaris:~# grep cores /proc/cpuinfo | sort -u | awk '{ print $7 - 1 }' -1 This always return - 1 if instead of print$4 -1 is any other number .... so maybe this being for ds918 which is 4cores ,will not work on higher cores CPU Edited July 23, 2022 by burtal Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 23, 2022 Author Share #115 Posted July 23, 2022 Ok, thanks. So the new cpucorecount method works for you too, since it return 7 and you can see that you have /sys/devices/system/cpu/cpu0 to /sys/devices/system/cpu/cpu7 which is fine. FYI `awk '{ print $1 - 1 }'` means `print the first field of the previous command minus 1` Since nproc return 8 for you, and since /sys/devices/system/cpu/cpu0 start at 0 we need to remove one core form the count to obtain the right value (7 for you). This to said that you first experiments were totally hazardous, and I can not explain why it worked for you. If you want me to help further, please run the latest version of the script with `bash -x ./scaler.sh` and paste the output here (no screenshots please). Cheers. Quote Link to comment Share on other sites More sharing options...
burtal Posted July 23, 2022 Share #116 Posted July 23, 2022 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 410 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=410 ++ cut -c 1-3 + maxtemp=900 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=019 + minfreq=1600000 + midfreq=2100000 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 410 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=420 ++ cut -c 1-3 + maxtemp=900 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=019 + minfreq=1600000 + midfreq=2100000 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 420 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 019 -le 240 ']' + echo 1600000 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=420 ++ cut -c 1-3 + maxtemp=900 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=017 + minfreq=1600000 + midfreq=2100000 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 420 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=410 ++ cut -c 1-3 + maxtemp=900 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=017 + minfreq=1600000 + midfreq=2100000 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 410 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=410 ++ cut -c 1-3 + maxtemp=900 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=017 + minfreq=1600000 + midfreq=2100000 + maxfreq=2501000 + coolfreq=2300000 ++ nproc ++ awk '{ print $1 * 0.3 * 100 }' + lowload=240 ++ nproc ++ awk '{ print $1 * 0.6 * 100 }' + midload=480 + '[' 410 -lt 900 ']' ++ seq 0 7 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + for i in $(seq 0 "${cpucorecount}") + '[' 017 -le 240 ']' + echo 1600000 + sleep 0.5 Quote Link to comment Share on other sites More sharing options...
Trauma Posted July 23, 2022 Author Share #117 Posted July 23, 2022 Seems to work fine so ? Maybe you did not install it correctly.. 1 Quote Link to comment Share on other sites More sharing options...
burtal Posted July 23, 2022 Share #118 Posted July 23, 2022 hmm ... i did not reinstall or do anything after the initial install that stated it failed yes ... it appears to be clocked down but the scaler service status say is not started root@Polaris:~# grep MHz /proc/cpuinfo cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 cpu MHz : 1600.000 root@Polaris:~# systemctl status cpufreq-userspace-scaler.service ● cpufreq-userspace-scaler.service - ACPI cpufreq userspace scaler Loaded: loaded (/usr/lib/systemd/system/cpufreq-userspace-scaler.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2022-07-23 12:50:28 EEST; 7h ago Process: 13924 ExecStart=/usr/local/bin/scaler.sh (code=exited, status=1/FAILURE) Main PID: 13924 (code=exited, status=1/FAILURE) Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. root@Polaris:~# systemctl start cpufreq-userspace-scaler.service root@Polaris:~# systemctl status cpufreq-userspace-scaler.service ● cpufreq-userspace-scaler.service - ACPI cpufreq userspace scaler Loaded: loaded (/usr/lib/systemd/system/cpufreq-userspace-scaler.service; disabled; vendor preset: disabled) Active: active (running) since Sat 2022-07-23 20:06:41 EEST; 6s ago Main PID: 14939 (scaler.sh) Memory: 1.0M CGroup: /system.slice/cpufreq-userspace-scaler.service ├─14939 /bin/bash /usr/local/bin/scaler.sh └─15144 sleep 0.5 Jul 23 20:06:41 Polaris systemd[1]: Started ACPI cpufreq userspace scaler. Jul 23 20:06:41 Polaris systemd[1]: Starting ACPI cpufreq userspace scaler... Quote Link to comment Share on other sites More sharing options...
burtal Posted July 23, 2022 Share #119 Posted July 23, 2022 update ...looks like now is working .... it ramps up and down as expected. Not as smooth as previous method with governors , where individual cores have different speeds .... but is all good for my purpose .... thank you for your support and time 1 Quote Link to comment Share on other sites More sharing options...
chickey Posted July 27, 2022 Share #120 Posted July 27, 2022 Out of curiosity what power usage are people managing to get down to? on a i9500t setup i'm still getting 30w at idle with 1 drive. Col Quote Link to comment Share on other sites More sharing options...
burtal Posted July 30, 2022 Share #121 Posted July 30, 2022 (edited) i get around 58-60w on my microserver gen8 with 4 disks: 2 HGST 4TB and 2 WD blacks 1TB .....is not as efficient as using governors as in 6.2.3 In 6.2.3 when i was hammering the cpu difference between performance profile and powesaver or conservative was about 10-15w....but at least im trying to cut power and especially heat so that is i use the method with this method unfortunately has less modulation in cpu freq PER core .... from what i`ve seen if the load is high on one single core, all will boost all to the same freq ... so is like on/off not granular increments Edited July 30, 2022 by burtal Quote Link to comment Share on other sites More sharing options...
jakino Posted August 5, 2022 Share #122 Posted August 5, 2022 I wish I could install the script on on my xpenology 918 with dms 7.1...can anyone be kind enough to explain the steps and commands to do? sorry if i'm a noob😅 Quote Link to comment Share on other sites More sharing options...
Trauma Posted August 5, 2022 Author Share #123 Posted August 5, 2022 Download the archive : https://github.com/Trauma/cpufreq-userspace-scaler/archive/refs/heads/master.zip Extract the archive copy the files to your nas ssh to your nas cd path/to/cpufreq-userspace-scaler-master sudo ./install.sh 1 Quote Link to comment Share on other sites More sharing options...
jakino Posted August 5, 2022 Share #124 Posted August 5, 2022 (edited) 48 minutes ago, Trauma said: Download the archive : https://github.com/Trauma/cpufreq-userspace-scaler/archive/refs/heads/master.zip Extract the archive copy the files to your nas ssh to your nas cd path/to/cpufreq-userspace-scaler-master sudo ./install.sh I was able to install thanks to your instructions. But the script doesn't seem to work on my device: the frequency of my cpu (j5040) remains fixed at 1800. what can i try to do to try to solve? this is my lsmod| grep "cpufreq" output: acpi_cpufreq 6557 0 cpufreq_powersave 1126 0 cpufreq_performance 1130 0 processor 27030 5 acpi_cpufreq cpufreq_stats 2929 0 this is my `bash -x ./scaler.sh` output: sudo bash -x ./scaler.sh + set -euo pipefail + '[' 0 -ne 0 ']' ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 - 1 }' + cpucorecount=3 + modprobe acpi-cpufreq ++ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + governor=userspace + '[' userspace '!=' userspace ']' + IFS=' ' + read -r -a freqlist ++ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies + scalingminfreq=800000 + scalingmaxfreq=2001000 + '[' userspace = userspace ']' ++ seq 0 3 + for i in $(seq 0 "${cpucorecount}") + echo 800000 + echo 2001000 + for i in $(seq 0 "${cpucorecount}") + echo 800000 + echo 2001000 + for i in $(seq 0 "${cpucorecount}") + echo 800000 + echo 2001000 + for i in $(seq 0 "${cpucorecount}") + echo 800000 + echo 2001000 + true + main ++ cut -c 1-3 + currtemp=420 ++ cut -c 1-3 + maxtemp=105 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=000 + minfreq=800000 + midfreq=1400000 + maxfreq=2001000 + coolfreq=1800000 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.3 * 100 }' + lowload=120 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.6 * 100 }' + midload=240 + '[' 420 -lt 105 ']' ++ seq 0 3 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + sleep 30 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=430 ++ cut -c 1-3 + maxtemp=105 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=000 + minfreq=800000 + midfreq=1400000 + maxfreq=2001000 + coolfreq=1800000 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.3 * 100 }' + lowload=120 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.6 * 100 }' + midload=240 + '[' 430 -lt 105 ']' ++ seq 0 3 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + sleep 30 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=430 ++ cut -c 1-3 + maxtemp=105 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=013 + minfreq=800000 + midfreq=1400000 + maxfreq=2001000 + coolfreq=1800000 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.3 * 100 }' + lowload=120 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.6 * 100 }' + midload=240 + '[' 430 -lt 105 ']' ++ seq 0 3 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + sleep 30 + sleep 0.5 + true + main ++ cut -c 1-3 + currtemp=430 ++ cut -c 1-3 + maxtemp=105 ++ awk -F . '{print $1 substr($2,1,2)}' + loadavg=008 + minfreq=800000 + midfreq=1400000 + maxfreq=2001000 + coolfreq=1800000 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.3 * 100 }' + lowload=120 ++ grep cores /proc/cpuinfo ++ sort -u ++ awk '{ print $4 * 0.6 * 100 }' + midload=240 + '[' 430 -lt 105 ']' ++ seq 0 3 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + for i in $(seq 0 "${cpucorecount}") + echo 1800000 + sleep 30 Thanks Edited August 5, 2022 by jakino Quote Link to comment Share on other sites More sharing options...
Trauma Posted August 5, 2022 Author Share #125 Posted August 5, 2022 (edited) The script think you're cpu is at 430°, so it enter in the cooling mode and set the cpu frequency at 1800 Hz. Its a bug related with the max temp, I'll fix this. Edited August 5, 2022 by Trauma Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.