INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Performance  (Read 5292 times)

DrewD

  • Member
  • *
  • Posts: 4
Performance
« on: September 13, 2016, 01:04:32 pm »

I'm running MC22 on a fresh install of Lubuntu 16.04. It's on an old Toshiba Satellite C655S, which is an AMD E300 dual core processor running at 1.3GHz. It has 4GB of memory. It streams to an external DAC, an SMSL M8. I have configured MediaCenter for bit perfect audio, so the computer should be doing no decoding of its own, just streaming the data to the DAC.

Previously, I had MC21 installed on an Acer Aspire One, an Atom-powered netbook with 1.5GB of RAM, also running Lubuntu. The performance difference between the two systems is like night and day - the netbook was much better. The big problem is that the Toshiba has a staggering amount of lag in responding to mouse clicks on the controls.  It can take up to half a minute to pause playback for instance.  While playing, MediaCenter shows 100%+ CPU usage and 70%+ at idle.  I've tried a low-latency kernel, but that makes no difference.  The audio plays fine, without any stuttering or skipping.

I'm using the 32 bit version of Lubuntu. All of my music is on a USB hard drive. No other applications run on this computer - it's dedicated to music only.  Memory usage is under 10%.  I'm stumped - what can I do to improve performance?
Logged

DrewD

  • Member
  • *
  • Posts: 4
Re: Performance
« Reply #1 on: September 13, 2016, 01:17:46 pm »

It never fails - as soon as I agonize for half a day about something, then finally post about it, the solution pops up.

I disabled the spectrum analyzer display that is enabled by default and MediaCenter became way more responsive. CPU usage did not change, but it responds to mouse clicks quickly now.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Performance
« Reply #2 on: September 13, 2016, 03:20:33 pm »

While playing, MediaCenter shows 100%+ CPU usage and 70%+ at idle.

That sounds very wrong.

MC Linux experts:  What is typical CPU usage for a low powered Linux MC system?

Brian.
Logged

DrewD

  • Member
  • *
  • Posts: 4
Re: Performance
« Reply #3 on: September 13, 2016, 03:43:37 pm »

I just ran top after the system was sitting idle for about an hour and MediaCenter is at around 5%. Playing a FLAC file right after that, it's about 40%.  Scrolling through the graphical artist list runs the CPU usage up to 60%.  Playing a DSD file is also about 40%.

MC must have been doing something processor intensive while I was checking it out earlier.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71370
  • Where did I put my teeth?
Re: Performance
« Reply #4 on: September 13, 2016, 05:54:22 pm »

People have reported that disabling the spectrum analyzer (by clicking on it) affected performance.  We're looking at the issue now.
Logged

Rizlaw

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 283
Re: Performance
« Reply #5 on: September 14, 2016, 07:06:52 pm »

My observations on the spectrum analyzer concerning JimH's comment above:

1 The display itself can be slow and jerky and come to a complete pause for a second or two.

2 The SA definitely adds about 5 to 10 % more user cpu usage to my i7 920 running at 3.2GHz.
Without the SA running my cpu utilization is between 1 - 3% for normal playback with or with equalization for my LCD-2.1 headphones which are the rather dark sounding without EQ.

3 I do not see or hear any impact on the overall performance or quality of the sound with the SA turned on or off apart from increased cpu utilization. I imagine each DSP function that is used adds a little bit of additional stress to the cpu.
Logged
Ubuntu Gnome 20.04 LTS

DrewD

  • Member
  • *
  • Posts: 4
Re: Performance
« Reply #6 on: September 15, 2016, 01:44:36 pm »

My observations on the spectrum analyzer concerning JimH's comment above:

1 The display itself can be slow and jerky and come to a complete pause for a second or two.

2 The SA definitely adds about 5 to 10 % more user cpu usage to my i7 920 running at 3.2GHz.
Without the SA running my cpu utilization is between 1 - 3% for normal playback with or with equalization for my LCD-2.1 headphones which are the rather dark sounding without EQ.

3 I do not see or hear any impact on the overall performance or quality of the sound with the SA turned on or off apart from increased cpu utilization. I imagine each DSP function that is used adds a little bit of additional stress to the cpu.

In my case, the CPU in my computer is a pretty slow AMD notebook processor, so there's little performance margin.  While I didn't notice any music lag issues, the display became extremely unresponsive to mouse clicks. The mouse pointer wasn't affected, just responses to clicking. I have an external DAC, so that's probably why there was no problem with the music.
Logged

terrym@tassie

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 471
Re: Performance
« Reply #7 on: September 15, 2016, 02:43:28 pm »

