RTC Forums
November 23, 2024, 03:26:48 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Speed and bandwidth sharing between threads  (Read 5605 times)
Aeter
RTC Expired
*
Posts: 36


« on: May 11, 2018, 08:37:05 AM »

Hello,

we experienced a progressive slowness in transferring data and messages between clients when there are a lot of clients connected.
My question is: how the connections influence each other? Shouldn't they run into isolated threads?

Slowness cannot be caused by low resources. The server bandwidth used is under the 10%, and the server process is only using less than 10% CPU.
I removed any possible bottleneck, like slow database connections, or events synchronized with the main window (could this be a cause anyway?).

I see there are some parameters I can change in the rtcThrPool unit, but I'm not sure on what to do.

Thank you in advance for any help.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: May 11, 2018, 11:33:39 AM »

If your CPU usage is low, but your network performance goes down when a lot of clients are active (and you KNOW that these clients and your Server should be able to handle a lot more bandwidth), my guess would be that (A) you have bottlenecks in your application, so check all the places using critical sections, or ... (B) your network is congested, so make sure to also check this FAQ topic for more info.
Logged
Aeter
RTC Expired
*
Posts: 36


« Reply #2 on: May 11, 2018, 01:32:07 PM »

Hi,

Good, I will try what you suggest in that FAQ.

Is there any part of RTC that uses critical sections by default?
Our code uses critical sections since there is a global array to access between threads. Could this affect data transfer speed ? And messages ?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: May 11, 2018, 05:17:07 PM »

Any time more than one thread tries to lock a critical section, the first thread will succeed and move on, but all the other threads will have to wait until the last thread acquiring the lock releases it, before the next thread can acquire the lock (and so on). That is why using critical sections can become a bottleneck. But ... whether a critical section block will become a bottleneck depends on the number of threads that might need the same lock at the same time, as well as the time it takes to execute the code inside any code block using the same critical section.

Anyway ... I'm not aware of any bottlenecks caused by critical sections used by the RTC SDK internally, but ... if you do find that any part of the RTC SDK is causing a bottleneck in your Application (make sure you are using the latest RTC SDK version) , feel free to report where it happens and I will take a closer look.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.025 seconds with 17 queries.