Conversation
There was a problem hiding this comment.
Oops, not sure how this got into this file.
There was a problem hiding this comment.
Yeah, in Java it's generally preferred to keep one class pr file... the exception are inner classes such as in Variant (though that one is starting to feel messy).
There was a problem hiding this comment.
Ah, I will separate them out!
There was a problem hiding this comment.
Am I missunderstanding something - how will you ever get a new page in, when you exit if it's not already in?
There was a problem hiding this comment.
Good question. Currently the PageCache implementations don't add objects to the pageMap, they only evict them since trimPageSet is called before objects are added to pageMap. Should we set pages in the cache? Or trimPageSet before returning the page?
|
Put all classes in separate files! It probably makes sense for us to move everything related to paging into a separate package... so, let's make a new folder under pikadb called page that has Page, PageDiff, PageFile and your files related to the page strategy! |
|
Should WriteAheadLog and Column move into the page package too? How do you suggest handling these files when creating the page package? I tried to create the page package but ran into a couple dependencies being in the current main package that would create a circular dependency. |
|
@kasperjj I removed ARC and created the page package |
This is a work in progress stab at implementing page eviction. It includes an implementation of LRU, SLRU, and ARC (not sure if there is a problem using this with IBM patent). The cache hit/miss ratio is printed at the end of the benchmark.
Cache hit rates at different sizes of 10, 100, 500, 1000:
Noop: 0.60273975
LRU: 0.01743462, 0.01743462, 0.087173104, 0.08966376
SLRU: 0.04856787, 0.30635118, 0.29638854, 0.57907844
ARC: 0.19551681, 0.19551681, 0.42216688, 0.60273975