Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

What is difference MongoDB wiredTiger cache with in-memory DB

As i know MonogoDB cache working set in RAM.

Then if i increase wiredTigerCacheSizeGB as much as all of data in disk, does it work as fast as in-memory db?

if no, what is difference?

question from:https://stackoverflow.com/questions/65860001/what-is-difference-mongodb-wiredtiger-cache-with-in-memory-db

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I cannot answer all your questions.

A cache reads data from disk and keeps it in the RAM. When you access such data again then you read it from RAM instead of reading it again from disk - which would be much slower.

So, a cache is useless if you have to read the data only once. Some applications anticipate the data you may read in future and put it into the cache in advance.

The MongoDB in-memory DB puts all data into RAM only, it does not read or write anything from disk, apart from some logging data. When you stop an in-memory MongoDB process then all data is lost.

The wiredTiger storage engine is a data format used by MongoDB to store data persistently on disk.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...