Link to home
Start Free TrialLog in
Avatar of websss
websssFlag for Kenya

asked on

SignalR Performance

We are using a SignalR to update records on a webapp.

1. We are experiencing performance issue when there are many records are coming in.
2. A function that is updating the records on average takes 30ms when the SignalR is not busy. When busy the time taken grows to even 200ms per record. The JS function involved uses Jquery to change the table records attributes, such as text, css class etc.
3. Memory usage is steady while CPU usage remains as high as 100% and even more on the Google Chrome Task bar
4. An estimate of 30 records per seconds are working well but beyond that, the application becomes sluggish and unresponsive.
5. Each record is about 60bytes

What can we do to make the browser able to handle high loads of the incoming signalR records?
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Hi webss,

I understand you can not share the production code here but if you can outline the methods, specially how you are connecting to the Hub, how are client/server pieces configured? And which one your are using SignalR, SignalR Core or Azure SignalR Service?

Regards,
Chinmay.
>30 records per seconds ?
Who said browsers should support that ? :)
Avatar of websss

ASKER

Hi Chinmay Patel, we are using SignalR with asp.net. EntityFramework 4.5. We are using GlobalHost.ConnectionManager to send data to subscribed groups. We are pushing the data to the GlobalHost.ConnectionManager to update messages on the client.
Avatar of websss

ASKER

Hi leakim971, what is the limit?
Couple of pointers to check before we move forward:
1. As you have mentioned that you are Pushing data to clients, I am assuming you are having a one way Broadcast scenario, have you tested your setup by using non-browser client? or by using any other browser?
2. The code that is on client side, does it have any blocking calls? or the entire code is Async?
3. Which version of Jquey you are using? and how you are updating DOM? Can you share some examples?
4. What is the average size of your loaded page?

I would setup performance counters specific to SignalR before considering it as a bottleneck, https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/signalr-performance


Regards,
Chinmay.
what is the limit?

It's first limited by the hardware and environment :
CPU(s), Bandwith, memory, browser, same remarks on server side
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.