FAQ  •  Register  •  Login

CPU Usage Optimization on Ubuntu

<<

zigz14

Serviio newbie

Posts: 2

Joined: Thu Mar 29, 2012 1:37 am

Post Thu Sep 27, 2012 3:20 am

CPU Usage Optimization on Ubuntu

Hello,

I've been able to piece together many of the guides around regarding installing and configuring on Ubuntu (mostly a Linux/Ubuntu newbie) and I've got it working well for the most part.

However, I seem to be running into a limitation with my CPU. Everytime I play an MKV (HD specifically) and some HD videos (mp4's 1080p mostly), it begins to stutter.

My limitation seems to be the CPU (Intel D525). When running an HD video, my CPU shows 100% usage in top, taken up mostly by ffmpeg (95-99%). I've downloaded ServiiDroid as a console since my Ubuntu install is headless (12.04.1 Server, x86). I am able to add and remove shared folders and have tried to add a second CPU under the ServiiDroid->Advancded->Transcoding Settings->CPU Cores, but it does't seem to be taking effect. When I view top while watching videos over SubSonic, my CPU usage goes well over 100% when transcoding. However, my CPU usage when viewing videos via Serviio never goes over 100%.

Other small details: the files are being accessed on an mdadm RAID5 with excellent performance, Ubuntu and Serviio are installed on a USB 2.0 8 GB thumb drive, system RAM is 4.0 GB DDR3, all network connections are 1 Gbps.

Please let me know if you have an suggestions, thank you.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Thu Sep 27, 2012 7:10 am

Re: CPU Usage Optimization on Ubuntu

Which devices are you streaming to as that is very imprortant as it determines if the video can be delivered natively (no cpu overhead), re-packaged into a different container (not ver expensive), or fully transcoded (expensive)? Most target video codecs support using multiple cores, but some only support 1.

I have the same CPU and noticed an improvement with SSSE3 enabled which let me just transcode to 720p in real time, however, I've had problems with the latest ffmpeg trunk, so try it with the last stable build as a base. I haven't spent to much time investigating though as most of the time my mkvs are just re-packaged into mpegts so it doesn't require that much cpu time.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

zigz14

Serviio newbie

Posts: 2

Joined: Thu Mar 29, 2012 1:37 am

Post Fri Sep 28, 2012 7:19 pm

Re: CPU Usage Optimization on Ubuntu

The end device is going to a XBOX 360 connected to a TV via composite cable (older TV).

How do I enable SSE3? viewtopic.php?f=14&t=6931&start=0 ? haven't read through it all, but it seems to be the post that tackles the question.

Thanks for the feedback.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Fri Sep 28, 2012 7:58 pm

Re: CPU Usage Optimization on Ubuntu

On phone so limited reply, just add the enable option when you run configure.
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Sep 29, 2012 10:23 am

Re: CPU Usage Optimization on Ubuntu

XBox profile transcodes to wmv which only supports 1 CPU core.
<<

robertsearle

Serviio lover

Posts: 66

Joined: Mon May 07, 2012 6:13 pm

Post Mon Oct 22, 2012 5:23 am

Re: CPU Usage Optimization on Ubuntu

The cpu always goes to 100% when transcoding regardless of what CPU you have. It tries to transcode the entire file all at once. There may or may not be a problem.

  • The easiest thing to do is turn the logging up to DEBUG.
  • Search the serviio log file for the exact ffmpeg command
  • Run the command but put a
      Code:
    time ffmpeg XXXXXXXXXXXX
    in front of it
  • Run it for around 30 seconds

Press Ctrl-C and stop the operation after 30 seconds. See how much of the file is actually processed. My *hope* is more than 30 seconds of video has been processed. Assuming more than 30 seconds has been processed, its probably not your server.

Q: Again, the file is written to tmp drive. Is that your USB thumb drive?

Q: Is it wireless or wired?

Q: I assume you are down-grading the video to less than 1080p. I am not sure if xbox handles 720p or less?

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 66 guests

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