[PATCH -mmotm 2/5] memcg: dirty memory documentation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Righi
Date: Sunday, March 14, 2010 - 4:26 pm

Document cgroup dirty memory interfaces and statistics.

Signed-off-by: Andrea Righi <arighi@develer.com>
---
 Documentation/cgroups/memory.txt |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 49f86f3..38ca499 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -310,6 +310,11 @@ cache		- # of bytes of page cache memory.
 rss		- # of bytes of anonymous and swap cache memory.
 pgpgin		- # of pages paged in (equivalent to # of charging events).
 pgpgout		- # of pages paged out (equivalent to # of uncharging events).
+filedirty	- # of pages that are waiting to get written back to the disk.
+writeback	- # of pages that are actively being written back to the disk.
+writeback_tmp	- # of pages used by FUSE for temporary writeback buffers.
+nfs		- # of NFS pages sent to the server, but not yet committed to
+		  the actual storage.
 active_anon	- # of bytes of anonymous and  swap cache memory on active
 		  lru list.
 inactive_anon	- # of bytes of anonymous memory and swap cache memory on
@@ -345,6 +350,37 @@ Note:
   - a cgroup which uses hierarchy and it has child cgroup.
   - a cgroup which uses hierarchy and not the root of hierarchy.
 
+5.4 dirty memory
+
+  Control the maximum amount of dirty pages a cgroup can have at any given time.
+
+  Limiting dirty memory is like fixing the max amount of dirty (hard to
+  reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers,
+  they will not be able to consume more than their designated share of dirty
+  pages and will be forced to perform write-out if they cross that limit.
+
+  The interface is equivalent to the procfs interface: /proc/sys/vm/dirty_*.
+  It is possible to configure a limit to trigger both a direct writeback or a
+  background writeback performed by per-bdi flusher threads.
+
+  Per-cgroup dirty limits can be set using the following files in the cgroupfs:
+
+  - memory.dirty_ratio: contains, as a percentage of cgroup memory, the
+    amount of dirty memory at which a process which is generating disk writes
+    inside the cgroup will start itself writing out dirty data.
+
+  - memory.dirty_bytes: the amount of dirty memory of the cgroup (expressed in
+    bytes) at which a process generating disk writes will start itself writing
+    out dirty data.
+
+  - memory.dirty_background_ratio: contains, as a percentage of the cgroup
+    memory, the amount of dirty memory at which background writeback kernel
+    threads will start writing out dirty data.
+
+  - memory.dirty_background_bytes: the amount of dirty memory of the cgroup (in
+    bytes) at which background writeback kernel threads will start writing out
+    dirty data.
+
 
 6. Hierarchy support
 
-- 
1.6.3.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7), Andrea Righi, (Sun Mar 14, 4:26 pm)
[PATCH -mmotm 2/5] memcg: dirty memory documentation, Andrea Righi, (Sun Mar 14, 4:26 pm)
[PATCH -mmotm 5/5] memcg: dirty pages instrumentation, Andrea Righi, (Sun Mar 14, 4:26 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Sun Mar 14, 5:06 pm)
Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and l ..., KAMEZAWA Hiroyuki, (Sun Mar 14, 7:26 pm)
Re: [PATCH -mmotm 5/5] memcg: dirty pages instrumentation, KAMEZAWA Hiroyuki, (Sun Mar 14, 7:31 pm)
Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7), KAMEZAWA Hiroyuki, (Sun Mar 14, 7:36 pm)
Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and l ..., Daisuke Nishimura, (Mon Mar 15, 7:32 pm)
Re: [PATCH -mmotm 2/5] memcg: dirty memory documentation, Daisuke Nishimura, (Tue Mar 16, 12:41 am)
Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and l ..., Daisuke Nishimura, (Tue Mar 16, 8:09 am)
Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7), Balbir Singh, (Tue Mar 16, 11:44 pm)
Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7), Balbir Singh, (Wed Mar 17, 11:53 am)
Re: [PATCH -mmotm 2/5] memcg: dirty memory documentation, Balbir Singh, (Wed Mar 17, 12:02 pm)
Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7), Balbir Singh, (Wed Mar 17, 12:17 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Mar 17, 4:54 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Mar 17, 5:45 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, Daisuke Nishimura, (Wed Mar 17, 7:16 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Mar 17, 7:58 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Mar 17, 9:21 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Mar 17, 9:35 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Thu Mar 18, 6:23 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Thu Mar 18, 8:00 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Apr 14, 2:29 am)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Apr 14, 5:14 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Apr 14, 5:22 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, Daisuke Nishimura, (Wed Apr 14, 7:40 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, Daisuke Nishimura, (Wed Apr 14, 11:21 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Wed Apr 14, 11:54 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Fri Apr 23, 7:19 pm)
Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock, KAMEZAWA Hiroyuki, (Fri Apr 23, 7:22 pm)