System configuration

There are some system configuration parameters that can be changed to give better performance. This section goes over the items that affect performance and explains how to tune them.

File Descriptors

The streaming components use one file descriptor for each active client connection. Hence, the limit on the number of file descriptors per process also limits the number of client connections per process.

A system has a global limit on the number of open file descriptors, which is defined in the kernel and global system configuration. Systems also typically have per-process limits which can be different for users or groups of users. There is both a soft and hard limit. The hard limit specifies the upper limit a process can raise its soft limit to. The current limit for your process can be inspected using ulimit -n in bash(1).

Typically, systems are limited to 1024 open file descriptors for each non-root process. Depending on the system you run on, this limit can be changed in various ways.

Red Hat/Fedora

On Red Hat systems, this limit can be changed:

  1. Edit /etc/security/limits.conf as root. At the end of the file, add a line that reads

    fluendo    -    nofile    10000
    

    Replace fluendo with the username (or group name, prefixed with @) that the server will run under. Replace 10000 with the maximum number of open file descriptors you want to allow.

  2. Verify that this works by doing the following as root:

    su - fluendo
    ulimit -n
    

    Which will show the number of allowed open file descriptors:

    8192
    

  3. Due to the way PAM [4] and sshd are set up by default, you will not be able to log in to this account anymore using ssh.

    Edit /etc/pam.d/sshd as root. Make sure this file contains a line that reads

    session    required     pam_limits.so
    

  4. Edit /etc/ssh/sshd_config as root. Turn off privilege separation by adding the following line

    UsePrivilegeSeparation no
    

  5. Restart the ssh daemon:

    [root@server root]# service sshd restart
    Stopping sshd:                                             [  OK  ]
    Starting sshd:                                             [  OK  ]
    [root@server root]#
    

  6. Verify that it works by trying to log in through ssh as the user:

    [fluendo@server fluendo]$ ssh localhost
    fluendo@localhost's password:
    [fluendo@server fluendo]$ ulimit -n
    8192
    



[4] Pluggable Authentication Modules. See pam-home