repair pqueue using current heap relation#192
Conversation
|
This is an unexpected code change for me. |
|
I can't reproduce this RU exhausted scenario, the workload I use is too huge beyond the capacity. I'm testing a much smaller workload again now. But during the victim selecting, I found this, there are consecutive FTL logs, background gc first choose RU96 then RU124, RU39, no GC action occured in this period, why background GC will select RU96 again and even select RU39 for GC victim? Is this a proper behavior? I think backgound GC will always select RU 124. |
|
I decrease the threshold of forground GC from 95% to 80%, background GC from 75% to 65% respectively, and 25%OP->10%OP, using same YCSB workload A with 20M record and 50M operation. Then I reproduce the RU exhausted problem. Such workload is too heavy for a 32G SSD and in the last but two testing, FEMU stuck at a moment when YCSB load 20M record successfully then process 28M operation and output one same GC for a victim RU repeatly(This may be a proper phenomenon I guess). But this time, same problem occured, I added some code line for checking the victim queue, the code patch is attached in attach file, what I do is checking the hole pqueue before FEMU output In the logs which outputed by my validation code, the root of such heap is not the best victim for GC, for a greedy GC policy, I guess this may not a proper result. I will attach the full FTL log, It report the entire pqueue, and some of node doesn't follow the heap restriction. But the relationship between the wrong order in victim RU and RUs exhausting is opaque, I do not really understand them. |
Description
Repair
pqueue_change_priority()by selecting the heap-repair direction from the updated node's relationship with its current parent.Some FEMU callers update the object's priority field before invoking
pqueue_change_priority(). The current implementation then reads the already-updated value asold_pri, makingold_pri == new_pri.A decreased priority consequently takes the
percolate_down()path instead ofbubble_up(), allowing the heap root to become stale.This is visible in FDP global-greedy GC, where an RU with a smaller vpc can remain below an RU with a larger vpc.
Related issue
Fixes #191
Testing
I tested this by running YCSB workload A+RocksDB+XFS with 20M record and 50M operationon a 32G(25% OP) FDP SSD, the benchmark can finished after this patch.