I have an old Samsung NC10 netbook that I use as a client (Linux Mint 18 Xfce) and if the Spectrum Analyzer is enabled it is completely unusable.
It is so bad that I have to terminate the Media Center process to recover as MC effectively hangs.
It continues playback OK but I cannot stop, pause or seek. The cpu utilization goes to 100%.
If I have the Spectrum Analyzer turned off it is usable running at 10-20% cpu.
The cpu is an old 32 bit only Atom so it is very low powered.
I previously used Windows XP on this netbook and had no issue with having the Spectrum Analyzer enabled so it is definitely a 'Linux only' problem.
It is worth noting that MC used to run at a lower cpu utilization with Windows XP, playback was 4-8% as opposed to 10-20% with Mint18 (and previously Mint17).
Logged
" I like work: it fascinates me. I can sit and look at it for hours." -Jerome K. Jerome

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13488
Re: Performance
« Reply #8 on: September 23, 2016, 05:26:19 pm »

I have an old Samsung NC10 netbook that I use as a client (Linux Mint 18 Xfce) and if the Spectrum Analyzer is enabled it is completely unusable.
It is so bad that I have to terminate the Media Center process to recover as MC effectively hangs.
It continues playback OK but I cannot stop, pause or seek. The cpu utilization goes to 100%.
If I have the Spectrum Analyzer turned off it is usable running at 10-20% cpu.
The cpu is an old 32 bit only Atom so it is very low powered.
I previously used Windows XP on this netbook and had no issue with having the Spectrum Analyzer enabled so it is definitely a 'Linux only' problem.
It is worth noting that MC used to run at a lower cpu utilization with Windows XP, playback was 4-8% as opposed to 10-20% with Mint18 (and previously Mint17).
I'd guess that 2d acceleration isn't working on your X. You probably don't want to try and play any video ;)
Logged

geier22

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 418
Re: Performance
« Reply #9 on: September 23, 2016, 11:24:29 pm »

I have an AMD FX 6300 CPU utilization with Specktrum Analyser is signifcantly higher. I can imagine that with a less powerful processor a sensible display is no longer possible.
Measurement results with and without Spectrum Analyzer (The values are constant for all 5 measurements):
Code: [Select]
cpustat -a 5 5
  %CPU   %USR   %SYS   PID S  CPU   Time Task
  9.47   2.00   7.47  2753 S    4  7.84m /usr/lib/xorg/Xorg
  6.40   3.83   2.57 30477 S    2  7.01m /usr/bin/mediacenter22
  0.63   0.40   0.23  2920 S    5 54.77s /usr/bin/compton
  0.23   0.07   0.17  3115 S    3 57.42s conky
  0.03   0.00   0.03     7 S    2  6.42s [rcu_sched]
  0.03   0.03   0.00 22805 S    0 12.49s mono
  0.03   0.00   0.03  2482 S    1  0.13s [jbd2/sdd5-8]
  0.03   0.03   0.00 32128 S    2  2.26s /usr/bin/xfce4-terminal
  0.03   0.03   0.00 22091 S    3 14.62s /usr/bin/mono
  0.03   0.00   0.03 11928 S    4  1.04s [kworker/4:0]

%CPU   %USR   %SYS   PID S  CPU   Time Task
  1.37   1.13   0.23 30477 S    5  7.27m /usr/bin/mediacenter22
  0.73   0.40   0.33  2753 S    2  8.19m /usr/lib/xorg/Xorg
  0.20   0.10   0.10  3115 S    0 58.30s conky
  0.07   0.03   0.03 22805 S    4 12.65s mono
  0.07   0.07   0.00  2879 S    5 19.17s mono
  0.03   0.00   0.03 26540 S    2  0.01s [kworker/2:0]
  0.03   0.03   0.00  2920 S    2 56.26s /usr/bin/compton
  0.03   0.03   0.00  2919 S    2  1.44s xscreensaver
  0.03   0.00   0.03 11928 S    4  1.14s [kworker/4:0]

Edit:

I have tested this (same song and with and without Spectrum Analyzer) with Audiacus and VLC
Code: [Select]
with Audiacus

# cpustat -a 5 2
   %CPU   %USR   %SYS   PID S  CPU   Time Task
  1.07   1.03   0.03   690 S    0 38.05s audacious
  0.63   0.53   0.10  2753 S    2 11.46m /usr/lib/xorg/Xorg
  0.30   0.10   0.20  3115 S    0  1.55m conky
  0.10   0.07   0.03  2943 S    1  2.77s /usr/bin/pulseaudio
  0.07   0.03   0.03  2920 S    0  1.46m /usr/bin/compton
  0.03   0.00   0.03 22805 S    2 19.31s mono
  0.03   0.03   0.00  2929 S    4  0.97s /usr/bin/python3
  0.03   0.03   0.00 22091 S    3 23.22s /usr/bin/mono


