[mythtv-users] swappiness

Marius Schrecker marius.schrecker at lyse.net
Fri Feb 12 09:23:16 UTC 2016


Hi all,

 My MythTV / Hardware upgrade is going ahead. So I now have
 * MythTV 0.27 frontend/backend installed on my SSD * Database updated and migrated, * /var/lib/mythtv transferred to a larger (3TB) low energy disk. I might put all of /var/ there * increaed RAM to 8 GB DDR2 800MHz (max for my MB) * my old system 2 1/2" disk available to the system for... whatever. It has done 47 000 hours  albeit with no errors - so plan is to use it as little as possible).I did some trawling through gossamer threads, but don't see any recent threads regarding what can be regarded as a safe amount of RAM to disable swap on a combined FE/BE system.

The current plan is to turn swappines down to 1 or 10 (depending on advice given here) and put the swap partition  - and only the swap partition - on my old system drive, spinning it down when not in use. That way it should only ever spin up to avoid the hopefully rare situation that something eats through all my RAM and causes a hard crash.

 So to the questions:


1. Is 8 GB enough to run my system without expecting swap to be used? Apart from Myth, I'm running xfce and a logitech media server for my squeezebox (highly recommended for music), very little else.

2. If the answer to 1. is YES, What tweaks are recommended to /etc/sysctl.conf ? The following suggestion is from http://jhauser.dyndns.org:8080/archives/html/mythtv-users/2010-02/msg00958.html

# Control the degree the kernel prefers to swap when trying to free
memory (default 60)
vm.swappiness=0

# Reclaim cache memory faster for directory and inode objects (default
100)
vm.vfs_cache_pressure=10000

# Let dirty data consume this percentage of memory (default 10)
vm.dirty_ratio = 1

# Let dirty active data consume this percentage of memory (default 5)
vm.dirty_background_ratio = 1

# Wake up pdflush to write to disc (default 500)
vm.dirty_writeback_centisecs = 250

# How old data can be before it should be considered dirty and written
to disk (5min) (default 3000)
vm.dirty_expire_centisecs = 3000

3. Assuming that swap is only there for emergencies, is the old disk a good place to put it and is it a good idea to make sure it is spun-down when not in use? That way, swap will never compete with other disk I/O and doesn't take any vaulable space from my media partition.

4. What about the rest of /var ? Better on the SSD (where log/ will cause writes) or on the media disk, where it will compete on a small way with access to the media files?  On my old system /var/ excluding lib/mythtv was only a few hundred MB in size.

  I'd be interested to hear what anyone has to say about any or all of the above.

Thnks!

--Marius--

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160212/b508bc43/attachment.html>


More information about the mythtv-users mailing list