just want to say thanks, seems to work fairly well.
I set it to 100mb (have quite a few 4k hdr stuff)
and to use 85% of ram. (have 160gb, i have never seen more that 10gb used, only plex and nextcloud on this nas)
was able to do just under 1200 videos.
seems good like that, almost anything loads very fast now.
I put it in user scripts and it runs at 7am every morning.