A question on the behaviour of the recently added list in the ARC

Added by Roland Bavington about 1 year ago

What happens to recently written data if it is still in the recently written list in the ARC and then becomes hot and is read multiple times. Does it still get flushed as new data is written or is promoted to the top by the read activity? Is there a hard stop time limit after which it will get flushed and written out? Is there a path from recently added to frequently accessed?

The situation I have is that new content will be read multiple times and then only rarely and the latency of the read requests has an impact on user experience. I need to understand the cache algorithms in more detail.


Replies

RE: A question on the behaviour of the recently added list in the ARC - Added by Linda Kateley about 1 year ago

The read and write io channels are separate from one another. The newest page of the write will probably be sitting in memory at the time the read is issued. The read then will come directly from memory. There is a transaction group flush that takes place on a regular cadence but if it is recently read, it will stay in memory.

If it is hot it will stay in cached memory, but if the same page is written to, the kernel will know to go get the page from the new memory segment.

you might want to look at the statistics that are kept on arc and zil in

%show performance arc

in nmc. it helps to understand... there is an evict list in the arc stats which is a set of pages which haven't been recently read which will either go to l2arc, or the pages will go back on the free list if there is memory pressure.