Jump to content
XPEnology Community

Trauma

Member
  • Posts

    46
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Trauma

  1. On 5/27/2023 at 2:14 AM, Peter Suh said:

     

    Please change it to the version I improved again and try it.
    A few days ago, the permission problem of the sh file was fixed.

     

    https://github.com/PeterSuh-Q3/tcrp-addons/tree/main/cpufreq-scaler/src

     

    There was a bug that counted the number of cores rather than threads of the CPU, so there was a problem that only half of the threads were processed.
    Fixed a few other issues.

    Nice work, though it could have been cool to open a PR on my repo ;)

     

     

    • Like 1
  2. 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 :D 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.

  3. 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

     

  4. 15 hours ago, puls200 said:

    @Trauma 

    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.

  5. 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.

     

  6. @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/

  7. 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..

  8. 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 ?

     

     

    image.thumb.png.35bfc9b0fca3c34a1adca2bdbc6d6577.png

     

    # 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 
     

  9. 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.

  10. 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/cor            

    etemp.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.

     

     

  11. 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.

    • Like 1
  12. 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.

×
×
  • Create New...