Jump to content
XPEnology Community

Trauma

Member
  • Posts

    46
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Trauma

  1. On 4/12/2022 at 1:24 AM, phone guy said:

    Does this script work on RP and DSM 7.1 ???

     

    I have 2 boxes, both other brand nas boxes, one running a J3355 and the other is a Pentium N3710 ... so there is no bios to set anything in.

    It should, it's not related to the OS but to the kernel configuration. It's a pretty standard kernel feature, and it won't hurt to try.

  2. On 8/14/2021 at 6:07 AM, DHD said:

    I've tried it on my XPE box (i3-4130, Jun's loader 1.04b, DS918+, DSM 6.2.3-25426 U3) and got a weird result: 2 cores always run at 800MHz, 2 cores always run at 3400MHz.

    Update:

    # grep cores /proc/cpuinfo | sort -u | awk '{ print $4 - 1 }'
    1 <= Problem here.

     

    i3-4130 have 2 cores and 4 threads => need modify scripts like this:

    # grep cores /proc/cpuinfo | sort -u | awk '{ print $4 + 1}'

    This is strange because cpu count start at zero, not one. Does this really fix you're problem ?

  3. On 8/29/2020 at 5:56 PM, mcdull said:

    under proxmox I got error on

    /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: No such file or directory

    So the hypervisor do not expose any scaling capabilities to the VM's. Maybe the host scale fine, so the script is useless ( on top of not compatible...) Maybe try to check if your host burst freq or not and try to fix it.

  4. On 8/24/2020 at 11:25 AM, Dr_Frankenstein said:

    I am just starting to play around with this script on my Intel NUC6CAYS, it has the same CPU as the 918+ (J3455) but it never seems to burst up to the specified 2.5ghz it just sits at its base clock of 1.5Ghz at all times. Is this normal behaviour? Was hoping to get the little bit of extra speed out of it when its processing lots of photos in Moments or running a VM.

    As said before, this script won't help with burst frequency, I guess it's handled by intel_pstate and not cpu_freq. This version of the kernel is cpu_freq only, even if it's appollo lake version (that weird).

  5. On 4/17/2020 at 3:10 PM, mattie112 said:

    Is this script supposed to be compatible with i5-4590T (base 2GHZ, boost 3GHZ). I always thought my virtual machines where slower then when I was running Linux but I just thought that it was overhead. However I recently noticed that my CPU was running at only 2GHZ so that would also explain it.

     

    With the script running (default settings) I still only go up to 2GHZ

     

    
    
    admin@nas:~$ cat /proc/cpuinfo | grep MHz
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    admin@nas:~$ uptime
     15:09:40 up 22 min,  2 users,  load average: 2.47, 2.08, 1.74
    admin@nas:~$ cat /proc/cpuinfo | grep MHz
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    cpu MHz         : 2001.000
    admin@nas:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
    2001000 130778
    2000000 0
    1900000 0
    1800000 0
    1700000 0
    1600000 0
    1500000 0
    1400000 3738
    1300000 0
    1200000 0
    1100000 0
    1000000 0
    900000 0
    800000 0

    acpi-cpufreq do not, as far as know, support turbo boost. Turbo boost is managed by intel_pstate scaling driver, which is not available with the 918+ kernel. I did not succeed to build and load successfully intel_pstate for now.

     

  6. Netdata is effectively a good too monitor your server.

     

    About "phys,phys,phys,virt,virt,virt,virt", seems like it's actually displayed/ordered like this. I also doubt HT core could be higher than physical cores. It's also possible that DSM kernel / drivers are missing something to handle this right (maybe bromowl kernel is working).

     

    About "load profil", isn't the readme clear enough ? Do you understand "loadaverage" thing ?

     

     

  7. 1 hour ago, Black6spdZ said:

    /usr/local/bin/scaler.sh: line 53: echo: write error: Invalid argument

     

    maybe only physical cores 0-3 can be changed? is there any way to watch all core frequencies in real-time?

     

    Yes it seems like ! It certainly means acpi-cpufreq is not able to control threaded cores.

     

    You could use this simple loop to monitor cpu frequency, quick and dirty but works... (CTRL+C to escape):

    while true; do cat $(ls /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq); done

     

    • Like 1
  8. 16 hours ago, Black6spdZ said:

    root@TerraServer:~# cat $(ls /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq)
    800000
    800000
    800000
    800000
    2501000
    2501000
    2501000
    2501000

    root@TerraServer:~# cat /proc/cpuinfo | grep cores | sort -u | awk '{ print $4 }'
    4
     

    Please try this version of the script, and report us if it's OK... or not please :

    https://raw.githubusercontent.com/Trauma/cpufreq-userspace-scaler/ht-compat/scaler.sh

    • Like 1
  9. 18 hours ago, mervincm said:

    It seems to work as designed for me, if a bit more delayed than I expected. It correctly drops it to 800 MHz when it is completely idle, and up to full speed when it is really busy. It is not very often at the mid frequency (2400) but it is there on occasion, so it is working.

    thanks!

    If you want, you can use variables to adjust speed and steps according to you're load profil.

     

    18 hours ago, mervincm said:

    PS I have not found a way to see an accurate frequency, it always says 4000MHz when it is in fact running at 4600MHz.  It is OC from 4000 to 4600, and I believe the OC is functional based on my geekbench test values, they are too high for a stock speed i3-8350k, but about right ration for a 4600MHz version.  It appears to just be a display issue.

    acpi-cpufreq driver gather frequencies from ACPI tables, so it's certainly related to your bios ACPI implementation. Try to tweak cpu and acpi settings in bios, it may help. Maybe this CPU is not completly supported on this mobo (bios update ?).

     

    Try this, to see if it's more consistant

    cat /sys/devices/system/cpu/cpufreq/policy0/bios_limit

     

    4 hours ago, Black6spdZ said:

    does this look correct? 4c/8t Xeon e3-1265L v3

    .....

    Is the kernel not HT aware? should I disable it in the BIOS? The DS918+ Celeron J3455 cpu is only 4c/4t, so maybe HT is useless or hampering the scaling in this case?

    Obviously not ! Anyway I'm not sure cpuinfo is totally reliable here. Prefer sysfs informations in my opinion.

     

    Try this, to see if it's more consistant

    cat $(ls /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq)

    Please try this as well and report the output of the command here please (for your cpu it should return "8") :

    cat /proc/cpuinfo | grep cores | sort -u | awk '{ print $4 }'

     

    • Like 1
  10. On 9/11/2019 at 2:29 AM, Jseinfeld said:

    This is a pretty cool script. I really like the fact that it is made to auto-figure out variables.

    Thanks !

     

     

    On 9/11/2019 at 2:29 AM, Jseinfeld said:

     I noticed that my J4105 only shows frequencies uptil 1501MHz, but not the boost frequency of 2500MHz. Not that I need the boost, but I wonder if the kernel restricts it

    Not 100% sure about this but i guess boost frequency is managed by intel_pstate, which seems to be enabled in the kernel, but the default cpu frequency driver is set to cpu_freq. I did not succeed to make it work on my rig. I've tried intel_pstate=enable in the grub cmd_line, but no luck. I've also tried to load a compiled module, and it don't load.

     

    I guess some guys here have proven it's actually working, while benchmarking the NAS with turbo boost enabled or disabled in bios (they use geekbench in a docker container I guess).

  11. Long answer :

    Your CPU don not have only 3 modes, synology kernel for DS918+ provides only three cpufreq governors :

    • powersave > set the cpu to its minimal freq
    • performance > set the cpu to its maximal freq
    • userspace > allow you to specify the desired frequency. This script use this governor to modulate the frequency according to system load (that's basically whats explained in the README).

    Short answer :

    no need to "modify some text", just RTFM ;)

     

    • Like 2
  12. 9 hours ago, viettanium said:

    how to install this script?

    just put it to rc.d folder?

     

    Installation in rc.d will not work since this script do not provide start and stop args. As @Olegin spotted you can launch it form the task manager, that's the way i use it.

     

    Installation example (from your nas cli) :

    sudo curl https://raw.githubusercontent.com/Trauma/cpufreq-userspace-scaler/master/scaler.sh -o /usr/local/bin/scaler.sh && sudo chmod +x /usr/local/bin/scaler.sh

    Then run it through a startup triggered task, as root, in your DSM, with the following command :

    /usr/local/bin/scaler.sh &

    or with parameters :

    lowload=100 highload=200 scalingmaxfreq=2000000 scalingminfreq=1500000 /usr/local/bin/scaler.sh &

     

    • Like 2
  13. Hi,

     

    Since I was not yet able to build a working cpufreq_ondemand.ko to allow automatic frequency scaling for JUN's loader 1.04b (DSM 6.2.2-24922 Update 2), i've written this script to allow dynamic CPU frequency scaling.

     

    It's hosted here https://github.com/Trauma/cpufreq-userspace-scaler

     

    # cpufreq-userspace-scaler
    ##### Cpu frequency scaling script for cpufreq userspace governor
    
    ## If you're missing ondemand or conservative governors, this script is for you.
    
    This script is scaling cpu frequency according to current average load.
    You can set 3 frequency steps : low, mid, high. This 3 thresholds will 
    automatically set cpu frequency accordingly :
      - the `lowload` threshold will set the cpu to his minimal frequency, unless you force it to `scalingminfreq`
      - the `midload` threshold will set the cpu to approximate mid range cpu frequency
      - the `highload` threshold will set the cpu to his maximal frequency, unless you force it to `scalingmaxfreq`
    
    If you set `scalingmaxfreq` and/or `scalingminfreq` the cpu will never override those values.
    
    ### Usage :
    ### Parameters :
    Variable name   | Default | Type                        | Comments
    ----------------|---------|-----------------------------|-----------
    lowload         | 050     | integer between 000 and 999 | 050 = load average : 0.50
    midload         | 065     | integer between 000 and 999 | 065 = load average : 0.65
    highload        | 085     | integer between 000 and 999 | 085 = load average : 0.85
    scalingminfreq  | auto    | integer in hertz            | 800000 = 800 Mhz
    scalingmaxfreq  | auto    | integer in hertz            | 2500000 = 2,5 Ghz
    
    ### Default commande line :
    `./scaling.sh &`
    
    ### Custom command line example :
    `lowload=100 highload=200 scalingmaxfreq=2000000 scalingminfreq=1500000 ./scaling.sh &`

    Enjoy.

    • Like 4
    • Thanks 3
  14. Salut,

     

    - il me semble qu'il y a un bootloader compatible ici: http://www.xpenology.nl/boot-images/

    - Il n'y a pas de support à proprement parlé, peut être un peu sur xpenology... mais communautaire rien de plus.

    - Sur le forum et c'est tout il me semble

    - Oui il ya de l'open source, mais pas vraiment a jour, du coté Xpenology et Gno/Nanoboot :

    Synology c'est la http://sourceforge.net/projects/dsgpl/ (compiler et sources)

    Xpenology c'est la https://github.com/andy928/xpenology (repo) et wiki http://xpenology.com/wiki/en/building_xpenology

    Gno/Nanoboot c'est la https://github.com/sancome/DSM-5.0-4458_dsgpl-4418 (repo) et wiki http://nanoboot.eu.org/source

     

    Pour ce qui est des maj, oui avec nanoboot on peut faire les mise à jour, moyennant une ligne de commande. Pour ce qui est des mises à niveau il faut avoir un bootloader à jours pour pouvoir installer le nouveau "firmware".

     

    A+

×
×
  • Create New...