Trauma
-
Posts
46 -
Joined
-
Last visited
-
Days Won
6
Posts posted by Trauma
-
-
On 8/18/2023 at 5:57 AM, ToanVQ said:
I'm successfully intalled and running this script (with some modifications to properly scaling for all 4 threads).
But my kill a watt does change anything even when all cpu cores running at 800MHz is that abnormal?
Most of the time hard drives are way more power hungry than one CPU on this type of setup. You're PSU efficiency is also important, a 500w 80+ Power Supply can drain around 50w without any load. So in this case scaling down the CPU is more a matter of temperature management IMHO.
-
What the load of your cpu looks like ? And did you used custom midload/maxload ?
-
Since i can not explain why your sensor id do not start @ 1 and since you seems to be the only one with this issue. I'll recommend you to mod the script before installation. Just change :
currtemp=$(cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_input) maxtemp=$(cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_max)
to
currtemp=$(cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp2_input) maxtemp=$(cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp2_max)
And launch the install.sh
-
15 hours ago, puls200 said:
please tell me why install doesn't work
Oct 24 20:47:11 DOM scaler.sh[24007]: cat: /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_input: No such file or directory
This is your problem, to help you out i'll need to know what are your syno model, DSM version and CPU model. -
Bug fixed, please try to update and reinstall, should work.
- 1
-
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.
-
- 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
-
Seems to work fine so ? Maybe you did not install it correctly..
- 1
-
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.
-
@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/ -
@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.
-
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..
-
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 capablelsmod| grep "cpufreq"
acpi_cpufreq 6429 0
cpufreq_powersave 1126 0
cpufreq_performance 1130 0
processor 26582 1 acpi_cpufreq
cpufreq_stats 2865 0Also 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
-
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
-
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.
-
5 hours ago, shadowcliffs said:
Hi, I came across this topic searching for a way to scaling the CPU on DS3615xs DSM 7.0.1. CPU scaling has been set up through cpufrequtils for this same machine when it was on 6.2.3, now it seems ondemand mode is missing from the governor in DSM 7.0.1.
I tried the script here, I got:
root@xxx:~# /usr/local/bin/scaler.sh &
[1] 19296
root@xxx:~# /usr/local/bin/scaler.sh: line 48: /sys/bus/platform/devices/coretemp.0/hwmon/hwmon0/temp1_input: No such file or directory
Any idea?
This happen when the script try to get the current temperature of the CPU (overheat protection), if you can find out a way to get this information on your config I could adapt the script.
-
FYI DSM 7 fixes are now merged in master branch.
- 1
- 1
-
Hello all,
For DSM 7.x users, I have fixed the script, added a systemctl service and installer script so it's better integrated into the system (systemd is available starting DSM7).
https://github.com/Trauma/cpufreq-userspace-scaler/tree/fix/dsm7.1
- 2
-
Test version for DSM7.1, please make sure acpi-cpufreq.ko is not loaded before running the script :
https://raw.githubusercontent.com/Trauma/cpufreq-userspace-scaler/fix/dsm7.1/scaler.sh
- 3
-
22 hours ago, true said:
hi! had the same problem on rptc 7.1-42661 Update 1 (no such file or directory trying to cat scaling governor) and it was fixed after loading the acpi-cpufreq module manually (modprobe acpi-cpufreq). hope it helps!
Thanks @true, I've waited a while for someone to report if manually loading the driver worked on 7.1.
Could someone report the output of this command please, after loading acpi-cpufreq :
lsmod| grep "cpufreq"
Just want to make sure all dependencies are loaded before fixing the script, thks.
- 1
-
Working fine for me on DS918+ DSM 7.0.1-42218 Update 3, is it only 7.1 related ?
-
Yes check your bios for speedstep or related settings.
Check if they are loaded with :
lsmod| grep "cpufreq"
If not you can try to load them with insmod.
-
Does this give something ?
ls /lib/modules/ | grep "cpufreq"
-
On 4/23/2022 at 12:32 AM, ngsupb said:
unfortunately doesn't work anymore on 7.1
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: No such file or director
It was a great script!
What syno model do you use ?
What is this command output : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
Thx.
CPU Frequency scaling for DS918+
in Software Modding
Posted
Nice work, though it could have been cool to open a PR on my repo