Menu

Raspberry Server and Client

2020-12-05
2020-12-08
  • Taylor Robinson

    Taylor Robinson - 2020-12-05

    I've been playing around with the Jamulus program a lot on my Raspbery pi 4 (4gb). I'm having some trouble that is very strange. I'm hoping someone may have some insight. Here's what's happening...

    I've got two users both running jamulus on their raspberry pis. User 1 is the host AND client. User 2 is just connecting as a client.

    When this is the case, user 2 experiences extra processing latency. Just to be clear, user 2 experiences a higher ping rate also. The higher ping rate makes sense, of course, since the signal has to get all the way to the hosting server on user 1's raspberry (I get this). However, why would User 2 have higher processing latency just because User 1 is both host and client on his raspberry?

    Here's what else I've found...
    When user 1 on raspberry and user 2 on raspberry are ONLY clients (since the server is on a third party AWS cloud instance) both users have low processing latencies and neither experience this problem. In other words, when both are just the client, everything works great.
    ALSO,
    When user 1 on raspberry is self-hosting (both server and client), he has no problem (same low processing latency as usual). Even when user two on his raspberry joins in as a client, User 1 still has no processing latency problems.

    The issue only comes when the raspberry client that is NOT the host joins a raspberry client that is also the host. And the issue is only experienced by the non host user. In fact, the raspberry user that is only the client experiences double the processing latency then that he experiences when he himself IS also the host.

    (BTW, I'm defining processing latency as "overall latency" minus "ping".)

    You would think if either of the users were going to experience higher processing latencies, it would be the rapsberry that is both server and client (because it's doing more work). Why is it user 2 (the raspberry user that is only the client) that gets double the processing latency??

    Does anyone have any experience in this issue?

     
  • Volker Fischer

    Volker Fischer - 2020-12-06

    Do you have the jitter buffer size set to auto? What are the buffer sizes of the jitter buffer. Does this cause the higher latency?

     
  • Taylor Robinson

    Taylor Robinson - 2020-12-06

    Hey Volker, thanks for the quick response. I've got jitter buffers on blth clients set to automatic. It's the same settting I use for the clients regardless of whether one is self hosting or we are hosting on an outside server. I can etup the demo again and write down the exact numbers though if you think it would be helpful.

     
  • Volker Fischer

    Volker Fischer - 2020-12-06

    If the jitter buffers go up to a high value, this has a high impact on the overall delay.

     
  • Taylor Robinson

    Taylor Robinson - 2020-12-07

    It's definitely a jitter type of problem. When user 2 (who is just a client on a raspberry) enters a user 1's room (who is both client and host on a raspberry), user 2 has 2-3x the amount of local and server jitter. The jitter faders on auto go from 2 local and 2 server to 8 local and 10 server.

    Does this mean that there is an incorrect setting somewhere for sample rate, sample size, or buffer?

    When looking in qjackctl, each client is set to 48000, 128, and 2

     
  • Volker Fischer

    Volker Fischer - 2020-12-07

    Higher jitter can have multiple reasons. E.g. if the CPU load is high or if the network stream reaches its maximum. Hard to say what exactly causes the higher jitter on your Raspberry Pi.

     
  • DonC

    DonC - 2020-12-07

    This is hard to diagnose from a distance.
    Pi's are being used a lot as clients without any problems.
    I don't recall, however, anyone discussing running client and server on the same Pi.
    But still I see no reason why it shouldn't work OK.
    Could it be that there is something else running on one or both of the units that is taking a lot of processor time and/or causing, for example, memory faults?
    Jitter does not come from the data stream not being fast enough, but not being regular enough.

     
  • Taylor Robinson

    Taylor Robinson - 2020-12-07

    I don't think anything else is running except for the usual raspian OS. We have qjackctl running of course but nothing else that I am aware of.

    I've done the same (run both host and client at the same time) from my PC and haven't had an issue.

    What ever this issue is, it only happens with the raspberry user that is NOT also hosting. Are there any settings to check for the server outputs to make sure they are all 4800, 128, and 2 or are these just settings that are set for the clients only?

    Do you think that there would be some benefit to having the server and the host activities of user 2 partitioned off or protected from interruption in some way just in case the output that the host is sending user 2 is being interfered with or interrupted by the input and output for user 1?

    Thanks again for your help and time.

     
  • Volker Fischer

    Volker Fischer - 2020-12-08

    Are there any settings to check for the server outputs to make sure they are all 4800, 128, and 2 or are these just settings that are set for the clients only?

    These are just client settings.

    Do you think that there would be some benefit to having the server and the host activities of user 2 partitioned off or protected from interruption in some way just in case the output that the host is sending user 2 is being interfered with or interrupted by the input and output for user 1?

    I am not really understand your question. What do you mean by "partitioned off"?

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.