Is Oplog required for meteor apps Even if there is No replication?

Hello,

I have high CPU usage and few users for my meteor app.
I was told Oplog not working is the cause of high CPU usage.
So, Is Oplog required for meteor apps Even if there is No replication?

Thanks

Yes, because Meteor doesn’t assume that it’s the only one accessing the database (so if you for example manually make a change in mongo, you will instantly see it reflected in Meteor). So you will actually have to set up a Mongo replica set with just one member in it.

1 Like

If I manually make a change in a mongo collection (insert, update, delete) and I see it reflected in meteor app, that means OpLog is working, right?

No, because the fallback Meteor has if it doesn’t find a working Oplog is to spam the database checking for changes, hence the massive performance problems. And the default installation of Mongo does not come with a replica set and oplog.

But if you test many times, and every time you make a change you see it reflected in Meteor within a fraction of a second, then I believe the Oplog should be working :stuck_out_tongue:
Kadira is still up btw, so you could try installing that.

1 Like

Thanks for the info.
When I execute the app with meteor run --settings staging/settings.json locally
meteor uses OpLog or spams the database?

The development installation of Meteor installs MongoDB with oplog enabled.

1 Like