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
    

Device permissions needed by Flumotion

In general we recommend running Flumotion as a separate user, that is how our own binary packages of Flumotion installs it. One thing neccesary for successfully running Flumotion is that the user running the Flumotion processes has permissions needed to access the system devices for sound and video capture. Some distributions solve this by having special groups having ownership of these devices and any user which is a member of these groups gets access to the devices. If you get the official Ubuntu or Linux Mandrake packages for intance they will make sure Flumotion is run with a user which is a member of these groups. However, not all distributions have such groups, which makes running Flumotion a little more difficult. The biggest distribution not having a media, sound or video group policy is Red Hat (including Fedora).

This explanation will explain how Fedora works and suggest how to fix it for Fedora. The devices which you need to adjust permissions on are /dev/snd* and /dev/mixer* for OSS, /dev/video* for video devices and /dev/snd/* for ALSA. Under Fedora since it uses udev these changes will only last until you log out/log in with a new user as Fedora only gives the current user on the system access to these devices by default. This also means that the changes will also not remain if you reboot.

A solution for this is to create your own 'media' group and change the security setup for your distribution to use that group. There are several places you need to change for this to work.

You could modify /etc/udev/permissions.d/50-udev.permissions and put your changes in /etc/udev/permissions.d/10-flumotion.permissions, which will then override the 50-udev.permissions.

You will also have to look in /etc/security/console.perms to see what pam_console changes on login/logout.

Troubleshooting

One common problem many people encounter is when trying to access their firewire cameras. The problem is that Flumotion is not able to detect your firewire device because the device creation for firewire do not work on many current distributions. Check if you have a /dev/raw1394 device, if not create it by using this command:

[root@server root]# mknod -m 666 /dev/raw1394 c 171 0



[4] Pluggable Authentication Modules. See pam-home