[mythtv-users] swappiness

Eric Sharkey eric at lisaneric.org
Fri Feb 12 13:42:52 UTC 2016


On Fri, Feb 12, 2016 at 4:23 AM, Marius Schrecker
<marius.schrecker at lyse.net> wrote:
> 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.

Yes, that should be enough.

> 2. If the answer to 1. is YES, What tweaks are recommended to
> /etc/sysctl.conf ?

Personally, I wouldn't bother changing anything.  I doubt you'll
notice a difference.

These parameters can be critical for high performance systems running
specific workloads at high volume, but for what you describe the
defaults really should be fine.

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

The question you should be asking is if you want swap at all.  What
sort of "emergencies" are you expecting?

If you want a reliable system, you may actually be better off without
swap at all than with swap set to an old spun-down disk.  You may find
out two years from now that the disk won't spin up when you finally do
need swap, and the kernel's OOM killer might have actually done a
better job for you than handling this swap-device unavailable state.

> 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 think most of the fears about writing to SSD due to limited numbers
of write-cycles are largely overblown.  If you monitor the smart
statistics and just plan on replacing the drive every 5 years or so
(which you'd likely do anyway), you'll be fine.

My oldest SSD is holding the OS partition for the machine in my
bedroom.  (/home is NFS mounted from another system, but everything
else is on the SSD, including /var/log and a 4GB swap file (system has
4GB of RAM)).  It's used as a mythtv front-end and a web browser and
for light gaming.  Smart reports:

  9 Power_On_Hours          0x0000   ---   ---   ---    Old_age
Offline      -       48721
209 Remaining_Lifetime_Perc 0x0000   ---   ---   ---    Old_age
Offline      -       98

48K hours on, 98% life remaining.

Eric


More information about the mythtv-users mailing list