Open File Descriptor Limits and the AccuRev Server

The AccuRev Server is designed to handle multiple client commands concurrently: any number of requests that “read” data, along with one command that “writes” data. Accomplishing such concurrency typically requires that the AccuRev Server have many files open at the same time. Each operating system imposes limits on how many files can be open simultaneously. There may be an “open file descriptor” limit for each user process, or an overall limit for all user processes, or both. If the AccuRev Server hits the open file descriptor limit, additional client requests will be queued until file descriptors become available. (No client command is cancelled, and no data is lost. Hitting the open file descriptor limit just slows AccuRev Server performance.)

Checking the Number of File Descriptors

To check the number of file descriptors in use at any given time by the AccuRev Server:

  • (UNIX/Linux) Create a file (anyname.xml) containing the following line:

    <serverInfo/>

    Then run this AccuRev command:

    accurev xml -l anyname.xml
  • (Windows) Use Microsoft’s Handle utility on the AccuRev Server machine to monitor the open file handles:

    handle.exe -p accurev_server

    For details, see the Process Utilities documentation.

Back to top

Change the Per-Process Open File Descriptor Limit

Note: If you are performing a pre-purchase evaluation of AccuRev in an environment with a limited number of users and a limited amount of data, there is no need to make any changes. The default limits will be more than adequate.

The procedure for increasing a process’s maximum number of open files varies from operating system to operating system.

Regardless of operating system, be sure to remove file acserver.handle.limit, located in the AccuRev site_slice directory, before restarting the AccuRev Server or rebooting the operating system. This file caches the current value of the open-files limit.

Windows

The default limit is 2048 file descriptors and cannot be changed.

Linux

You can review and modify file descriptor limits at both the system and process level as described in the following procedures.

System-wide Limits

  1. Check the current system-wide limit by issuing:

    % cat /proc/sys/fs/file-max
  2. If you need to increase the system-wide limit (to 100000, for example), as root, issue:

    # /sbin/sysctl -w fs.file-max=100000

Per-Process Limits

  1. Check the per-process limit by issuing (in bash):

  2. % ulimit -n
  3. To increase the per-process limit (to 4096, for example) for the current shell and its
    sub-processes:

     % ulimit -n 4096
  4. To increase the per-process limit (to 4096, for example) permanently for user 'acserver':

    • Make sure the following line exists in /etc/pam.d/login:

       session required pam_limits.so

      Add the following lines to /etc/security/limits.conf:

       acserver soft nofile 4096
  5. Open a new shell and verify the limit before restarting the AccuRev Server:

    % ulimit -n
    % acserverctl stop
    % rm acserver.handle.limit
    % acserverctl start

Back to top