From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2151 Path: news.gmane.org!not-for-mail From: Gildas <3ntr0p13@gmail.com> Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: suggest documentation of "soft limit" logic for chpst Date: Fri, 21 Sep 2012 09:04:02 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8fb1f84c4251fc04ca30d8ba X-Trace: ger.gmane.org 1348211050 16421 80.91.229.3 (21 Sep 2012 07:04:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 07:04:10 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2385-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Sep 21 09:04:14 2012 Return-path: Envelope-to: gcsg-supervision@plane.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TExHa-00016f-Ez for gcsg-supervision@plane.gmane.org; Fri, 21 Sep 2012 09:04:14 +0200 Original-Received: (qmail 12178 invoked by uid 76); 21 Sep 2012 06:05:22 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 12166 invoked from network); 21 Sep 2012 06:05:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=MaPU9dNKsm2Dyn5IJULy35TfZAjBO6GP/FxngYAtiiY=; b=RUze7C7nvA+HIbyXVSVnZkRtQEpPQ3TZTzSqyT1sPFmUdpGSdKs7ZcFeSZbenG8t6E FjSbYVNbCin738p9rOfyE+9FcZZ+DPBLBiYXMSxwGSDATnOaVl7FfVR70EAUnMvmAM5K jCQ3O3Od18LKx7+CsCLWHyhZQSxi7gAwG2y3KnVOnRQCP67hfeb+LN6KsIXcojbwyu2m F2pQY2JwMWlOXC0KT2mJlkmXtEpp6d2xlBQIWQlpLCvPe+K0CY534dOdLdO8YZQOZVcc NjIJxWEozdh50qJdYTpcY4BVn3jGP1qCvfiwrFx5M6vFkDC/AeYSWXkJphRD4tfjITZM Bw6Q== Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2151 Archived-At: --e89a8fb1f84c4251fc04ca30d8ba Content-Type: text/plain; charset=ISO-8859-1 Hi, I know it's weird to quote a subject from 2005, but I found this while I was looking for a reason why chpst wasn't behaving the way it was expected (when one assume you can raise the limit above the hard value). It seems that chpst is very often used to raise the number of file limit when starting a daemon as root, as the default file number limit in Linux (1024) is not enough for a number of use cases. To be able to do that, though, one as to do "ulimit -n 5000; chpst -o 5000 command", which seems to be like a waste of resources since the same syscalls are called again and again. It would be nice if you could raise the hard limit above its previously set value in a simpler way that would make it more efficient for the use case above. I've tested a naive patch (https:// gist.github.com /3757463) that allows to set a higher value for both soft and hard values when the given limit is over the hard value AND the effective uid is 0. This would fix the use case above as your could run a command as root with a higher file limit value than the default with a more concise "chpst -o 5000 command". Does it makes sense? What have I overlooked? Thanks for your insights on the matter! If it actually makes sense, and this modification could be merged, I'd be glad to provide a patched version of the manpage as well! Regards, Gildas --e89a8fb1f84c4251fc04ca30d8ba--