FAQ  •  Register  •  Login

How to configure and optimize Serviio



Serviio newbie

Posts: 14

Joined: Wed Jul 23, 2014 12:07 pm

Post Sun Nov 22, 2020 4:05 pm

How to configure and optimize Serviio


I'm using Serviio V2.1 on virtual server (VmWare esxI on Hp Proliant DL 380 server).
Serviio is installed on Debian 10 (buster).
oracle-java8-installer : 1.8.0_201-b09
ffmpeg 3.2.4

The Vm has 2G of memory and 2G of swap (not often used), And 4vCpu (ntel(R) Xeon(R) CPU E5420 @ 2.50GHz).
My library is on a NAS (4 disks raid5) over a SMB shared, the network allow me to read/write almost 1Gb/s

Here is the launch options :
 java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade -Dderby.system.home=/etc/serviio/library -Dserviio.home=/etc/serviio -Dffmpeg.location=ffmpeg -Ddcraw.location=dcraw -classpath /etc/serviio/lib/*:/etc/serviio/config org.serviio.MediaServer

When I use Serviio for stream normal videos (from 300Mb to 4G), all is ok.
But when I Try to used a more bigger video there are freezes, and lag, so bugs.

I think we can configure java options and more others things.
Here is the question : how optimize Serviio? and where do it ?

I don't see load or memory consumption. There is no error in logs.
Does someone has an idea ?



Serviio newbie

Posts: 8

Joined: Tue Oct 29, 2019 9:04 pm

Location: Chicago, Illinois, USA

Post Tue Nov 24, 2020 6:26 pm

Re: How to configure and optimize Serviio

You can use the top command to monitor running processes. The serviio instance will show as java, but you should see it pop up and down as it uses the poller to check files, as well as when transcoding requires CPU time. Hitting Ctrl+C will exit top...

I don't consider myself a java expert, but changing the Xmx and Xms size and Min/Max Heap free may help you, especially with larger files.

In my case the Oracle Java caused more problems than it was worth and I moved over to the openjdk quite some time ago. You should be able to install it using "sudo apt install openjdk-8-jre", and switch back and forth between java versions by stopping serviio, using "sudo update-alternatives --config java" to change the java version , and then starting serviio back up to see if one works better than the other.

Edit: Adding a few more things for troubleshooting...

You may want to see if you can use NFS on your file share, as some NASes with SMB use SMB 1.0 which sometimes has issues with larger files.

My java options look like this (but remember I have a lot more RAM and Serviio on a RAMdisk), and the movies run lightning fast (no matter what size movie file): -Xmx8G -Xms4G -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=80 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true etc...

Make sure your transcoding goes to a hard disk location (like /tmp) in the console, and not a tmpfs location (like /run or /dev/shm).
Serviio Server - Dell PowerEdge R420, Dual Xeon E5-2420, 4x120 GB SSD RAID 0, 64 GB RAM (Serviio running from RAMdisk), 4 NICs (aggregated to LAN), 10Gbe to NAS, Ubuntu 20.04.1 Minimal
NFS File Server - Synology DS1517+, 20TB disk space (5x4TB), 4 NICs aggregated to LAN, 10Gbe to Serviio Server

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 27 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.