<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,<br><br>I have been reading the Je source code, and I have some question about the purging order.<br>The fisrt one is , according to the code comments, the clean-dirty fragmentation is measured as,<br><br>* Order such that chunks with higher fragmentation are "less than"<br>* those with lower fragmentation -- purging order is from "least" to<br>* "greatest". <br>    mean current avail run size                 nruns_avail-nruns_adjac<br>--------------------------------------------  =  ----------------------------------<br>mean defragmented avail run size                  nruns_avail<br><br>So if I have a chunkA with avail_runs = 10, adjac = 1, and another chunkB with avail_runs = 20, adjac = 5.<br>Obviously, the fragmentA(0.9) > fragmentB(0.75), so the A will be prior to B in the dirty chunk tree, and <br>will be purged first. But the chunkB truely has more adjacs than the A, and the performace gain after purging <br>chunkA is also less than the other(0.1 vs 0.25). Why we prefer to purge the chunk with "less adjacs"? <br>Shouldn't we purge more adjacs or clean-dirty fragments to acquire more continuous unalloc pages?<br><br>Another question is, I notice that before the git node e3d13060 there are two avail-trees, one is for dirty, <br>and another for clean,<br>    arena_avail_tree_t    runs_avail_clean;<br>    arena_avail_tree_t    runs_avail_dirty;<br>After that, the two became one. So how to ensure the new runs allocaction to prefer to dirty pages? <br>Is the modification will cause more <span></span><span class="" id="tran_0_4">performance regression than before</span><span>?</span><br><br>That's all, thanks.<br><br><br><br><br><br></div></div><br><br><span title="neteasefooter"><p> </p></span>