Change stream performance

Hello everyone.

I was wondering if people could share their experience with performance of MongoDB change streams in terms of event throughput per second.

In our case we were able to reach roughly 22k events per second. The scenario was deployment scoped change stream opened against standalone 3 node RS, full document lookup was disabled and each event was an update to a field containing exactly 25 bytes of data. I don’t recall the exact configuration of the VMs where mongodb was deployed but the database and client were on the same network segment (so network latency was negligible). The client was using latest version of java sync driver.

I’d be particularly interested in what configuration impacts the reading speed from both client and server perspective. The goal is to find out whether we can realistically achieve higher reading speed. If so, then whether we need to configure the client differently or whether we should somehow tweak the database configuration.

Thanks in advance for any insights shared.

1 Like

For the server perspective, consider checking the following:

  • MongoDB version and its specific configurations like what readConcern you are referring.
  • Disk I/O and CPU usage during peak times.
  • WiredTiger cache settings.

On the client side:

  • Verify the connection pool settings.
  • Monitor the client’s resource usage.
1 Like