1

I have a system set up dedicated to media streaming (Kodi/HTPC), running Ubuntu 16.04 (Xenial).

I'd like to limit resource usage (CPU/RAM) to the bare minimum for everything that isn't necessary to Kodi's operation.

I can do without most of what Compiz/Unity offers, but removing them completely will most likely have an affect on Kodi as well.

What can I change/remove to minimize CPU and memory usage, without affecting Kodi? Switching to a different desktop environment/window manager is definitely a viable option, I'd just appreciate a few pointers on where to start. I'd like to avoid making a switch to a different distro, if possible.

Charles
  • 13

1 Answers1

2

I have a box running kodi myself, and can share a few tips:

  1. Do not run a desktop environment. Start kodi straight from the login screen.
    1. If you have a large media library, using mysql for backend database may make sense.
    2. Watch top, and see what actually uses CPU and memory. On my mediacenter it's basically mythbackend and kodi that consumes anything at all. On idle, with myth scanning epg, cpu use is 10% and load 0.1

By default there's really not a lot of processes using CPU. If you experience any playback issues, it's worth looking into those issues, not lowering cpu use in general.

Regarding memory, that's rarely an bottleneck on modern systems. Kodi is reported in at 7% of 8GiB, when playing a 1080p file. When not playing, it registers at 3%.

TL;DR: Do you expirience any problems? If not, leave it alone. If you have enough memory, it should not matter to you how this is used?

vidarlo
  • 22,691
  • 1
    Other than Kodi, Compiz is probably highest in CPU usage, and at times Sickrage/Deluge/CouchPotato/Pulseaudio. How can I start Kodi straight from login without a DE? The thread linked doesn't touch on that much. The reason I'm trying to lower CPU usage is because my system seems to be running rather hot and the fans are spinning constantly. It's custom-built, and the fans should be more than enough - I've looked into the fan issue several times before. – Charles Nov 11 '17 at 13:40
  • If you installed kodi from the repositories, it should appear as a DE at the login screen. Click the circle/dot next to the username, and select Kodi as the Desktop Environment. – vidarlo Nov 11 '17 at 13:44
  • 1
    I've added autologin-session=kodi to /etc/lightdm/lightdm.conf in addition to the autologin user I already had set up there, and now the system boots into the Kodi "DE" instead. Let's see if this has an effect on resource usage over the next few days. Thank you @vidarlo! – Charles Nov 11 '17 at 14:57