-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How the cost works? #84
Comments
You have described everything correctly. Such entries are rejected because inserting them will lead to a severe drop in the hit ratio. The queue will be completely cleared and most of the entries in it will be deleted, since they most likely have not been accessed. |
How about remove the cost from node, that means every node will have a cost==1, what will happened if we remove the cost or set all nodes's cost == 1? |
This is the most common scenario, but there are cases when the cost (bytes) of entries differs very much in the workload, which is why this parameter is introduced. |
That make sense, it can limit the memory by this parameter😁 |
Every node has a cost value, when add a node otter will compare the node cost with the
policy.MaxAvailableCost()
, if it is larger than later, otter will reject to add this node.I don't fullt understand how the cost infect the s3-FIFO policy. As i know, in s3-FIFO, the length of the queues of s3-FIFO is limited by the cost, a node with large cost will occupy more queue space, but the cost won't affect the evict sequence.
So what the cost does to the otter, will it improve some performance or hit rate in some cases?
The text was updated successfully, but these errors were encountered: