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