The repository root directory and the administrative files should be owned by a user made specifically for CVS; typically, the user is named cvs . This reduces the damage a malicious or careless user can do to the repository, as long as they don't have root access.
To create a repository, create the repository root directory on the computer that will act as the CVS server and ensure that the root directory is owned by the user who will ultimately own the repository. Execute the command cvs -d repository_root_directory init, where repository_root_directory is the name of your directory, to set up that directory as a CVS repository. The root directory given must be an absolute path, not a relative path . Example 2-5 in Chapter 2 shows repository creation.
The cvs init command sets up the directory as a CVS repository by creating the CVSROOT subdirectory and the initial files for that directory, with their default configurations.
For any project, ensure there is enough room for three times the expected final size of the project. If you intend to store binary files, multiply their expected size by at least five. Monitor the repository's partition; your users may have a use pattern that requires more or less space than this.
For most projects, the amount of RAM on the repository server is not an issue. CVS is usually modest in its memory requirements, and a server with 32MB of RAM can handle most repositories. The two major areas of memory use are large checkouts and large diffs .
For each checkout request from a client, CVS spawns two processes. The smaller process uses a negligible amount of memory, but the larger consumes at least two megabytes and can grow to just over the size of the files in the directory being checked out. Fortunately, the larger process can use swap space rather than physical memory. Allow enough memory for several of these processes to run simultaneously , and base your calculations on the project directory that occupies the most disk space.
The diff process can also use swap space and runs at each commit. For efficient processing, allow enough swap space or physical memory to store ten times the size of the largest file you expect to commit. If memory is a problem, allow five times the size of the largest file. The diff process is fairly fast, so there is little need to allow for simultaneous processes.
The repository is user data, and it should be on a partition that is backed up and that won't shut down the machine if it is filled. Repositories are often stored in /var/lib/cvsroot .
Ensure that the repository is on a machine that everyone who will need to access the repository can reach. The repository can be local to a user, or it can be accessed remotely across a network. Remote access methods are explained in Chapter 8.