Mapped more than Cached in /proc/meminfo

7 messages, 3 authors, 2011-08-10 · open the first message on its own page

Mapped more than Cached in /proc/meminfo

From: z0032oom@gmail.com (=/_00/\/\)
Date: 2011-08-05 14:16:25

Hi,

I am trying to analyze memory usage on my system.
As first step I am monitoring /proc/meminfo.
Surprisingly I see Mapped value is more than Cached.

So in which case is it possible to have Mapped more than Cached ?


Regards,
  ~/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110805/dee4610d/attachment.html 

Mapped more than Cached in /proc/meminfo

From: Mulyadi Santosa <hidden>
Date: 2011-08-06 04:27:14

On Fri, Aug 5, 2011 at 21:16, =/_00/\/\ [off-list ref] wrote:
Hi,

I am trying to analyze memory usage on my system.
As first step I am monitoring /proc/meminfo.
Surprisingly I see Mapped value is more than Cached.

So in which case is it possible to have Mapped more than Cached ?
your apps mmap() less than the amount of files content that are cached
through normal read() AFAIK


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

Mapped more than Cached in /proc/meminfo

From: z0032oom@gmail.com (=/_00/\/\)
Date: 2011-08-09 11:10:52

Hi,

Thanks for replying
Here is one observation worth mentioning.
On boot system it shows Mapped < Cached (In fact much less)
After using system for some time following commands are executed.
# sync and echo 3 > /proc/sys/vm/drop_cache

Whenever above command is executed I can see Mapped > Cached.

This is somewhat confusing for me.
Could you please explain ?

Regards,
  ~/



On Sat, Aug 6, 2011 at 9:57 AM, Mulyadi Santosa
[off-list ref]wrote:
On Fri, Aug 5, 2011 at 21:16, =/_00/\/\ [off-list ref] wrote:
quoted
Hi,

I am trying to analyze memory usage on my system.
As first step I am monitoring /proc/meminfo.
Surprisingly I see Mapped value is more than Cached.

So in which case is it possible to have Mapped more than Cached ?
your apps mmap() less than the amount of files content that are cached
through normal read() AFAIK


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110809/0f0e6d35/attachment-0001.html 

Mapped more than Cached in /proc/meminfo

From: Vladimir Murzin <hidden>
Date: 2011-08-09 15:00:01

On Tue, Aug 9, 2011 at 3:10 PM, =/_00/\/\ [off-list ref] wrote:
Hi,

Thanks for replying
Here is one observation worth mentioning.
On boot system it shows Mapped < Cached (In fact much less)
After using system for some time following commands are executed.
# sync and echo 3 > /proc/sys/vm/drop_cache

Whenever above command is executed I can see Mapped > Cached.

This is somewhat confusing for me.
Could you please explain ?

Regards,
? ~/



On Sat, Aug 6, 2011 at 9:57 AM, Mulyadi Santosa [off-list ref]
wrote:
quoted
On Fri, Aug 5, 2011 at 21:16, =/_00/\/\ [off-list ref] wrote:
quoted
Hi,

I am trying to analyze memory usage on my system.
As first step I am monitoring /proc/meminfo.
Surprisingly I see Mapped value is more than Cached.

So in which case is it possible to have Mapped more than Cached ?
your apps mmap() less than the amount of files content that are cached
through normal read() AFAIK


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Please, read some explanation about this command, for instance, in [1]

[1] http://linux-mm.org/Drop_Caches

Mapped more than Cached in /proc/meminfo

From: Mulyadi Santosa <hidden>
Date: 2011-08-10 07:26:41

Hi///

On 09/08/2011, =/_00/\/\ [off-list ref] wrote:
Hi,

Thanks for replying
Here is one observation worth mentioning.
On boot system it shows Mapped < Cached (In fact much less)
quite predictable.... during booting phase, your system read() much by
doesn't mmap() that much....
After using system for some time following commands are executed.
# sync and echo 3 > /proc/sys/vm/drop_cache

Whenever above command is executed I can see Mapped > Cached.
by echoing "3" to drop_cache, you flush the content of page cache as
much as possible ...


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com

Mapped more than Cached in /proc/meminfo

From: Prateek Sharma <hidden>
Date: 2011-08-10 07:34:34

On Wed, Aug 10, 2011 at 12:56 PM, Mulyadi Santosa <mulyadi.santosa@gmail.com
wrote:
Hi///

On 09/08/2011, =/_00/\/\ [off-list ref] wrote:
quoted
Hi,

Thanks for replying
Here is one observation worth mentioning.
On boot system it shows Mapped < Cached (In fact much less)
quite predictable.... during booting phase, your system read() much by
doesn't mmap() that much....
quoted
After using system for some time following commands are executed.
# sync and echo 3 > /proc/sys/vm/drop_cache

Whenever above command is executed I can see Mapped > Cached.
by echoing "3" to drop_cache, you flush the content of page cache as
much as possible ...
Here is my understanding of what drop_page_cache does:
All page-cache pages are 'dropped' except the following:
1. Dirty pages. (they are *not* synced)
2. Mapped pages (pages 'in use' , mapped by rmap )
(There are a few more exceptions i dont recall now.)

Hence even after dropping caches, free will still show some cached pages.
These are dirty+mapped.
Doing a sync before dropping will only show the mapped pages.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110810/c968f134/attachment.html 

Mapped more than Cached in /proc/meminfo

From: z0032oom@gmail.com (=/_00/\/\)
Date: 2011-08-10 16:42:35

Hi,

Please find my reply inlined.


On Wed, Aug 10, 2011 at 1:04 PM, Prateek Sharma [off-list ref]wrote:

On Wed, Aug 10, 2011 at 12:56 PM, Mulyadi Santosa <
mulyadi.santosa at gmail.com> wrote:
quoted
Hi///

On 09/08/2011, =/_00/\/\ [off-list ref] wrote:
quoted
Hi,

Thanks for replying
Here is one observation worth mentioning.
On boot system it shows Mapped < Cached (In fact much less)
quite predictable.... during booting phase, your system read() much by
doesn't mmap() that much....
quoted
After using system for some time following commands are executed.
# sync and echo 3 > /proc/sys/vm/drop_cache

Whenever above command is executed I can see Mapped > Cached.
by echoing "3" to drop_cache, you flush the content of page cache as
much as possible ...
Here is my understanding of what drop_page_cache does:
All page-cache pages are 'dropped' except the following:
1. Dirty pages. (they are *not* synced)
2. Mapped pages (pages 'in use' , mapped by rmap )
(There are a few more exceptions i dont recall now.)
But even in this case Cached (/proc/meminfo) should be always greater than
Mapped(/proc/meminfo)  (As it will contain mapped  + Unmapped pages)
I also saw that Cached (/proc/meminfo) does not include Buffer Cache.

========= fs/proc/meminfo.c ========
cached = global_page_state(NR_FILE_PAGES) -
                        total_swapcache_pages - i.bufferram;
==============================

Even if drop_cache is not done is it ever possible to get Cached < Mapped ?



Regards,
  ~/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110810/8d9f2b00/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help