membase has asynchronous persistence as a feature. One feature-of-that-feature is that the working set stored by an individual membase node can be larger than the cache dedicated to that node. This feature is commonly referred to as "disk greater than memory".
Each instance of ep-engine in a given node will have a certain memory quota associated with it. This memory quota is sometimes referred to as >the amount of cache memory. That amount of memory will always store the index to the entire working set. By doing so, we ensure most items are quickly fetched and checks for the existence of items is always fast.
In addition to the quota, there are two watermarks the engine will use to determine when it is necessary to start freeing up available memory. These are mem_low_wat and mem_high_wat.
As the system is loaded with data, eventually the mem_low_wat is passed. At this time, no action is taken. This is the "goal" the system will move toward when migrating items to disk. As data continues to load, it will evenutally reach mem_high_wat. At this point a background job is scheduled to ensure items are migrated to disk and the memory is then available for other membase items. This job will run until measured memory reaches mem_low_wat. If the rate of incoming items is faster than the migration of items to disk, the system may return errors indicating there is not enough space. This will continue until there is available memory.
Obviously, the migration of data to disk is generally much slower and has much lower throughput than setting things in memory. When an application is setting or otherwise mutating data faster than it can be migrated out of memory to make space available for incoming data, the behavior of the server may be a bit different than the client expects with memcached. In the case of memcached, items are evicted from memory, and the newly mutated item is stored. In the case of membase, however, the expectation is that we'll migrate items to disk.
When Membase determines that there is not enough memory to store
information immediately, the server will return
TMP_OOM, the temporary out of memory error.
This is designed to indicate that the inability to store the
requested information is only a temporary, not a permanent, lack
of memory. When the client receives this error, the storage
process can either be tried later or fail, dependending on the
client and application requirements.