• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7
Rasberry PI lag - can we fix it?
#1
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. Sad

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?
Reply
#2
There's some info here:
http://forum.xbmc.org/showthread.php?tid=164286

Installing to a fast USB stick, overclocking more (1GHz ARM, 500MHz core, 600MHz SDRAM) and using an external MySQL database can all help.

The real fix is probably rewriting how the CArchive class is used. It will happen, but it's not top of the priority list.
Reply
#3
So it seems that loading with an external MySQL DB will drop it to around 5 seconds roughly..
Then, add ina USB stick (Don't see why this would be quicker?) and bumping up the pI to 1Ghz (Which is unstable at best) - leaves us with still a few seconds delay...

Damit..

Seems like my Pi days were short lived..

Thanks for the info.
Reply
#4
I'm suprised it's that much of an issue for you.. Mine is the same.. though i'm using the Amber skin and it seems alot more responsive..
Reply
#5
SD is slooooow. Even class 10 is slower than the avarage USB stick drive.
Reply
#6
danmedhurst: It is that much of an issue for me.

Ned: How would I load the library to a USB drive then?

I don't want to store media on the USb drive - that's not an option for me.
Reply
#7
For OpenELEC: HOW-TO:Install XBMC on Raspberry Pi with USB drive (wiki)
Raspbmc: I think it has an option during install to use a USB drive.
Reply
#8
(2013-07-17, 15:07)Tander Wrote: I don't want to store media on the USb drive - that's not an option for me.

You don't need to store media on usb drive - the media files aren't the reason for the lag - it's the database and thumbnails (your userdata folder) that benefits most from fast storage.
Reply
#9
Tried it on mine as I'd never noticed it being slow:

2-3 seconds between TV show folders (70 series, 760+ episodes), that's with fan art on.

Same times with Music (700+ folders) & Pictures (250+ folders)

I get a delay (10-12secs) going into movies (nearly 800 films), but I assume that's because of the view I use + fan art.
It calculates the total time of the films at the bottom of the screen each time I go into the folder.

'High' overclocking
64MB SD no class!
rbej Gotham
Amber skin
NFS system and NFS storage - On a WHS server

Not using MySQL DB - Would that make the population of Movies faster?

[Edit:] Get quite a long delay (10+ seconds) going from Actor Films back to Actor List, not a feature I use very often.
Reply
#10
10-12 seconds sounds about right for 800 movies. See the link in post #2 for an explanation of why this delay exists. Switching to MySQL might help, but it's not usually the database access time that is the problem - you can see how long your database query for Movies is taking by enabling DEBUG logging and looking at xbmc.log.

As for XBMC calculating your total time, if you populate your NFO files with streamdetails (using a tool like Ember) this will happen much more quickly, plus you'll have all the correct stream icons for each movie.

Using NFO files and local fan art makes scraping much quicker - I can scrape 600 movies in about an hour on a 1GHz Pi. If you scrape using exclusively internet sources, it's going to take a whole lot longer and you'll have far less metadata at your disposal. Scraping cast artwork is also a good way to slow down library scans.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#11
Thanks MilhouseVH,

21:19:34 T:3061850112 DEBUG: RunQuery took 330 ms for 796 items query: select * from movieview WHERE c23=9
21:19:35 T:3061850112 DEBUG: RunQuery took 160 ms for 814 items query: SELECT files.strFilename, files.playCount, bookmark.timeInSeconds, bookmark.totalTimeInSeconds FROM files LEFT JOIN bookmark ON files.idFile = bookmark.idFile AND bookmark.type = 1 WHERE files.idPath=9

db access looks pretty good from the above...

I for one am not bothered about the delay, but I will check out Ember. Tweaking is half the fun with rpi!
Reply
#12
Just an update for everyone.

I went the MYSQL route.

Now access time has dropped to two seconds - much, much better and more useable for me. I may even move the userdata folder to a USB drive to speed it up more. Pretty happy with the system now.

Thanks for all the tips!
Reply
#13
(2013-07-19, 13:25)Tander Wrote: Just an update for everyone.

I went the MYSQL route.

Now access time has dropped to two seconds - much, much better and more useable for me. I may even move the userdata folder to a USB drive to speed it up more. Pretty happy with the system now.

Glad it's helped. MySQL has other benefits.
You can share the database with other devices (I can start watching something on Pi, and continue watching it on iPad, and the watched flags and resume points are all in sync).
It's more protected against corruption, and can be backed up from a script.
A new installed on the Pi can have access to the full library in minutes (just copy sources.xml/advancedsettings.xml and you're done).
You can connect a more power xbmc platform (e.g. PC) and run library scans from there.
And, as you've spotted it's quite a bit quicker.
Reply
#14
Should have mentioned - I found all that out while playing with the setup.

Got the MQSQL running on a media pc - which does the library scans.
Got the Pi loading the library using advancedsettings.xml also have the MacBook running XBMX syncing to the MYSQl DB too.

I would like to find out how to backup the DB - but another time, haha.

Will moving the /Storage to the USB drive help that much or not really?

Thanks again for the help, really appreciate it!
Reply
#15
(2013-07-19, 14:24)Tander Wrote: Will moving the /Storage to the USB drive help that much or not really?

Depends on the speed of the current sdcard and the USB stick.
For me it was a worthwhile improvement.
USB is more robust to corruption, especially when overclocking, so that's another advantage,.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
Rasberry PI lag - can we fix it?2