When couchbase evicts data from ram, it does evicts persisted data only. but lets say out of 5k items in ram. 1k of them are older than then than rest. Does couchbase evicts the 1k items that are older, or it evicts randomly?
Just to clarify, it evicts data which is not been used for a long time or less frequently used items.
Ref from manual,
"Eviction is the process of removing information entirely from memory for memcached buckets. The memcached system uses a least recently used (LRU) algorithm to remove data from the system entirely when it is no longer used."
As Neo said, the algorithm used by Couchbase is LRU, but this is true for the "Membase Buckets"
For the Couchbase Buckets it is more "random", starting with clean memory.
In both case it is only happening when the system has no free memory to pu the items that are needed by the application.
The documentation contains now a new chapter about ejection in Couchbase 2.0:
© 2013 COUCHBASE All rights reserved.