I am trying to determine data latency for Raspberry Shake 3D (RS3D) and 4D devices that are forwarding data to our Earthworm server (linux) via a seedlink connection. We have some remote stations and we are trying to determine what range of latency we could expect to see given specific sites bandwidth with either UDP or TCP/Seedlink protocols. In reading through the RS documentation and forum, I have seen some discussion related to data latency, but only related to UDP. It appears that for UDP protocols, that RS3D and 4D’s ship data packets at a strict quarter of a second, regardless of the total size of the packet. That means, if our RS4D was sending maxed-out data packets during intense shaking, we would expect to see 4 packets a second with a total size of = 5680 bytes/sec, and 4260 bytes/sec for the RS3D. (Upload data volume - #11 by iannesbitt). This is great information for UDP, but this doesn’t help with TCP style connections.
In doing a sniffwave command on an earthworm server using slink2ew (seedlink) modules, I see the following output:
Four lines of example sniffwave output for RS3D RA192
RA192.EHZ.AM.00 (0x32 0x30) 0 i4 338 100.0 2023/12/01 17:45:03.87 (1701452703.8670) 2023/12/01 17:45:07.24 (1701452707.2370) 0x00 0x00 i66 m204 t19 len1416 [D: 0.9s F: 3.6s]
RA192.EHZ.AM.00 (0x32 0x30) 0 i4 310 100.0 2023/12/01 17:45:07.25 (1701452707.2470) 2023/12/01 17:45:10.34 (1701452710.3370) 0x00 0x00 i66 m204 t19 len1304 [D: 0.8s F: 3.0s]
RA192.EHZ.AM.00 (0x32 0x30) 0 i4 350 100.0 2023/12/01 17:45:10.35 (1701452710.3470) 2023/12/01 17:45:13.84 (1701452713.8370) 0x00 0x00 i66 m204 t19 len1464 [D: 0.7s F: 3.4s]
RA192.EHZ.AM.00 (0x32 0x30) 0 i4 370 100.0 2023/12/01 17:45:13.85 (1701452713.8470) 2023/12/01 17:45:17.54 (1701452717.5370) 0x00 0x00 i66 m204 t19 len1544 [D: 0.8s F: 3.8s]
Header information for this output can be seen here:
(Earthworm Program: sniffwave overview)
According to the sniffwave, it looks like TCP packets sizes (ex: len1416 from first line) vary and are not static. The number of samples per packet (ex. 338 samples for first packet) is also not consistent with other packet sizes from the same channel stream. When it comes to how RS devices handle the seedlink server, is there any compression to the data, or is it sent in an uncompressed format? What is the RS logic for the seedlink server as to when it decides to send packets? It doesn’t seem to be configured to send based on total number of samples or length of packet. Understanding how the seedlink server handles data would be appreciated.
Understandably, when it comes to Earthquake Early Warning (EEW), it is usually priority to get data as fast as possible to minimize latency, but UPD does open the doors to possible data loss/gaps if bandwidth is limited. It would be nice to know how TCP performs in comparison.
In a related topic, If there is a way to set the seedlink logic to send a packet every second, regardless of the size of the packet, that would be a nice feature. I know that during the 2019 Ridgecrest EQ sequence in CA, that SCSN implemented a 1 Hz LZ1 channel that measured data latency. Being able to configure the seedlink to send every second would allow users an easy way to replicate such a channel on their server to monitor latency SOH.