[mythtv-users] swappiness

Hika van den Hoven hikavdh at gmail.com
Fri Feb 12 10:02:22 UTC 2016


Hoi Marius,

Friday, February 12, 2016, 10:23:16 AM, you wrote:


> 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--

>  

On attached picture you see my memory usage for the last month.
Average swap usage is little over 400 Mb. Most just sitting there
doing nothing. 
Memory usage without the cache is 1.25 Gb with an occasional peak to
in between 2.5 and 3GB
I have 4Gb and next to the MythTV backend with a 4 tunner HDhomerun
attached, it runs:
samba, cups, apache, ldap, dhcpd, named, courier mail, nfs and some
further minor things.

So with 8 GB?

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sys-memory-1m.png
Type: image/png
Size: 26890 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160212/f20701e8/attachment-0001.png>


More information about the mythtv-users mailing list