Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757412Ab1CPAup (ORCPT ); Tue, 15 Mar 2011 20:50:45 -0400 Received: from smtp-out.google.com ([216.239.44.51]:20727 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753844Ab1CPAul convert rfc822-to-8bit (ORCPT ); Tue, 15 Mar 2011 20:50:41 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=pnNmOvQO6yxfFp1seeRZWN5D0ZXiLC7P+/IX5jqmzfiq6mTbRqf3WMnx7FftGNakI5 7f8g1L4pyZPS9gl5O2ig== MIME-Version: 1.0 In-Reply-To: <4D7F7121.5040009@librato.com> References: <1299869011-26152-1-git-send-email-gthelen@google.com> <1299869011-26152-7-git-send-email-gthelen@google.com> <4D7F7121.5040009@librato.com> From: Greg Thelen Date: Tue, 15 Mar 2011 17:50:17 -0700 Message-ID: Subject: Re: [PATCH v6 6/9] memcg: add cgroupfs interface to memcg dirty limits To: Mike Heffner Cc: Andrew Morton , Chad Talbott , Justin TerAvest , Andrea Righi , Ciju Rajan K , David Rientjes , Daisuke Nishimura , linux-kernel@vger.kernel.org, Vivek Goyal , linux-mm@kvack.org, Johannes Weiner , containers@lists.osdl.org, linux-fsdevel@vger.kernel.org, Wu Fengguang , Balbir Singh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1805 Lines: 43 On Tue, Mar 15, 2011 at 7:01 AM, Mike Heffner wrote: > On 03/11/2011 01:43 PM, Greg Thelen wrote: >> >> Add cgroupfs interface to memcg dirty page limits: >> ? Direct write-out is controlled with: >> ? - memory.dirty_ratio >> ? - memory.dirty_limit_in_bytes >> >> ? Background write-out is controlled with: >> ? - memory.dirty_background_ratio >> ? - memory.dirty_background_limit_bytes > > > What's the overlap, if any, with the current memory limits controlled by > `memory.limit_in_bytes` and the above `memory.dirty_limit_in_bytes`? If I > want to fairly balance memory between two cgroups be one a dirty page > antagonist (dd) and the other an anonymous page (memcache), do I just set > `memory.limit_in_bytes`? Does this patch simply provide a more granular > level of control of the dirty limits? > > > Thanks, > > Mike > The per memcg dirty ratios are more about controlling how memory within a cgroup is used. If you isolate two processes in different memcg, then the memcg dirty ratios will neither help nor hurt isolation between cgroups. The per memcg dirty limits are more focused on providing some form of better behavior when multiple processes share a single memcg. Running an antagonist (dd) in the same cgroup as a read-mostly workload would benefit because the antagonist dirty memory usage should be capped at the memcg's dirty memory usage. So any clean page allocation requests by the read-mostly workload should be faster (and less likely to OOM) because there will be more clean pages available within the memcg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/