[Twisted-Python] 100% CPU on high opened descriptors

Juan Antonio Ibañez Santorum juanito1982 at gmail.com
Mon May 9 08:48:50 EDT 2011


+1

Perfect explanation. Thank you very much!

2011/5/8 Reza Lotun <rlotun at gmail.com>

> Hi Juan,
>
> 2011/5/8 Juan Antonio Ibañez Santorum <juanito1982 at gmail.com>
>
>> MUST I apply that change or may be I SHOULD do it? Why is it necessary?
>
>
> Each network connection on your system is represented by a 'file
> descriptor', in Unix terminology. By default, there is a limit on the number
> of open file descriptors that can be opened at once, which is a little
> different for every system (usually its 1024 or 4096), even though the
> system is actually capable of opening more network connections.
>
> This limit is set in two places - systemwide and per-user. To run a network
> server you have to increase the limits both in the kernel and for the user
> the network process is running as. The 'sysctl' steps I previously mentioned
> increases the limits for the kernel, and the 'ulimit' steps for the user. In
> the example I gave, this limit was increased to 999999 which is extremely
> high, and should be suitable for almost all production server deployments.
>
> sysctl limits can be set permanently by editing /etc/sysctl.conf with new
> kernel settings and then running 'sysctl -p'. ulimits can be changed at
> runtime - the 'nofile' setting can be set by 'ulimit -n', or permanently by
> editing /etc/security/limits.conf and rebooting/opening a new login shell.
>
> Hope that clears it up.
>
> Reza
> --
> Reza Lotun
> mobile: +44 (0)7521 310 763
> email:  rlotun at gmail.com
> work:   reza at tweetdeck.com
> twitter: @rlotun
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110509/a007d62b/attachment-0001.htm 


More information about the Twisted-Python mailing list