jplevyak commented on PR #13893:
URL: https://github.com/apache/trafficserver/pull/13893#issuecomment-6380282365

   > Time-based aging skips elapsed intervals and does not advance during 
hit-only traffic, preserving stale popularity weights.
   
     ▎ - Skipped intervals: _decay_epochs() now advances one epoch for each 
whole 30s interval that has passed, not one per check. The leftover partial 
interval carries over to the next decay. The advance is   
     ▎ capped at 32 epochs, which already clears any 32-bit hit count, so a 
long idle period clears counts rather than wrapping.                            
                                                      
     ▎ - Hit-only traffic: both get() and put() now check for elapsed 
intervals, so a cache serving only hits still ages. Since decay is lazy (an 
O(1) epoch bump, applied to each entry when it's next touched), 
     ▎ the extra cost per get() is one clock_gettime.                           
                                                                                
                                                  
     ▎                                                                          
                                                                                
                                                  
     ▎ A new unit test ages an entry through get() alone. It checks that 3.5 
intervals give three halvings with the remainder carried over, and that 40 
intervals clear the count.                                
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to