Author Topic: v2.X - Master Pi skipping ahead of the remote pi's causing delay in remotes imag  (Read 662 times)

Offline brichi

  • Hero Member
  • *****
  • Join Date: Dec 2017
  • Location:
  • Posts: 500
  • Kudos: 1



While I still haven't been able to reproduce the skipping/out-of-sync issues, I *may* have fixed it or at least helped.   At about 5:35 with the number of channels you have is exactly when we jump over the 2G mark in the fseq file.   Thus, my gut feeling is that there is a signed 32bit int causing an issue someplace.   I started digging through things and discovered the fadvise stuff Chris added a while ago wasn't done fully/correctly.  I fixed that and then also added some fadvise things to have Linux pre-load the next 20 frames or so.     This should have a HUGE impact on performance, particularly on the BBB's.   


With the previous code, the "read next frame" segment for your sequence was taking 10-12ms.  With 25ms per frame, that's almost half the time we have.   The new code now takes about 0.5ms on the Pi3B+ and 1.4ms on the BBB.      Caveat:  that is with the fseq stored on the ext4 filesystem on the SD card.     If using an external USB drive with a FAT filesystem, I don't know what impact that might have.   You don't mention where your sequence is stored.   If it's on a FAT drive, I wouldn't be surprised if the 2GB location starts triggering something strange.  That filesystem was never designed for gigantic files so it was kind of hacked on.


Yes the sequences are all on USB flash drives, I believe all 3 are FAT

Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 4,945
  • Kudos: 111
    • Granbury Christmas Lights
That's another reason to use EXT4 formatting.

I've not been successful (yet) reading or writing to EXT4 partitions on my Windows computer. Probably not a big deal for Linux users. What about Mac users?


Online jnealand

  • Developer
  • ******
  • Join Date: Aug 2013
  • Location: Kennesaw, GA
  • Posts: 2,748
  • Kudos: 57
This would also be another problem associated with creating large sequences instead of several smaller ones and letting the players just play one right after the other.  Load time, save time, copy to a Pi or BBB time and other issues all hit you with a long sequence.
Jim Nealand
Kennesaw, GA all Falcon controllers, all 12v Master Remote Multisync with Pi and BBB P10 and P5

Offline brichi

  • Hero Member
  • *****
  • Join Date: Dec 2017
  • Location:
  • Posts: 500
  • Kudos: 1
the skipping ahead is fixed now Dan, great work as always, I just tested the latest download and for 15 minutes the sequences all stayed in sync

Online pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,192
  • Kudos: 34
  At about 5:35 with the number of channels you have is exactly when we jump over the 2G mark in the fseq file.   Thus, my gut feeling is that there is a signed 32bit int causing an issue someplace.   


I think its so cool that you found this edge case.  Well done Dan, you da Man!  8)


Image result for dan the man meme
xLights and Vixen3 for sequencing / FPP for scheduling and playing / Falcon controllers for pixels / homemade controllers for everything else

 

Back to top