[SERVER-45596] Maximum number of clients supported by change stream Created: 16/Jan/20  Updated: 17/Jan/20  Resolved: 17/Jan/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Xikui Wang Assignee: Carl Champain (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:

 Description   

Hi Devs,

I'm running some tests to figure out the maximum number of clients that can be supported by change stream. I basically took the script from SERVER-32946 and changed the number of clients. I tested it on my own machine with three local replicas. When the client number is too high, like 100000, the primary replica constantly complains about "Too Many Open Files". I tried to tune up the ulimit to 65536, but it didn't help.

I wonder probably the change stream is not designed for such use cases? What would be the maximum number of supportable clients in this case? Thank you!



 Comments   
Comment by Carl Champain (Inactive) [ 16/Jan/20 ]

Hi xkkwww@gmail.com,

The recommended maximum number of change stream cursors that a node can handle is 1000 (because of memory limitations and CPU workload), but we don't think even close to that is a reasonable target given how expensive some underlying mechanisms are. Importantly, your testing approach doesn’t work well, a general suggestion for how to do it better would be to use one stream per collection. For more details, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag.
As this ticket does not appear to be a bug, I will now close it.

Kind regards,
Carl

Generated at Thu Feb 08 05:09:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.