kdoren / jambox-pi-gen

Start jamming online easily with a Raspberry Pi, an audio interface, and this free Jambox image file. Just download/burn/boot/jam. Choose from multiple jamming apps: Jamulus, SonoBus, JackTrip, JamTaba, JammerNetz or HpsJam. User interface is any web browser on same local network. Pre-built image file is available under "Releases".
BSD 3-Clause "New" or "Revised" License
74 stars 9 forks source link

[question] How big of a difference in performance is there between the RPi 3b vs 4b? #88

Open theOtterWizard opened 3 years ago

theOtterWizard commented 3 years ago

There's a few scenario's I'm specifically curious about:

  1. If I'm just setting up a jambox system for use with jamulus for an individual and I already have a 3b I'm not using, is the difference in performance worth buying a 4b?
  2. If I'm setting up a system for a whole choir to use as a rehearsal thing, should I save some money and get the 3b for everyone or should I get the 4b (plus the cooling case)?
  3. Is RAM a bottleneck for jambox to an extent where it matters a lot which version of the 4b I get?

Any advice would be much appreciated!

kdoren commented 3 years ago

If you're buying a Pi, that's easy. Buy a Pi4. No one should buy a new Pi3, period. Pi4 has significantly higher performance, has more RAM, and is about the same price. Right now at Vilros.com a 1GB Pi3 board is $35, and a 2GB Pi4 is also $35, so this is a no-brainer. 2GB is plenty for Jambox, the only reason to buy 4GB is if you want the flexibility to use the Pi4 for other applications that might need it.

If you only look at the clock speed, you might think the difference between Pi4 and Pi3 is tiny, but it's not. The difference is more than just clock speed: https://magpi.raspberrypi.org/articles/raspberry-pi-4-specs-benchmarks

How does this show up in real world use in Jambox? Pi4 can get (slighly) lower delay while maintaining audio integrity.

Pi4 can run rock-solid with jack audio PERIOD=64, which allows Jamulus to "enable small network buffers", which will give lowest delay. Pi3 gets some "xruns" (audio frames that aren't ready when needed) with PERIOD=64, so Jambox 1.3 defaults to PERIOD=128 (with NPERIODS half of Pi4 setting) for Pi3. You can change this in /etc/jackdrc.conf if you want to try the Pi4 settings.

If you already own a Pi3, use it. Jambox runs fine on a Pi3, and the difference isn't big enough to justify replacing it. Just don't buy a new one.

kdoren commented 3 years ago

A few other differences which favor the Pi4:

  1. My experience is that the USB power supplies I use to power Pi3 all wind up causing higher noise levels in some USB audio interfaces, sometimes much worse. Pi4 with my Vilros USB-C supply is much quieter. This appears to be due to the power supply, not the Pi itself (noise levels are similar using a battery as a supply), but I have tried several with same result.
  2. Pi4 can run PREEMPT_RT realtime kernel (I run low latency PREEMPT kernel on Pi3). This marginally improves jitter when other processes are running.
  3. Pi4 has 1Gb Ethernet, and USB3 (vs 100Mb and USB2 for Pi3). You won't notice when jamming, but if you ever want to hook up an SSD, you'll want USB3.