1

I've a dashboard on the web and want to show it on a screen. So I'm thinking about making a portable kiosk style webclient on raspberry pi with raspberrian.

The site has some javascript which draws charts. Now i'm experencing performance trouble with the Raspberry pi (B+).

I also overclocked to 1GHZ and gave more ram to the graphics unit.

Does somebody have tipps on how to improve the performance ? Or would it be a better choise to switch to an other SingleBoard Computer with more GPU / CPU / RAM ?

1

3 Answers 3

2

The site has some javascript which draws charts. Now i'm experencing performance trouble

If you've tested the same software on another computer and the browser is consuming all the cpu when this happens, then you've probably hit a limit. The pi is not a powerhouse.

I...gave more ram to the graphics unit.

I doubt that will make any difference in this case, but if you aren't using the RAM, it won't hurt. You should try hard to leave 50-100 MB+ free on the pi for the OS file cache, loosing that will hurt performance.

would it be a better choise to switch to an other SingleBoard Computer with more GPU / CPU / RAM ?

If it's obviously maxed out, yes. A web client using js is a convenient way of delivering content, but not optimal resource wise -- unless of course you are just the server.

It is a scenario that would benefit from multiple cores.

2
  • I could also access the REST Api, but what could be other possibilities to get a nice graphics output (instead of browser?) Jan 13, 2015 at 14:41
  • That's where the very significant value of convenient comes in, lol -- you could instead implement your own GUI app. Presuming that's not feasible, I guess you could investigate having the server do the work and see if that saves anything. I can't promise that it will, but it does give you a lot more freedom if you think there might be a faster method than client side code. Again, the pi is not a superstar number cruncher.
    – goldilocks
    Jan 13, 2015 at 15:01
2

Tried to do the same with a Pi 2 B+, and ran through same issues. I achieved significant improvement and acceptable performance doing the following:

  • 2.5A power source (overclocking in the configuration only is not enough without a power supply suitable for the job, as per my research).
  • UHS Class 3 SD Card (30 MB/s) for solving I/O bottlenecks. It was a gamechanger, was using a 4MB/s.
  • Serve pages instead of reading files - according to my tests, browsers performed better reading from localhost than reading files directly. Run this command in the directory you want to serve: python -m SimpleHTTPServer. It will serve in http://localhost:8000
  • Midori web browser - It has good javascript performance and native kiosk mode - if you are on Raspian you can install it doing sudo apt-get update & sudo apt-get install midori. Run in kioski mode doing midori -e Fullscreen -a http://localhost:8000

I still haven't figured out how to play youtube videos smoothly, but if your issue is only regarding javascript performance this might suit your needs. I also have a python script running in loop every 0.1 seconds and performance is not bad.

I am using Raspbian.

Some sources

1
  • I've read around that Epiphany, when well configured, has the best performance for javascript among all. Didn't work in my first attempts, ended at Midori, but now it is back to the research queue. Jun 10, 2016 at 14:13
1

I've a dashboard on the web and want to show it on a screen. So I'm thinking about making a portable kiosk style webclient on raspberry pi with raspberrian.

The site has some javascript which draws charts. Now i'm experencing performance trouble with the Raspberry pi (B+).

What browser where you using? Google Chrome, even though it's pretty big, tends to perform better with those kind of webpages than other smaller browsers, especially if those pages run for a longer time.

I also overclocked to 1GHZ and gave more ram to the graphics unit.

Try to measure, what is really needed by the page. Animated charts tend to use CPU/GPU(depending on what kind of chart, how it is implemented and what kind of acceleration the browser supports), but the Script powering the chart could use a lot of RAM, in which case the performance would drop because of the low-memory situation, not the CPU. I set up a kios-mode website like this once and one problem was RAM. The easiest solution, though not the prettiest, was to reload the whole browser or the browser tab so the leaked memory the JS engine produced was freed and could be reused.

Does somebody have tipps on how to improve the performance ? Or would it be a better choise to switch to an other SingleBoard Computer with more GPU / CPU / RAM ?

Try to optimize the webpage as much as possible. If you animate that graph, make sure the JavaScript used is not a big library but instead a clean, small script that uses RAM and CPU as efficiently as possible. You will find plenty of good advise on how to achieve this searching in your favorit search engine.

Of course another Computer with better specs would be the easier choice. The Raspberry Pi is performing pretty slow compared to other computers and depending on how much time you can spend on optimizing your page, it might be worth buying something like a CubieTruck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.