3.  CVS Experience

3.1.  Statistics

      A quick summary of the scale that cvs is addressing today can be found in Table 1.

             +--------------------------------------+
             |Revision Control Statistics at Prisma |
             |           as of 11/11/89             |
             +------------------------+-------------+
             |      How Many...       |    Total    |
             +------------------------+-------------+
             |Files                   |     17243   |
             |Directories             |      1005   |
             |Lines of code           |   3927255   |
             |Removed files           |       131   |
             |Software developers     |        14   |
             |Software groups         |         6   |
             |Megabytes of source     |       128   |
             +------------------------+-------------+
Table 1.
cvs Statistics

Table 2 shows the history of files changed or added and the number of source lines affected by the change at Prisma. Only changes made to the kernel sources are included.
        +------------------------------------------------+
        |       Prisma Kernel Source File Changes        |
        |              By Month, 1988-1989               |
        +------++----------+---------++--------+---------+
        |Month ||# Changed | # Lines ||# Added | # Lines |
        |      ||  Files   | Changed || Files  |  Added  |
        +------++----------+---------++--------+---------+
        |Dec   ||    87    |   3619  ||   68   |   9266  |
        |Jan   ||    39    |   4324  ||    0   |      0  |
        |Feb   ||    73    |   1578  ||    5   |   3550  |
        |Mar   ||    99    |   5301  ||   18   |  11461  |
        |Apr   ||   112    |   7333  ||   11   |   5759  |
        |May   ||   138    |   5371  ||   17   |  13986  |
        |Jun   ||    65    |   2261  ||   27   |  12875  |
        |Jul   ||    34    |   2000  ||    1   |     58  |
        |Aug   ||    65    |   6378  ||    8   |   4724  |
        |Sep   ||   266    |  23410  ||  113   |  39965  |
        |Oct   ||    22    |    621  ||    1   |    155  |
        |Total ||  1000    |  62196  ||  269   | 101799  |
        +------++----------+---------++--------+---------+
Table 2.
cvs Usage History for the Kernel

The large number of source file changes made in September are the result of merging the SunOS 4.0.3 sources into the kernel. This merge process is described in section 3.3.

3.2.  Performance

      The performance of cvs is currently quite reasonable. Little effort has been expended on tuning cvs, although performance related decisions were made during the cvs design. For example, cvs parses the RCS ``,v'' files directly instead of running an RCS process. This includes following branches as well as integrating with the vendor source branches and the main trunk when checking out files based on a date.

      Checking out the entire kernel source tree (1223 files/59 directories) currently takes 16 wall clock minutes on a Sun-4/280. However, bringing the tree up-to-date with the current kernel sources, once it has been checked out, takes only 1.5 wall clock minutes. Updating the complete 128 MByte source tree under cvs control (17243 files/1005 directories) takes roughly 28 wall clock minutes and utilizes one-third of the machine. For now this is entirely acceptable; improvements on these numbers will possibly be made in the future.

3.3.  The SunOS 4.0.3 Merge

      The true test of the cvs vendor branch support came with the arrival of the SunOS 4.0.3 source upgrade tape. As described above, the checkin program was used to install the new sources and the resulting output file listed the files that had been locally modified, needing to be merged manually. For the kernel, there were 94 files in conflict. The cvs ``join'' command was used on each of the 94 conflicting files, and the remaining conflicts were resolved.

      The ``join'' command performs an rcsmerge operation. This in turn uses /usr/lib/diff3 to produce a three-way diff file. As it happens, the diff3 program has a hard-coded limit of 200 source-file changes maximum. This proved to be too small for a few of the kernel files that needed merging by hand, due to the large number of local changes that Prisma had made. The diff3 problem was solved by increasing the hard-coded limit by an order of magnitude.

      The SunOS 4.0.3 kernel source upgrade distribution contained 346 files, 233 of which were modifications to previously released files, and 113 of which were newly added files. checkin added the 113 new files to the source repository without intervention. Of the 233 modified files, 139 dropped in cleanly by checkin, since Prisma had not made any local changes to them, and 94 required manual merging due to local modifications. The 233 modified files consisted of 20,766 lines of differences. It took one developer two days to manually merge the 94 files using the ``join'' command and resolving conflicts manually. An additional day was required for kernel debugging. The entire process of merging over 20,000 lines of differences was completed in less than a week. This one time-savings alone was justification enough for the cvs development effort; we expect to gain even more when tracking future SunOS releases.