# cpustat -a 5 2
  %CPU   %USR   %SYS   PID S  CPU   Time Task
  2.76   2.16   0.60  2753 S    4 11.40m /usr/lib/xorg/Xorg
  1.16   1.10   0.07   690 S    4 35.54s audacious
  0.50   0.37   0.13  2920 S    2  1.45m /usr/bin/compton
  0.23   0.10   0.13  3115 S    5  1.54m conky
  0.10   0.07   0.03  2943 S    2  2.59s /usr/bin/pulseaudio
  0.07   0.03   0.03 22805 S    2 19.21s mono
  0.03   0.00   0.03 25603 S    4  1.19s [kworker/4:3]
  0.03   0.03   0.00  2929 S    2  0.94s /usr/bin/python3
  0.03   0.00   0.03 22091 S    1 23.11s /usr/bin/mono

with VLC

  # cpustat -a 5 2
 
 %CPU   %USR   %SYS   PID S  CPU   Time Task
  1.70   0.97   0.73 15592 S    0 19.62s /usr/bin/vlc
  1.10   0.23   0.87  2753 S    0 11.86m /usr/lib/xorg/Xorg
  0.33   0.20   0.13  2920 S    4  1.54m /usr/bin/compton
  0.27   0.07   0.20  3115 S    3  1.64m conky
  0.17   0.03   0.13  2943 S    2  5.03s /usr/bin/pulseaudio
  0.07   0.03   0.03 22805 S    4 20.29s mono
  0.07   0.03   0.03 22091 S    0 24.21s /usr/bin/mono
  0.03   0.00   0.03    21 S    2  0.15s [ksoftirqd/2]
  0.03   0.03   0.00   699 S    2  0.31s /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd
  0.03   0.00   0.03 25603 S    4  1.42s [kworker/4:3]
  0.03   0.03   0.00  2868 S    2  4.05s xfce4-panel
  0.03   0.00   0.03 12225 S    0  0.30s [kworker/0:1]

  # cpustat -a 5 2
  %CPU   %USR   %SYS   PID S  CPU   Time Task
  0.57   0.53   0.03 15592 S    0  7.73s /usr/bin/vlc
  0.47   0.33   0.13  2753 S    3 11.71m /usr/lib/xorg/Xorg
  0.30   0.07   0.23  3115 S    2  1.61m conky
  0.13   0.07   0.07  2943 S    0  4.12s /usr/bin/pulseaudio
  0.07   0.03   0.03  2920 S    5  1.50m /usr/bin/compton
  0.07   0.03   0.03 22091 S    0 23.85s /usr/bin/mono
  0.03   0.00   0.03     7 S    0 10.20s [rcu_sched]
  0.03   0.00   0.03 15641 S    4  0.18s [kworker/4:0]
Logged
Debian Testing x64 (multiarch) Xfce
TEAC UD-H01 - Yamaha A-S1000 /
Midrange- Studiomonitore by FÖÖN
AsRock Z390 Extreme4- Intel Core i9 9900/ 32 GB Ram

terrym@tassie

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 471
Re: Performance
« Reply #10 on: September 27, 2016, 04:10:04 pm »

I'd guess that 2d acceleration isn't working on your X. You probably don't want to try and play any video ;)
Thanks for the reply Bob, I've checked my X setup and it seems to be correctly using the Intel driver:
Graphics:  Card: Intel Mobile 945GSE Express Integrated Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1024x600@60.00hz
           GLX Renderer: Mesa DRI Intel 945GME x86/MMX/SSE2
           GLX Version: 1.4 Mesa 11.2.2 Direct Rendering: Yes
I can also play video OK on the Netbook (not that I want to...), it is only when I enable the Spectrum Analyzer do I get issues. I fact I was incorrect the CPU DOESN'T go to 100%, it goes to about 75% but JRiver is very, very unresponsive to any input (including Stop)
Curious eh?
Logged
" I like work: it fascinates me. I can sit and look at it for hours." -Jerome K. Jerome

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13488
Re: Performance
« Reply #11 on: September 27, 2016, 05:05:18 pm »

Thanks for the reply Bob, I've checked my X setup and it seems to be correctly using the Intel driver:
Graphics:  Card: Intel Mobile 945GSE Express Integrated Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.18.3 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1024x600@60.00hz
           GLX Renderer: Mesa DRI Intel 945GME x86/MMX/SSE2
           GLX Version: 1.4 Mesa 11.2.2 Direct Rendering: Yes
I can also play video OK on the Netbook (not that I want to...), it is only when I enable the Spectrum Analyzer do I get issues. I fact I was incorrect the CPU DOESN'T go to 100%, it goes to about 75% but JRiver is very, very unresponsive to any input (including Stop)
Curious eh?

Does anyone know if it's ever used less cpu?
For example in MC 20 or 21?

If not I'm tempted to remove it. Making MC work properly on X is hard enough without this...
Logged

terrym@tassie

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 471
Re: Performance
« Reply #12 on: September 27, 2016, 11:34:45 pm »

Does anyone know if it's ever used less cpu?
For example in MC 20 or 21?

It was the same for me on MC21 (no experience of earlier Linux releases).
Logged
" I like work: it fascinates me. I can sit and look at it for hours." -Jerome K. Jerome
Pages: [1]   Go Up