Can we open both inmemory and WireTiger engine?

For some performance reasons, i need to keep both inmemory and WiredTiger engine on a single node. Can MongoDB support this?

Hi @Duc_Bui_Minh

A single mongod process only supports one storage engine configuration. You can run more than one mongod in the same host environment, but this is generally not recommended as they will compete for the same resources.

What are you hoping to gain in terms of performance? The In-Memory Storage Engine provides consistent latency because it is not maintaining on-disk data aside from some metadata and diagnostic data. If your working set fits entirely within memory (a strict requirement for the In-Memory Storage Engine) but you need data persistence, I would consider using the default WiredTiger storage engine.

The In-Memory Storage Engine page also has some suggestions around Deployment Architectures which might be of interest. For example, one deployment pattern is to have a replica set with visible members running in-memory storage for predictable latency and a hidden member using the WiredTiger storage engine for persistence.

Regards,
Stennie

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.