Re: computing drop-able caches

2016-02-12 Thread Johannes Weiner
On Fri, Feb 12, 2016 at 01:46:54PM -0800, Dave Hansen wrote: > On 02/12/2016 10:01 AM, Khalid Mughal (khalidm) wrote: > > If you look at the attached pdf, you will notice that OOM messages start > > to appear when memAvailable is showing 253MB (259228 KB) Free, memFree is > > 13.5MB (14008 KB) Free

Re: computing drop-able caches

2016-02-12 Thread Dave Hansen
On 02/12/2016 10:01 AM, Khalid Mughal (khalidm) wrote: > If you look at the attached pdf, you will notice that OOM messages start > to appear when memAvailable is showing 253MB (259228 KB) Free, memFree is > 13.5MB (14008 KB) Free, and dropcache based calculation ³Available memory² > is showing 21M

Re: computing drop-able caches

2016-02-12 Thread Daniel Walker
On 02/12/2016 10:18 AM, Dave Hansen wrote: On 02/12/2016 10:15 AM, Daniel Walker wrote: On 02/12/2016 10:06 AM, Dave Hansen wrote: On 01/28/2016 03:42 PM, Daniel Walker wrote: My colleague Khalid and I are working on a patch which will provide a /proc file to output the size of the drop-able p

Re: computing drop-able caches

2016-02-12 Thread Daniel Walker
On 02/12/2016 10:18 AM, Dave Hansen wrote: On 02/12/2016 10:15 AM, Daniel Walker wrote: On 02/12/2016 10:06 AM, Dave Hansen wrote: On 01/28/2016 03:42 PM, Daniel Walker wrote: My colleague Khalid and I are working on a patch which will provide a /proc file to output the size of the drop-able p

Re: computing drop-able caches

2016-02-12 Thread Dave Hansen
On 02/12/2016 10:15 AM, Daniel Walker wrote: > On 02/12/2016 10:06 AM, Dave Hansen wrote: >> On 01/28/2016 03:42 PM, Daniel Walker wrote: >>> My colleague Khalid and I are working on a patch which will provide a >>> /proc file to output the size of the drop-able page cache. >>> One way to implement

Re: computing drop-able caches

2016-02-12 Thread Daniel Walker
On 02/12/2016 10:06 AM, Dave Hansen wrote: On 01/28/2016 03:42 PM, Daniel Walker wrote: My colleague Khalid and I are working on a patch which will provide a /proc file to output the size of the drop-able page cache. One way to implement this is to use the current drop_caches /proc routine, but

Re: computing drop-able caches

2016-02-12 Thread Dave Hansen
On 01/28/2016 03:42 PM, Daniel Walker wrote: > My colleague Khalid and I are working on a patch which will provide a > /proc file to output the size of the drop-able page cache. > One way to implement this is to use the current drop_caches /proc > routine, but instead of actually droping the caches

Re: computing drop-able caches

2016-02-12 Thread Khalid Mughal (khalidm)
I did an experiment on our system. I added a small kernel patch, as mentioned by Daniel in first email of this thread, to compute the droppable pagecache without actually dropping it. Using this value I computed the Available memory by adding droppable-page count to memFree count. Then used a test

Re: computing drop-able caches

2016-02-11 Thread Rik van Riel
On Wed, 2016-02-10 at 11:11 -0800, Daniel Walker wrote: > On 02/10/2016 10:13 AM, Dave Hansen wrote: > > On 02/10/2016 10:04 AM, Daniel Walker wrote: > > > > [Linux_0:/]$ echo 3 > /proc/sys/vm/drop_caches > > > > [Linux_0:/]$ cat /proc/meminfo > > > > MemTotal:3977836 kB > > > > MemFree:   

Re: computing drop-able caches

2016-02-10 Thread Daniel Walker
On 02/10/2016 10:13 AM, Dave Hansen wrote: On 02/10/2016 10:04 AM, Daniel Walker wrote: [Linux_0:/]$ echo 3 > /proc/sys/vm/drop_caches [Linux_0:/]$ cat /proc/meminfo MemTotal:3977836 kB MemFree: 1095012 kB MemAvailable:1434148 kB I suspect MemAvailable takes into account mor

