[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/2] tools/xenstore: set open file descriptor limit for xenstored
- To: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 27 Sep 2021 15:54:19 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZX0XlsrV/FGLqaNk70WhvfCFkjIFRFOBT9SCDpFUg/w=; b=DqUCXkvDAPjrYINi9z+SPlhAa2pOix9NvBwlRz5Gp34gzf6Ongveshk3b4jW9YhnPDOi+5MXjjYSeF0QuKIhd2/fPpT+SFSqgHsTpkv6onNZuYEOXcEynSXttvPUChqCqClmKvM2Ksiv97PvfBp4oAY05oZ3Qf3ulsW8Ud+gZ3sVSalBQUw/xVU4X3/X5/ZHWXuxv1A2SabLw2vkqrbRvf5EgXHaoC5O/lRciTwAOP+K2c5Irdij5BMYXcrZJJw1YCk7n0JUcoY5RW2EJFruTPGFCmS4NrfdmTBSkOb4VVUTv3hxaVXIvOg5ccBmV3qXb1p3aZZnDr7bGXUrVBaPKw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OcjW7GQmw2lWoyWZsYWNXWMYzxprJ5513cH93mkD8TLqJ23yI9q6Od9dgxjdQh0SE7iCg4jTMcPArIFtm4mg9CGmGXOWumZEiPr5ILhhYoMHvh0BwKNQbfgu8P9pNh6Tbz10KBDWiHr0TyystNvrFj5ggnvvHJhger2Ttu+yEnAYsYyXqiynjfNXqMalzCFa2bPYy0UwvH89MHsFYzug1GCDZmy97uFzXX7/Zk1mazKWNjvu20DmggtbEy3/t7/D5FY8W3Sk5ux25F9io6QDkmwogh77wZKr5TderfG72Y9oZbTp44DPHI5eqsAXOibzEnZCPtb7DGQK+wJwww0qQQ==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 27 Sep 2021 14:54:52 +0000
- Ironport-data: A9a23:DokkfKA5qw1/ahVW/9jkw5YqxClBgxIJ4kV8jS/XYbTApD1x1z1Uz DcYWTqDO/bbYGakf9p+Po3k9UxVvJ6Bn9ZnQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMo/u1Si6FatANl1ElvU2zbue6WLOs1hxZH1c+EX9w0007wobVv6Yz6TSHK1LV0 T/Ni5W31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eH/5UhN7oNJLnZEpfNatI88thW5 Qr05OrREmvxp3/BAz4++1rxWhVirrX6ZWBihpfKMkQLb9crSiEai84G2PQghUh/jmmyxuhO+ NJ2kaOvRS0NEbDLns0SakwNe81+FfUuFL7vJHG+tYqYzlHccmuqyPJrZK00FdRGoKAtWzgIr KFGbmBWBvyAr7veLLaTY+9gnMk8auLsO5sSoCpIxjDFF/c2B5vERs0m4PcFgG5r3JwRTZ4yY eIbawBhaEjDcyF3I10RN60Cxdz0mVjWJmgwRFW9+vNsvjm7IBZK+KjgNp/Zd8KHQe1Rn12Ev STW8mLhGBYYOdeDjz2f/RqEhODVmjjgcJkPD7D+/flv6HWMwkQDBRtQUkG0ydG4lUyWS99ZM 1YT+Cclse417kPDczXmd0Tm+jje5EdaAocOVb1hgO2Q9kbKywPFPTE8cQ5GU/gZq8McYRM30 VmgkOq8UFSDr4apYX6a876Vqxa7Ni4UMXIOaEc4cOcV3zXwiNtt102eF76PBIbw3oWsRm2gq 9yfhHJm74j/m/LnwElSE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juyOsKijTQ8NBhYh5gXLpTS06ITiGxzd+hsFSTtAzZor7G CAymXCl+qemsD+7iWZ+37Y7pxQltek4txfBPaUgsxQDjn3kA6naKloRrXHljEop+OE7kosjb D30lsdFvU2z0mUUnC+oBPr1QWl+DEy60X6wVvdunfnqdyRfkNzN+NxwaZiNjfJ4Uspu99xlI hR2XiCipZRBRTc2Azg+tnhTXhR5wqJiEtntdRWo21UUIMYZrMUh5cY5llpHJAJGz+/wJw7Ed NpENrX6J9tABKnhkjizytSKeGXLzEO9k/seDlHhiXV6UkZoJlB9Tpa+CRF9U1ws67USPF/lq 352+pT5fdzp/QtHNdA7dE6ML2K41z2MGDx2V2pUCDa/YE8SjnwQs3Mkf8IDN/DQu1+8HJ1ou WZbG9l
- Ironport-sdr: j+2IFII3AUg0+7XFUt3deMqiV/LQMela43cwiMsBFKrCM95seulRsjzgIfyeWBJj22QhiI4lK/ 5BOQMXWWcPBAW2ZMr1/VgMf9HkSYdeBNy1nGhwglg1c+bH6KqRSCupJgbo3R2zLOAAYPLr46ea eRtxF/fZfjODLkz7PicYY9a4hA+QTKlehxEOYz/QHLmO4pWUaaXSjFexVRocnyFN5BDJUuf01/ vGHvq5YL850e4ec61XI3BCXUCGuYVJeyHaGn+MD6rals4/M6WzlINEYR5zNTt+3971y89WIDeD ZdEd2YsSJlAdf3v0Ee4zraKL
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 27/09/2021 15:52, Juergen Gross wrote:
> On 27.09.21 16:40, Andrew Cooper wrote:
>> On 27/09/2021 15:24, Juergen Gross wrote:
>>> On 27.09.21 16:13, Andrew Cooper wrote:
>>>> On 27/09/2021 11:48, Juergen Gross wrote:
>>>>> Add a configuration item for the maximum number of open file
>>>>> descriptors xenstored should be allowed to have.
>>>>>
>>>>> The default should be "unlimited" in order not to restrict xenstored
>>>>> in the number of domains it can support, but unfortunately the
>>>>> prlimit
>>>>> command requires specification of a real value for the number of
>>>>> files,
>>>>> so use 262144 as the default value.
>>>>
>>>> Citation needed.
>>>>
>>>> prlimit -nunlimited
>>>>
>>>> prlimit --nofile=unlimited
>>>>
>>>> both work fine, and strace confirms they issue correct system calls.
>>>
>>> Not on my test system:
>>>
>>> # prlimit --pid 734 --nofile=unlimited
>>> prlimit: failed to set the NOFILE resource limit: Operation not
>>> permitted
>>> # prlimit --pid 734 --nofile=262144
>>> #
>>
>> What does strace say in both of these cases?
>
> prlimit64(734, RLIMIT_NOFILE, {rlim_cur=RLIM64_INFINITY,
> rlim_max=RLIM64_INFINITY}, NULL) = -1 EPERM (Operation not permitted)
> write(2, "prlimit: ", 9prlimit: ) = 9
>
> vs.
>
> prlimit64(734, RLIMIT_NOFILE, {rlim_cur=256*1024, rlim_max=256*1024},
> NULL) = 0
>
>>
>>>
>>>> Support for "unlimited" as a parameter has existed for the entire
>>>> lifetime of the utility,
>>>> https://github.com/karelzak/util-linux/commit/6bac2825af7216c5471148e219dbcf62ec5ede84
>>>>
>>>>
>>>
>>> Yes, but not all systems seem to support raising the limit to
>>> "unlimited".
>>
>> That's as maybe, but
>>
>> prlimit64(0, RLIMIT_NOFILE, {rlim_cur=RLIM64_INFINITY,
>> rlim_max=RLIM64_INFINITY}, NULL) = -1 EPERM (Operation not permitted)
>>
>> is a Linux issue, not a prlimit bug.
>
> Nevertheless it isn't a good idea to use this setting in case it isn't
> supported in all Linux distros/versions we care about.
Ok, but at a minimum you need s/prlimit/Linux/ in the commit message.
~Andrew
|