From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 2/8] oxenstored: add facilities to raise the max open fds uplimit Date: Tue, 16 Sep 2014 10:38:12 +0100 Message-ID: <54180504.7070102@citrix.com> References: <1410820760-7994-1-git-send-email-dev@zheng.li> <1410820760-7994-3-git-send-email-dev@zheng.li> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XTpDF-00056G-Qw for xen-devel@lists.xenproject.org; Tue, 16 Sep 2014 09:38:17 +0000 In-Reply-To: <1410820760-7994-3-git-send-email-dev@zheng.li> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Zheng Li , xen-devel@lists.xenproject.org Cc: Dave Scott , Joe Jin , "Luis R. Rodriguez" , Luonengjun , Fanhenglong , Ian Jackson , "Liuqiming (John)" List-Id: xen-devel@lists.xenproject.org On 15/09/14 23:39, Zheng Li wrote: > To go beyond 1024 fds, we also need to raise the process limitation on max > open fds (usually defaults to 1024). > > We need to know the system level max open fds so that we won't go above that. > Simply setting the limit to RLIM_INFINITY doesn't work on Linux 3.x (EPERM), a > patch on this went into the 2.x branch but not 3.x for some reason. Also, > getting the system level nr_open is not very straightfoward on 3.x, which is > mentioned in the comment inline. >>From sysctl(2): "Since Linux 2.6.24, uses of [the sysctl] system call result in warnings in the kernel log. Remove it from your programs now; use the /proc/sys interface instead." So using /proc/sys is the correct method and not some awkward workaround. David