Transcoding Stumbles with large page cache

Server Version#: 1.22.0.4163
Player Version#: roku 6.7.15

I’m running PMS on my ds 412+ and I recently upgraded the ram from 1GB to 4GB. Before the upgrade I could watch some SD divx shows and the software transcoding could handle converting the divx avi to h264 with less than a minute of buffering at the start and then smooth sailing. After the upgrade the first 30 minute show will play like before but subsequent shows that require transcoding will take several minutes to transcode and then only play for a few seconds before needing to buffer again. The CPU is at ~93-95% for the first episode (I don’t know what it was before the upgrade but I imagine similar) and the second is 98%/99%. I tried tweaking some system settings and rebooting and it would work for one episode but then the problem came back. I noticed the page cache would be over 2GB when I was having problems (and it would clear when rebooting obviously) so I tried clearing the page cache ( sync; echo 1 > /proc/sys/vm/drop_caches ) and the episode played fine. As I watched the transcoded episode I saw the cache rising again. From what I’ve read clearing this cache should never be neccessary in linux as it is available to any process that wants it. It seems like plex may be creating this cache buildup and then is trying to use the cache but having problems. Does that make any sense? Is there a solution other than dropping the cache every time I need to transcode something? I’ve attached my logs in case they’re any help.Plex Media Server Logs_2021-03-15_00-17-29.zip (2.8 MB)

Did you swap 1x 1GB for 1x 4GB or did you put in the proper 2x2GB?

Also, what is the bitrate of the video file?

The D2700 CPU is essentially obsolete and incapable of any transcoding unless carefully orchestrated.

It can handle 480p / 576p and some 720p. It cannot handle more than that except DirectPlay

The NAS Compatibility Guide is here.

1x 4GB (https://smile.amazon.com/dp/B008CP5QJK/ref=cm_sw_em_r_mt_dp_BBDPW0QV1D7JJXNV5K3B?_encoding=UTF8&psc=1) as there is only one slot in the motherboard for the 412+. If there’s a better match I wouldn’t mind spending another $30 to do it right.

I’ve tried two files that are xvid avi files with bitrates of 1254 kbps and 1036 kbps. So I don’t expect performance to be great but it can usually handle transcoding one SD stream and it still does until the cached section of dsm’s memory monitor fills up to over 2GB and the free section is under 200MB. I would guess the problem would start before the cache gets that big but I’m not sure how to test where it starts failing exactly. When transcoding fails like this I can still direct play files just fine although watching something via direct play will fill up the cached section of dsm’s memory monitor.

Also the maintenance tasks like “detect intros” will fill up the cache (which makes sense since it’s using the transcoder) and peg the cpu whereas the cpu will be around 30% normally doing such tasks.

Thanks for any tips on where I might look. I realize this is a very niche issue and I’m not sure what to search for. My next guess is that something is wrong with my system that results in the cached memory not getting freed for plex’s transcoder?

Just as another data point, I was able to watch two episodes of one show that was having problems and one episode of the other show without any problems. There is still over 2.4 GB free RAM. and 827 MB cached pages. So it’s working but who knows for how long. Replicating the issue might be more difficult now.

Thank you for providing the extra details.

  1. It’s been so long since anyone’s mentioned a DSx12 series that I forgot it only has 1 slot.

  2. Turn off Intro detection. You don’t have enough CPU power to run that effectively.

  3. Also check the transcoder settings. Make certain HDR transcoding is off. (it seems to be enabled by default )

  4. You should probably consider backing down the PMS version to something pre-HDR which is more appropriate for the unit. PMS keeps growing and making higher demands of the CPU. Your system is already below the minimum and will only continue to degrade as time goes on if you keep updating.

Thanks for the tips! Intro detection has been working alright running overnight for the few shows that are added. It occasionally decides to redo all of doctor who sometimes. I ignored the HDR setting before as I don’t have any HDR content so I figured it wasn’t helping/hurting. I know my rig is old but it works great for the 720p/1080p stuff I do watch but you make a good point in that lots of great features will continue to be added and I’ll need to stop upgrading it or upgrade my NAS or possibly add a small dedicated plex server. Thanks for all the help!

It’s not the ideal solution but things have been working fine since I added a scheduled task to drop the cache every hour via this command:
sync; echo 1 > /proc/sys/vm/drop_caches

Again thanks for your help, Chuck!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.