Skip to main content

Background information:

The checker is named 'cobchecker32' or 'cobchecker64' in $COBDIR/bin, and can be seen in 'ps -ef' output while it is running.

The checker is the first phase of the COBOL compiler.  It translates COBOL source code into .int and .idy files.  Later, the second phase named the Native Code Generator translates .int into .gnt or .o or .so or executable code.

Problem:

In some cases, the checker began running very slowly, up to 20 times more slowly than usual.

Resolution:

The checker's job is to read COBOL source code as input, and write .int and .idy files as output, so it performs a lot of I/O.

One way of increasing performance is to make certain that the files the checker reads and writes, are hosted on file systems with high I/O performance.   A worst-case scenario would be if the COBOL sources were held on a remotely-mounted file system with relatively slow I/O performance, and if the output files .int and .idy were also on a file system with slow performance.  A best-case scenario would be if the input and output files were on file systems having high I/O performance, such as file systems on local solid-state drives or other high-speed drives.

The checker creates some scratch files on-the-fly during compilation, and deletes the scratch files after it is done.  It creates these files in the directory indicated by the TMPDIR environment variable, or if TMPDIR is not set, the system default temporary directory, which is usually /var/tmp, or P_tmpdir as defined in stdio.h, for example:

	$ grep P_tmpdir /usr/include/stdio.h

	#define P_tmpdir        "/var/tmp/"

If TMPDIR is set to a location on a slow file system, or if TMPDIR is not set and /var/tmp is located on a slow file system, the problem can be solved by setting TMPDIR to a location on a faster file system.  In more than one case, this was the solution Micro Focus customers used to successfully overcome this problem.

(original support incident 2858869)