Raspberry Pi - why so much lag?

Priapus

Honorary Master
Joined
Jun 8, 2008
Messages
21,569
Reaction score
16,463
Location
England
Hi guys,

So, finally finished setting up my Raspberry Pi. Running a 4GB Class 10 SD card and OpenELEC 3.0.6

Now, all my media is on a "server" so I added the shared to the RPi via SMB and it took forever to scan which, was expected.
Then, I changed the skin to the most basic one I could find.
Also turned off RSS and Weather feeds.

Now, browsing the UI is not an issue - hardly any lag - the biggest issue I have is when I select TV shows - the wait it upwards of 3 to 5 seconds. Then, once I am in TV shows, each show / season I go in/out of I have the same wait time.

This is really frustrating for me. :(

I also don't see why there is a lag? - it will be pulling the library data off the SD card where it scanned to and when I press play - only then it streams the content, right?

I did bump up the speed of the Pi to 850mhz - but that has made no difference.

Is this normal for Raspberry Pi's?
Is there a way to fix it?
 
It is sadly pretty normal. The Pi has a super weak CPU. The only reason it can play HD content fine, is because that gets offloaded the the GPU which is pretty awesome and powerful enough.

I was also sad to see the same performance problem with it.

That said, it was for my parents and it was very cost effective. Next best thing after an actual PC (which I run) is to get:
99$ quadcore arm linux pc: http://www.fanlesstech.com/2013/07/utilite-quad-core-arm-linux-desktop.html
From: http://mybroadband.co.za/vb/showthread.php/544901-99-ARM-based-PC-running-Linux-or-Android
 
It is sadly pretty normal. The Pi has a super weak CPU. The only reason it can play HD content fine, is because that gets offloaded the the GPU which is pretty awesome and powerful enough.

I was also sad to see the same performance problem with it.

That said, it was for my parents and it was very cost effective. Next best thing after an actual PC (which I run) is to get:
99$ quadcore arm linux pc: http://www.fanlesstech.com/2013/07/utilite-quad-core-arm-linux-desktop.html
From: http://mybroadband.co.za/vb/showthread.php/544901-99-ARM-based-PC-running-Linux-or-Android

The CPU is not that bad - XBMC can run fine.

I'd point fingers at the SD card - Make sure it's a class 10 or better
 
That is because XBMC by itself doesn't require much CPU power at all, trying do something that do require a tiny bit of CPU power and see how that Pi falls over.
 
I have my library stored in MySQL on a different machine, runs fine.
 
i only have issues the first time it loads fanart. one everything has been downloaded and accesed and cached it runs smooth as silk with little or no lag.

im running rasbmc though....
 
It is sadly pretty normal. The Pi has a super weak CPU. The only reason it can play HD content fine, is because that gets offloaded the the GPU which is pretty awesome and powerful enough.

I was also sad to see the same performance problem with it.

That said, it was for my parents and it was very cost effective. Next best thing after an actual PC (which I run) is to get:
99$ quadcore arm linux pc: http://www.fanlesstech.com/2013/07/utilite-quad-core-arm-linux-desktop.html
From: http://mybroadband.co.za/vb/showthread.php/544901-99-ARM-based-PC-running-Linux-or-Android

Not in the mood for spending more money on media stuff.

Previously, I was running XBMC off an Intel Quad Core, 4GB ram machine and it ran perfectly. However, I had two issues:

1. Want the PC out of the lounge.
2. Wanting to use the PC for anything else (Like downloading) means closing xbmc and having to keep a mouse out and reopening it.

Maybe I must try fix this issue some how?

The CPU is not that bad - XBMC can run fine.

I'd point fingers at the SD card - Make sure it's a class 10 or better

If you read my OP - I mention it has a 4GB Class 10 card.
I have my library stored in MySQL on a different machine, runs fine.

Can you elaborate for me?
I was wanting to do this at first - however wasn't really that sure how to set it up?

How much lag do you see?

i only have issues the first time it loads fanart. one everything has been downloaded and accesed and cached it runs smooth as silk with little or no lag.

im running rasbmc though....

Will have a look at that distro - although I believe this is an XBMC / PI HW thing, personally.
 
With mysql - you basically install it on a PC.

You then point one XBMC installation to this mysql database, you start it up, and set it up with all your movie/series folders - it then writes the meta data to mysql.

You then point all your other XBMC installations to the mysql database (but you don't set them up to monitor folders)

There are quite a few benefits to using mysql - besides a central database - e.g. if you pause on one installation, you can resume on another.

(you'll have to google on setting it up, I haven't redone mine in over a year - but there are a few guides on doing it, its quite simple)

Lag wise, its not instant, but its a lot faster than when I was storing the libraries locally on the Pi.

My understanding is that the art is still cached on the Pi - but it gets it from your primary XBMC installation
 
Okay.

Does the PC running the MYSQL DB need to have XBMC open all the time?
 
Okay.

Does the PC running the MYSQL DB need to have XBMC open all the time?

Yes... if thats the XBMC installation monitoring the folders. Else the library doesn't get updated? Unless you're happy with the library only getting updated when you start that XBMC up on that machine.

There may be ways around that, but I haven't looked into it.

I have the DB on my server which does all the downloading, then I have my primary XBMC machine in the lounge, which is always on, so always connected to the DB.
 
if you are storing your media on a server then yes it will be slower i guess. are you running over cable or wifi? i moved all my media to an external harddrive and connected directly to the PI. That's when the performance improvement really became obvious.

before that i had a file share over Wifi(n), and at times it used to be quite slow..
 
Yes... if thats the XBMC installation monitoring the folders. Else the library doesn't get updated? Unless you're happy with the library only getting updated when you start that XBMC up on that machine.

There may be ways around that, but I haven't looked into it.

I have the DB on my server which does all the downloading, then I have my primary XBMC machine in the lounge, which is always on, so always connected to the DB.

Can I store the DB on the main PC with the media on it - and use the Pi to update it or am I back at stage one?
 
if you are storing your media on a server then yes it will be slower i guess. are you running over cable or wifi? i moved all my media to an external harddrive and connected directly to the PI. That's when the performance improvement really became obvious.

before that i had a file share over Wifi(n), and at times it used to be quite slow..

I have far too much media to have on externals.

That is just simply not an option.
Thanks for the suggestion though.
 
With mysql - you basically install it on a PC.

You then point one XBMC installation to this mysql database, you start it up, and set it up with all your movie/series folders - it then writes the meta data to mysql.

You then point all your other XBMC installations to the mysql database (but you don't set them up to monitor folders)

There are quite a few benefits to using mysql - besides a central database - e.g. if you pause on one installation, you can resume on another.

(you'll have to google on setting it up, I haven't redone mine in over a year - but there are a few guides on doing it, its quite simple)

Lag wise, its not instant, but its a lot faster than when I was storing the libraries locally on the Pi.

My understanding is that the art is still cached on the Pi - but it gets it from your primary XBMC installation

Interesting, will this save all the "watched" data too?
 
Interesting, will this save all the "watched" data too?

Yes.
So all XBMC clients will have the same library. Watch a video in your lounge and pause it and continue to watch in the room. Once finished watching bit the room and lounge will show it as watched.
 
Can I store the DB on the main PC with the media on it - and use the Pi to update it or am I back at stage one?

Think you might be back at stage one, but try it and see - because its not updating while you watching/browsing - so it could work.

Interesting, will this save all the "watched" data too?

Yes, watched/partially watced etc - basically, any operations on the library are shared among installations. We usually start a movie in the lounge, get tired, move to the bedroom - carry on :p
 
So, what I can do is this:

Run XBMC off the server in minimised mode (so its in the task bar) and instal MYSQL on there. Up date the library - have that xbmc do the updating and stuff.

Then connect to PI as a second XBMC and it gets the updated library?

Is that a better way to do it?
 
So, what I can do is this:

Run XBMC off the server in minimised mode (so its in the task bar) and instal MYSQL on there. Up date the library - have that xbmc do the updating and stuff.

Then connect to PI as a second XBMC and it gets the updated library?

Is that a better way to do it?

That could work - might be worthing googling if someone has written a service or something for keeping the libraru updated without XBMC
 
That could work - might be worthing googling if someone has written a service or something for keeping the libraru updated without XBMC

At the end of the day I don't mind starting up XBMC on the MySQL box and update the library and have the PI show the updated library. As Long as the PI can mark the content as watched once I have watched it?

Then when I get new media I am happy to update the library on the MySQL box and then use the PI as main pc to way h in lounge.

Would that work?

Appreciate your input btw.
 
I'm also running openelec on my pi with similar specs. If your media is shared via a Nat I suggest you make sure you are using a wireless n network.

I noticed audio formats can kill a pi if you don't send your audio straight to the amp for decoding.
 
Top
Sign up to the MyBroadband newsletter
X