Random-LRY selects the minimum of 5 timestamps (5 pages, 1 timestamp for each 
page).

Random-2-LRU selects the minimum of 10 timestamps (5 pages, 2 timestamps for 
each page).

My advice is not to go that deep. Random-2-LRU I protected from the “one-hit 
wonder” and has a very tiny overhead compared to Random-LRU.
Just go for the Random-2-LRU, don’t study the implementation details – you 
don’t need them to make the choice.

Stan

From: monstereo
Sent: 24 июля 2018 г. 13:17
To: user@ignite.apache.org
Subject: Re: Random-LRU-2 ?

I could not understand this part "MIN(timestamp1, timestamp2) for further
comparing"

That's means :

Algorithm select randomly 5 indexes(let's say it choose indexes 4, 12, 5, 1,
3) and takes the index MIN(timestamp1, timestamp2) (let's say index 5)

Then it evaluates |timestamp1 - timestamp2| for every other indexes.

Then compare them with index 5.

Then it will be evicted the index which value of ( (timestamp1 - timestamp2)
- MIN(timestamp1, timestamp2) ) is the highest?



mcherkasov wrote
>>For random-lru and random-lru-2, algorithm randomly selects 5 indexes. Why
> 5? 
> well,  I don't know about how this number has been chosen. The only I can
> say it works fine.
> 
>>Can I change this number? 
> there's no way to configure it.
> 
>>And we evict the index which |last_1 - last_2| is max? Am i correct? 
> Nope, Random LRU2 tracks two last recently used timestamps and takes
> MIN(timestamp1, timestamp2) for further comparing. 
> 
>>What is the best advantages over random-lru to random-lru-2(vica-verse)? 
> see the doc about this, it explicitly explains this:
> https://apacheignite.readme.io/docs/evictions#section-random-2-lru
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to