[mythtv-users] Memory needs
linux at thehobsons.co.uk
Tue Oct 18 06:52:45 UTC 2016
Mike Carron <jmcarron at gmx.com> wrote:
> Is there a limit to the amount of memory a headless myth backend can effectively use? Memory is cheap enough that installing 16 or 32GB of RAM is not prohibitive as long as it is useful to have that much.
From my backend :
top - 07:44:57 up 1 day, 13:44, 1 user, load average: 0.03, 0.09, 0.13
Tasks: 106 total, 1 running, 105 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.6%us, 2.1%sy, 7.9%ni, 82.8%id, 5.4%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 2027944k total, 2012752k used, 15192k free, 17924k buffers
Swap: 0k total, 0k used, 0k free, 1457036k cached
Note that of the 2G of RAM it has, 1.5G is used for cache. 2G is "enough" (though that depends on your usage), 4G is better, beyond that gets into diminishing returns.
Main thing you can do with more ram is to tune the DB to use more - that's a juggling act between performance (not doing disk I/O) and memory usage. You can't reply on the system to cache the database files as the other activities will keep pushing that out of the cache.
After that it comes down to what Myth can use it for. If you are doing (for example) commflagging, then more memory means that the data for recordings will hang around in the cache for longer, and thus the commflagging can be done later without causing additional disk I/O. I fyou can always comflag all your recordings in real-time then that's not a consideration - if you limit the number of jobs to less than the max number of recordings, or the system can't do them in real-time, more ram means a longer window for the job to use data that's still in memory.
Similarly if you are in the habit of watching "not too long" after the recording is done. If the recording is still in cache then there's no disk I/O to retrieve it for playback.
So I'd say there's a definite case for 4G, 8G may or may not help, beyond that is distinctly questionable and is more down to how you use the system than what Myth itself needs.
More information about the mythtv-users