How to understand mongodb’s wiredTiger internal cache

  mongodb, question

The server has 1G of memory. WiredTiger internal cache should occupy 256M. mongo startup will put the data and index into the system cache filesystem cache. filesystem cache belongs to the idle memory of the system. What is the role of internal cache256M here?

Filesystem cache, as its name implies, is a faithful reflection of the contents of a file. Its contents are the contents on the file system. WiredTiger compresses and encrypts data before it falls off the disk (Enterprise Edition feature). In other words, the contents in the filesystem cache are compressed and encrypted. To use the contents, you have to decompress/decrypt them first. The decompressed/decrypted content is only in WiredTiger Cache, which is the directly available content.
Incidentally, the index is compressed using prefix (i.e. index key compression) in both the file system and WT cache, without decompression. Data is converted between compression and decompression.