[Freeipa-devel] [PATCH 0091] Perform dirsrv tuning at platform level
Tomas Babej
tbabej at redhat.com
Thu Aug 22 15:23:03 UTC 2013
On 08/20/2013 06:40 PM, Nathaniel McCallum wrote:
> On Mon, 2013-08-19 at 14:48 +0200, Tomas Babej wrote:
>> Hi,
>>
>> When configuring the 389 Directory Server instance, we tune it
>> so that number of file descriptors available to the DS is increased
>> from the default 1024 to 8192.
>>
>> There are platform specific steps that need to be conducted
>> differently on systemd compatible platforms and sysV compatible
>> platforms.
>>
>> systemd: set LimitNOFILE to 8192 in /etc/sysconfig/dirsrv.systemd
>> sysV: set ulimit -n 8192 in /etc/sysconfig/dirsrv
>> set ulimit - nofile 8192 in /etc/security/limits.conf
>>
>> https://fedorahosted.org/freeipa/ticket/3823
> I'd prefer the use of 'with' in the RedHatDirectoryService:
> # check limits.conf
> need_limits = True
> with open("/etc/security/limits.conf") as f:
> for line in f:
> sline = line.strip()
> if not sline.startswith(DS_USER):
> continue
> if sline.find('nofile') == -1:
> continue
> # ok we already have an explicit entry for user/nofile
> need_limits = False
>
> ... and ...
>
> with open("/etc/sysconfig/dirsrv", "a+") as f:
> f.write('ulimit -n %s\n' % str(num))
>
> Nathaniel
>
Fixed and I did some additional refactoring in the code.
Attached.
--
Tomas Babej
Associate Software Engeneer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-tbabej-0091-2-Perform-dirsrv-tuning-at-platform-level.patch
Type: text/x-patch
Size: 10026 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130822/6880793c/attachment.bin>
More information about the Freeipa-devel
mailing list