From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [PATCH 00/14] Present useful limits to user (v2) Date: Fri, 15 Jul 2016 23:04:58 +1000 Message-ID: <20160715130458.GB21685@350D> References: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> Reply-To: bsingharora@gmail.com Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dEYm/NUmuFdmVEES3RjhIpVgJC72jDk7h9Wq6KrNaNw=; b=eytmnl7yeGDQ8oQC0/GIOBe9N2qQ3KWeH4mx6X/Ekur9ATYiCfgsLwTBxZbIHgiE3n wR5/it3+TQqIf9cM4m5S62aBbO1+8qfc5zzNDKu8eLzlIW+A5YvJD4OlpDv5rKQnJCyI AHy/sAv48wkFltVUBorg4CzbUPuPG1c74icpeshYhYEBVQI+dTQHY088arC37qDYW9LP gU0eWrAyd0rblfRp/Z4i4qQ5inE1WGrW82qLq8FUaxG5a/n0EFSZVJb6Ljq7GvxXiPd8 Qn84cRC+pC4J/rb90abHatX+De6LSeCTePwwE9QMuTk2hR/C4OhGPB6pNlck+BaCDIB3 jKag== Content-Disposition: inline In-Reply-To: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Topi Miettinen Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , Tony Luck , Fenghua Yu , Alexander Graf , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Doug Ledford , Sean Hefty , Hal Rosenstock , Mike Marciniszyn , Dennis Dalessandro , Christian Benvenuti , Dave Goodell , Sudeep Dutt , As On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: > Hello, > > There are many basic ways to control processes, including capabilities, > cgroups and resource limits. However, there are far fewer ways to find out > useful values for the limits, except blind trial and error. > > This patch series attempts to fix that by giving at least a nice starting > point from the highwater mark values of the resources in question. > I looked where each limit is checked and added a call to update the mark > nearby. > > Example run of program from Documentation/accounting/getdelauys.c: > > ./getdelays -R -p `pidof smartd` > printing resource accounting > RLIMIT_CPU=0 > RLIMIT_FSIZE=0 > RLIMIT_DATA=18198528 > RLIMIT_STACK=135168 > RLIMIT_CORE=0 > RLIMIT_RSS=0 > RLIMIT_NPROC=1 > RLIMIT_NOFILE=55 > RLIMIT_MEMLOCK=0 > RLIMIT_AS=130879488 > RLIMIT_LOCKS=0 > RLIMIT_SIGPENDING=0 > RLIMIT_MSGQUEUE=0 > RLIMIT_NICE=0 > RLIMIT_RTPRIO=0 > RLIMIT_RTTIME=0 > > ./getdelays -R -C /sys/fs/cgroup/systemd/system.slice/smartd.service/ > printing resource accounting > sleeping 1, blocked 0, running 0, stopped 0, uninterruptible 0 > RLIMIT_CPU=0 > RLIMIT_FSIZE=0 > RLIMIT_DATA=18198528 > RLIMIT_STACK=135168 > RLIMIT_CORE=0 > RLIMIT_RSS=0 > RLIMIT_NPROC=1 > RLIMIT_NOFILE=55 > RLIMIT_MEMLOCK=0 > RLIMIT_AS=130879488 > RLIMIT_LOCKS=0 > RLIMIT_SIGPENDING=0 > RLIMIT_MSGQUEUE=0 > RLIMIT_NICE=0 > RLIMIT_RTPRIO=0 > RLIMIT_RTTIME=0 Does this mean that rlimit_data and rlimit_stack should be set to the values as specified by the data above? Do we expect a smart user space daemon to then tweak the RLIMIT values? Balbir Singh. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org