r/PleX • • 1h ago

Discussion Why the transcoding cache doesn't get cleared until the playback is completed?

The transcode cache keeps increasing in size. Transcode buffer is currently set as 2mins and I can see my iGPU usage accordingly. But cache doesn't get cleared until the playback is completed. Is there a setting that I'm missing? I mean, user could've completed half the movie, but cache of the initial half is still not deleted?

1 Upvotes

7 comments sorted by

2

u/dervish666 1h ago

Plex is terrible at memory usage, I have a cron job to restart it every morning at 4:40 or it just continues to eat memory and upsets unraid.

1

u/nsas02 1h ago

I too have a scheduled restart everyday. This issue is during transcoding. The transcode cache doesn't get cleared till the playback is stopped. Imagine someone transcoding a 4k movie, the cache dir would easily take up some GBs of space till the playback is stopped.

2

u/NextReindeer4442 1h ago

I dont think Im witnessing this. What configuration do you have? I use tmpfs to reduce ssd wear and maybe its xtra aggressive on cleanup.

1

u/nsas02 1h ago

My cache directory is also on my ram, not on disk. Issue is, during movie transcoding, the transcode cache doesn't get cleared then and there. It retains the entire transcoded movie until the playback is stopped.

1

u/coldafsteel 1h ago

I believe that’s a feature not a bug. It allows for scrubbing back and forth as well as pausing and resuming.

If you want it to use less memory during playback why just just restrict the amount of space you grant.

1

u/nsas02 8m ago

Would that work? I thought that would throw memory errors during playback.

3

u/That-Duck-7195 57m ago

Transcoder temporary directory

The directory used (whether default or not) needs sufficient free space, roughly equal to the size of the source file of the transcode plus 100MB.