Tips and Tweaks Plugin to possibly improve performance of Unraid and VMs


Recommended Posts

2 minutes ago, cjohnson46 said:

I previously had it set to 23:00 for "power save" then 09:00 for "Normal (On demand)". So you're saying that the cron won't trigger until it goes past 23:00 or 09:00.  It was set last night before 23:00 but didn't trigger/change when I checked at 07:00. I'll give it a couple more tests and see if I can figure it out. 

I ran a quick test and it did work for me.

Link to comment
  • 1 month later...

anyone else seeing that since upgrading to 6.12,  the tips and tricks plugin 'Enable syslog Archiving?' option no longer results in the syslog getting archived on restart?

 

i had an issue after upgrading to 6.12 and had to restart to fix, I went to get logs and noticed my last saved logs was the 6.11.5->6.12 reboot.

I've not had a chance to restart for a 3rd time to see if it was just an issue during the first reboot of an upgrade or what

 

 

Edited by zoggy
Link to comment
1 hour ago, zoggy said:

anyone else seeing that since upgrading to 6.12,  the tips and tricks plugin 'Enable syslog Archiving?' option no longer results in the syslog getting archived on restart?

 

i had an issue after upgrading to 6.12 and had to restart to fix, I went to get logs and noticed my last saved logs was the 6.11.5->6.12 reboot.

I've not had a chance to restart for a 3rd time to see if it was just an issue during the first reboot of an upgrade or what

 

 

I jsut ran a quick test and it worked for me.  Make sure your flash drive doesn't have any errors.

Link to comment
On 6/15/2023 at 8:00 PM, dlandon said:

I jsut ran a quick test and it worked for me.  Make sure your flash drive doesn't have any errors.

tested when upgrading to 6.12.1 and yep worked fine. so no idea what happened on the 6.11.5->6.12.0, gremlins.

Link to comment
3 hours ago, Masterwishx said:

Having huge amount of User Watches ,after disabled plugin Fiile Activity still have Current User Watches = 12486295

is it normal size ?

 

image.thumb.png.67dd4c60d2e88e2d8328032048423802.png

 

That shouldn't be a problem.  File Activity is not the only process to use Inotify Watches.

Link to comment
8 hours ago, Masterwishx said:

Yes i know , but i was thinking after disabled the plugin should be less , but after boot today is even more ! 

image.thumb.png.75d50fa666c4f23332f52b7afc4b4a76.png

 

 Pretty normal. Anything you have that 'watches a directory for changes' will add to this list - Plex, Tdarr, Sonarr, NZBGet/SabNZB, Radarr, etc. In the end, it's just a number, albeit one that's useful for keeping the number of disk spinups down.

  • Like 1
Link to comment

its strange but found :

Because each watch is a structure, available memory is also a bottleneck for using inotify. In fact, a watch can take up to 1KB of space. This means a million watches could result in 1GB of extra RAM usage.

https://www.baeldung.com/linux/inotify-upper-limit-reached

 

Also when changed to 14506750 i didnt saw memory use increased .... for now i was set back to default ...

Link to comment
7 hours ago, Masterwishx said:

i moved dockers to br1 becose of macvlan problem:

befor i had bond0 of two interfaces and they was both in ethernet nics, now only eth0, should i add also eth1 that is docker network ...

image.thumb.png.761b5b2b893abb90164dfbf57750391f.png

 

Yes, if you want to make adjustments to that NIC also.

  • Like 1
Link to comment
  • 3 weeks later...
  • 2 weeks later...

I think the Tips and Tweaks output for Current User Watches is wrong, if I had "-1449511" watches I should be seeing other issues.

I ran this manually along with a script below and they are both giving the same results:

find /proc/*/fd \
    -lname anon_inode:inotify \
    -printf '%hinfo/%f\n' 2>/dev/null \
    \
    | xargs grep -c '^inotify'  \
    | sort -n -t: -k2 -r 
/proc/24962/fdinfo/21:19423
/proc/24968/fdinfo/21:10640
/proc/34743/fdinfo/66:4801
/proc/9574/fdinfo/22:1254
/proc/20814/fdinfo/221:521
/proc/1324/fdinfo/5:41
etc.....


Github Script:

curl -s https://raw.githubusercontent.com/fatso83/dotfiles/master/utils/scripts/inotify-consumers | bash

   INOTIFY   INSTANCES
   WATCHES      PER   
    COUNT     PROCESS   PID USER         COMMAND
------------------------------------------------------------
   19423         1     24962 nobody      /app/Tdarr_Server/Tdarr_Server /snapshot/be/srcug/fo
   10640         1     24968 nobody      /app/Tdarr_Server/Tdarr_Server /snapshot/be/srcug/fo
    4801         1     34743 nobody      /usr/lib/plexmediaserver/Plex Media Server
etc.......

   36806  WATCHES TOTAL COUNT

 

It seems that the Tips and Tweaks script (took this command from the script) is only adding the PIDs together and not the actual count of active inotify watches? I grepped for my Plex PID and got a match.

find /proc/*/fd -lname anon_inode:inotify | cut -d/ -f3 | awk '{s+=$1} END {print s}' 
2138818

find /proc/*/fd -lname anon_inode:inotify | cut -d/ -f3 | grep 34743
34743


If we dig into the PID though we get the actual inotify watch count, example count from my Plex PID:

grep -c '^inotify' /proc/34743/fdinfo/66
4801


 

Screenshot from 2023-07-23 01-16-07.png

Edited by enlinks
grammer
Link to comment
  • 1 month later...

Setting the CPU scaling governor to "power save" but keeping turbo boost enabled still seems to cap the CPU at the non-turbo speeds. Is that expected? I had to manually set the `scaling_freq_max` to the maximum frequency (cpuinfo_max_freq) per core:

for x in /sys/devices/system/cpu/cpu*/cpufreq/; do cat $x/cpuinfo_max_freq > $x/scaling_max_freq; done

 

It'd also be useful to have an option to control the energy/performance preference for the hardware-managed P-states (HWP) of Intel CPUs: The `energy_performance_preference` setting (`/sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference`) defaults to `balance_performance` but it can be set to `balance_power` to tell the CPU to focus on energy saving instead of performance. (the CPU scaling governor affects the software governor in Linux, while `energy_performance_preference` affects the CPU's internal logic)

 

with energy_performance_preference set to balance_power, the CPU cores won't turbo unless they really needs to (if CPU usage is high enough to need it).

Edited by Daniel15
Link to comment
2 hours ago, Daniel15 said:

Setting the CPU scaling governor to "power save" but keeping turbo boost enabled still seems to cap the CPU at the non-turbo speeds. Is that expected?

Probably.  Although I'm not a cpu governor expert.

 

2 hours ago, Daniel15 said:

It'd also be useful to have an option to control the energy/performance preference for the hardware-managed P-states (HWP) of Intel CPUs: The `energy_performance_preference` setting (`/sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference`) defaults to `balance_performance` but it can be set to `balance_power` to tell the CPU to focus on energy saving instead of performance. (the CPU scaling governor affects the software governor in Linux, while `energy_performance_preference` affects the CPU's internal logic)

 

It looks like this applies to the intel_pstate governor only.  There are more than two states available on my inel cpu:

root@MediaServer:~# cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
default performance balance_performance balance_power power 
root@MediaServer:~# 

 

I don't understand the 'default' setting - maybe a default cpu setting.  On my system the default is:

root@MediaServer:~# cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference 
performance
root@MediaServer:~# 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.