Re: 4096 file descriptors

2012-08-23 Thread k...@rice.edu
On Wed, Aug 22, 2012 at 02:43:09PM -0400, Ron Vachiyer wrote:
 Quick question about filedescriptors.  On Centos6, cyrus 2.3.16 seems to be 
 able to open 4096 FDs ;
 
 master[27121]: retrying with 4096 (current max)
 
 ulimit -a says 1024;
 
 open files  (-n) 1024
 
 I am looking to increase this, and have found some documentation saying to 
 increse file-max in /proc.  However, file-max already has a much larger 
 number;
 
 cat /proc/sys/fs/file-max
 1201105
 
 The only way I have found so far is to add a ulimit -n 8192 in 
 /etc/rc.d/init.d/cyrus-imapd
 
 
 Is there a more generic/cleaner way to do this?
 
 Thanks,
 
 Ron
 
 
Hi Ron,

I do not know if this is applicable to Centos6, but Redhat 6 shipped with this
file: 

/etc/security/limits.d/90-nproc.conf 
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*  softnproc 65535

except the limit was 1024. Argh! We bumped it here and we were good. Note,
do NOT remove the file or a patch/update will re-create it with the expected
negative consequences for a busy system.

Regards,
Ken

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


4096 file descriptors

2012-08-22 Thread Ron Vachiyer
Quick question about filedescriptors.  On Centos6, cyrus 2.3.16 seems to be 
able to open 4096 FDs ;

master[27121]: retrying with 4096 (current max)

ulimit -a says 1024;

open files  (-n) 1024

I am looking to increase this, and have found some documentation saying to 
increse file-max in /proc.  However, file-max already has a much larger number;

cat /proc/sys/fs/file-max
1201105

The only way I have found so far is to add a ulimit -n 8192 in 
/etc/rc.d/init.d/cyrus-imapd


Is there a more generic/cleaner way to do this?

Thanks,

Ron


  
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: 4096 file descriptors

2012-08-22 Thread Andrew Morgan
On Wed, 22 Aug 2012, Ron Vachiyer wrote:

 Quick question about filedescriptors.  On Centos6, cyrus 2.3.16 seems to 
 be able to open 4096 FDs ;

 master[27121]: retrying with 4096 (current max)

 ulimit -a says 1024;

 open files  (-n) 1024

 I am looking to increase this, and have found some documentation saying 
 to increse file-max in /proc.  However, file-max already has a much 
 larger number;

 cat /proc/sys/fs/file-max
 1201105

 The only way I have found so far is to add a ulimit -n 8192 in 
 /etc/rc.d/init.d/cyrus-imapd


 Is there a more generic/cleaner way to do this?

I've always done it in the cyrus init script:

# Crank up the limits
ulimit -n 209702
ulimit -u 4096
ulimit -c 102400


You may be able to set it in limits.conf (pam_limits), but I'm not sure if 
that applies when starting cyrus from the init script??

Andy

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: 4096 file descriptors

2012-08-22 Thread Adam Tauno Williams
On Wed, 2012-08-22 at 14:43 -0400, Ron Vachiyer wrote: 
 Quick question about filedescriptors.  On Centos6, cyrus 2.3.16 seems
 to be able to open 4096 FDs ;
 master[27121]: retrying with 4096 (current max)
 ulimit -a says 1024;
 open files  (-n) 1024
 I am looking to increase this, and have found some documentation
 saying to increse file-max in /proc.  However, file-max already has a
 much larger number;
 cat /proc/sys/fs/file-max
 1201105

Yep

 The only way I have found so far is to add a ulimit -n 8192
 in /etc/rc.d/init.d/cyrus-imapd

man pam_limits

 Is there a more generic/cleaner way to do this?

Yep, you can setup a limits.conf file that adjusts limits per user, per
group, etc... 


signature.asc
Description: This is a digitally signed message part

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: 4096 file descriptors

2012-08-22 Thread Bron Gondwana


On Wed, Aug 22, 2012, at 09:47 PM, Andrew Morgan wrote:
 On Wed, 22 Aug 2012, Ron Vachiyer wrote:
 
  Quick question about filedescriptors.  On Centos6, cyrus 2.3.16 seems to 
  be able to open 4096 FDs ;
 
  master[27121]: retrying with 4096 (current max)
 
  ulimit -a says 1024;
 
  open files  (-n) 1024
 
  I am looking to increase this, and have found some documentation saying 
  to increse file-max in /proc.  However, file-max already has a much 
  larger number;
 
  cat /proc/sys/fs/file-max
  1201105
 
  The only way I have found so far is to add a ulimit -n 8192 in 
  /etc/rc.d/init.d/cyrus-imapd
 
 
  Is there a more generic/cleaner way to do this?
 
 I've always done it in the cyrus init script:

Us too. We run 400+ instances, so init script is magic perl, and it does ulimit 
before launching master.

Bron.
-- 
  Bron Gondwana
  br...@fastmail.fm


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus