Giter Site home page Giter Site logo

Improve CPU efficiency about shinysdr HOT 4 OPEN

kpreid avatar kpreid commented on August 29, 2024
Improve CPU efficiency

from shinysdr.

Comments (4)

kpreid avatar kpreid commented on August 29, 2024

The BeagleBone Black simply doesn't have enough CPU power to run ShinySDR in its current state. I know this because I tried just that configuration myself. The audio underrun is because everything is underrunning.

There are multiple factors here:

  • ShinySDR is built on GNU Radio, which is a modular framework and therefore has overhead, whereas rtl_fm is hardcoded to do the one particular job.
  • ShinySDR is doing more things simultaneously — not just audio, but the spectrum display and all the other meters and things. (Some of this can be optimized.)
  • And, of course, ShinySDR is doing some things inefficiently.

It's close enough that I would like to make it work at some point. Here are some things you can already do for a little bit of improvement:

  • Run the volk_profile command-line tool, if you haven't already. This will run some tests and write a config file telling GNU Radio how to run its DSP operations most efficiently.
  • Reduce the configured sample rate for the RTL device (1,000,000 MHz is the minimum recommended value). This will narrow the spectrum view but make the filter for the demodulator more efficient.
  • Use the mono-audio mode: config.set_stereo(false).
  • Turn the FFT rate control down to its minimum (1).

Here are some fixes beyond “general optimization” that I have in mind for the future.

  • Have MultistageChannelFilter design better filters. I found a paper on the subject which suggests that no more than four stages be used, but MultistageChannelFilter always tries to make as many stages as it can. The replacement strategy would actually look at the number of taps produced for a given stage design and choose the best overall structure. (This being a substantial computation, it should also be cached.)
  • Generally improve the data-binding subsystem so it uses no polling or slower polling where it can.

from shinysdr.

corpr8 avatar corpr8 commented on August 29, 2024

Thanks for this - I'll have a go with these enhancements - also, I might fork out for a more powerful host to run your awesome software :-)

from shinysdr.

kpreid avatar kpreid commented on August 29, 2024

Reopening. I'm now using this to track the enhancements.

from shinysdr.

kpreid avatar kpreid commented on August 29, 2024

As of commit 48bfbb7 (or see 7dae75f for the end of that line of development), there is no unnecessary polling. Some cells are still polled, but only those where there really is a continuous stream of data (e.g. signal level meters).

from shinysdr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.