<p dir="ltr">Hiroshi,</p>
<p dir="ltr">I'll second your explanation for #1 - we also have some server workloads that fluctuate.</p>
<p dir="ltr">Since the kernel will page out memory if need arises on its own, the main benefit I'm seeing in your patch is that it removes the possibility that kernel will page out the wrong pages. That is, if it's using LRU page replacement (or whatever the latest heuristic might be) and GC just freed up those pages (but ended up marking them dirty in the process), then if kernel needs to swap out it may overlook these pages because they don't fit the replacement policy(I guess it also ensures that these pages don't need swap backing either). Otherwise, if the server app has not been using those extra pages for a while anyway, I'm thinking kernel will pick up on that.</p>
<p dir="ltr">Is that right? Just want to make sure I understand.</p>
<p dir="ltr">Thanks</p>
<p dir="ltr">Sent from my phone</p>
<div class="gmail_quote">On Jan 25, 2013 6:13 PM, "Hiroshi Yamauchi" <<a href="mailto:yamauchi@google.com">yamauchi@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Jon,<br><div class="gmail_extra"><br></div><div class="gmail_extra">I haven't talked to you for a while. I hope you are doing well :)</div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
This is a nice feature but I'm asking myself what type<br>
of applications would see significant footprint reductions.<br>
Would they be<br>
<br>
1) applications whose heap usage varies significantly<br>
over time so that there are periods when some large<br>
fraction of the heap is unused and<br></blockquote><div><br></div><div>Yes. Especially multiple applications with workload variations running on a (shared) machine. Under this sort of environment, it seems to make things work more nicely as a whole from a machine/memory resource utilization point of view because it's not uncommon (in my opinion) to see some applications happen to be currently running with higher workload and needing more RAM while others happen to be currently running with lower workload and needing less RAM at a point in time in a shared machine.</div>
<div><br></div><div>In server applications, this sort of workload variations can happen for reasons such as capacity redundancy and time-of-day variations, etc. On desktops, one might keep open all sorts of applications at the same time such as web browsers, developer tools, graphics tools, etc. but might put significant workload (or a temporary memory usage increase) on only one application at a time. In such an environment, if an application that was running with high workload in the past can release some RAM, it'd be much nicer for other applications.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
2) applications with many objects larger than a page so that freeing<br>
those objects could free memory.<br></blockquote><div><br></div><div>Yes, but objects don't necessarily have to be larger than a page as long as free chunks that are left after they are freed get coalesced together into a free chunk that's larger than a page.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Is that a good guess or is it more general than that?</blockquote><div><br></div><div>I hope the above makes sense. I can discuss more if desired.</div><div><br></div><div>Thanks.</div><div><br></div>
</div></div></div>
</blockquote></div>