Re: computing drop-able caches

2016-02-10 Thread Dave Hansen
On 02/10/2016 10:04 AM, Daniel Walker wrote: >> [Linux_0:/]$ echo 3 > /proc/sys/vm/drop_caches >> [Linux_0:/]$ cat /proc/meminfo >> MemTotal:3977836 kB >> MemFree: 1095012 kB >> MemAvailable:1434148 kB > > I suspect MemAvailable takes into account more than just the droppable >

Re: computing drop-able caches

2016-02-10 Thread Daniel Walker
On 02/08/2016 12:57 PM, Khalid Mughal (khalidm) wrote: How do we explain the discrepancy between MemAvaiable and MemFree count after we drop cache? In following output, which one represents correct data? [Linux_0:/]$ cat /proc/meminfo MemTotal:3977836 kB MemFree: 747832 kB MemAv

Re: computing drop-able caches

2016-02-08 Thread Khalid Mughal (khalidm)
How do we explain the discrepancy between MemAvaiable and MemFree count after we drop cache? In following output, which one represents correct data? [Linux_0:/]$ cat /proc/meminfo MemTotal:3977836 kB MemFree: 747832 kB MemAvailable:1441736 kB Buffers: 123976 kB Cache

Re: computing drop-able caches

2016-01-29 Thread Rik van Riel
On 01/28/2016 08:55 PM, Johannes Weiner wrote: > On Thu, Jan 28, 2016 at 05:29:41PM -0800, Daniel Walker wrote: >> On 01/28/2016 05:03 PM, Daniel Walker wrote: >> [regarding MemAvaiable] >> >> This new metric purportedly helps usrespace assess available memory. But, >> its again based on heuristic,

Re: computing drop-able caches

2016-01-29 Thread Johannes Weiner
On Fri, Jan 29, 2016 at 01:21:47PM -0800, Daniel Walker wrote: > On 01/28/2016 05:55 PM, Johannes Weiner wrote: > >On Thu, Jan 28, 2016 at 05:29:41PM -0800, Daniel Walker wrote: > >>On 01/28/2016 05:03 PM, Daniel Walker wrote: > >>[regarding MemAvaiable] > >> > >>This new metric purportedly helps u

Re: computing drop-able caches

2016-01-29 Thread Daniel Walker
On 01/28/2016 05:55 PM, Johannes Weiner wrote: On Thu, Jan 28, 2016 at 05:29:41PM -0800, Daniel Walker wrote: On 01/28/2016 05:03 PM, Daniel Walker wrote: [regarding MemAvaiable] This new metric purportedly helps usrespace assess available memory. But, its again based on heuristic, it takes 1/2

Re: computing drop-able caches

2016-01-28 Thread Johannes Weiner
On Thu, Jan 28, 2016 at 05:29:41PM -0800, Daniel Walker wrote: > On 01/28/2016 05:03 PM, Daniel Walker wrote: > [regarding MemAvaiable] > > This new metric purportedly helps usrespace assess available memory. But, > its again based on heuristic, it takes 1/2 of page cache as reclaimable.. No, it

Re: computing drop-able caches

2016-01-28 Thread Daniel Walker
On 01/28/2016 03:58 PM, Johannes Weiner wrote: On Thu, Jan 28, 2016 at 03:42:53PM -0800, Daniel Walker wrote: "Currently there is no way to figure out the droppable pagecache size from the meminfo output. The MemFree size can shrink during normal system operation, when some of the memory pages g

Re: computing drop-able caches

2016-01-28 Thread Johannes Weiner
On Thu, Jan 28, 2016 at 03:42:53PM -0800, Daniel Walker wrote: > "Currently there is no way to figure out the droppable pagecache size > from the meminfo output. The MemFree size can shrink during normal > system operation, when some of the memory pages get cached and is > reflected in "Cached" fie

computing drop-able caches

2016-01-28 Thread Daniel Walker
Hi, My colleague Khalid and I are working on a patch which will provide a /proc file to output the size of the drop-able page cache. One way to implement this is to use the current drop_caches /proc routine, but instead of actually droping the caches just add up the amount. Here's a quote Kha