From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Down Subject: Re: [RFC 0/7] Introduce memory allocation speed throttle in memcg Date: Thu, 3 Jun 2021 12:38:57 +0100 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wiKfBxTb65s9ryPk0mFCpTofRIT4fNKHgWxxNUTFSrY=; b=LEUQzE+TXNrsF7VkTKq1fOZ1V0WA+d+HQMLVNnkA/g+4Qw712FXlgXSf8/gadK8Bro Kz2E5md4HlTtFR6XSPmsArHCMFvNKKbUz8s6bvVZ8h3VmtAvpACaB0RAtlLg2BQA0irt RAl3xa49jeclb3y6buUFOf1iCnIe8lU5lINRo= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: yulei zhang Cc: Shakeel Butt , Tejun Heo , Zefan Li , Johannes Weiner , Christian Brauner , Cgroups , benbjiang-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org, Wanpeng Li , Yulei Zhang , Linux MM , Michal Hocko , Roman Gushchin yulei zhang writes: >Thanks. IMHO, there are differences between these two throttlings. >memory.high is a per-memcg throttle which targets to limit the memory >usage of the tasks in the cgroup. For the memory allocation speed throttle(MST), >the purpose is to avoid the memory burst in cgroup which would trigger >the global reclaim and affects the timing sensitive workloads in other cgroup. >For example, we have two pods with memory overcommit enabled, one includes >online tasks and the other has offline tasks, if we restrict the memory usage of >the offline pod with memory.high, it will lose the benefit of memory overcommit >when the other workloads are idle. On the other hand, if we don't >limit the memory >usage, it will easily break the system watermark when there suddenly has massive >memory operations. If enable MST in this case, we will be able to >avoid the direct >reclaim and leverage the overcommit. Having a speed throttle is a very primitive knob: it's hard to know what the correct values are for a user. That's one of the reasons why we've moved away from that kind of tunable for blkio. Ultimately, if you want work-conserving behaviour, why not use memory.low?