COBOL Server: Performance when accessing data files on network share

We have a program running on COBOL Server 3.0. We read from and write to data files. At some customer locations we install COBOL Server on several PCs. Data files will typically be located on one PC and shared using Windows 10 network file sharing. The other PCs running COBOL Server, on the same network, will access the data files on a mapped network drive.

Performance is usually acceptable, but at some locations response times increase drastically. A procedure that takes <2 secs on one setup may take >45 secs on another. I looked at the network traffic on one such troublesome location as I ran the procedure. The network traffic on the PC with the data file was at Send: 2Mbps , Receive: 1Mbps while the other PC was waiting for data (for about 50 secs). Running the same procedure on my own network, with the same data, there is hardly any network activity on the PC with the data files, and the procedure is done in about 1 second.

(This may of course be down to network and computer power but I just think the difference is so striking that it feels like there is something wrong with the setup.)

Is this a familiar scenario? Are there any well known do's and don'ts related to COBOL Server and Windows 10 file sharing?


  • Investigating this further, I notice that the long delays and high network traffic occur when COBOL Server programs are running on more than one of the PCs simultaneously.

    Example: Files are stored on PC1. These are shared on Windows 10. PC2 and PC3 maps the share, and programs access files over the share.

    As long as only PC2 runs the program performance is good. If program is started on PC3 also, long delays and high network traffic results, on both PCs. So programs somehow knows that files are being accessed by others and more interaction is needed?

    We have installations where data files are stored on a "file server", running Windows Server OS. We do not have the same performance issues there. Is it simply due to some difference in Windows 10 desktop and Windows Server OSs ?


  • It could be a question of Windows Server versus Windows 10. Server is tuned differently and has different default options for file sharing.

    It could also be because you have an instance of the application running locally on the Windows 10 system. The local copy will tend to win in contention for the files, impairing fairness.

    SMB, the Windows file-sharing protocol, is quite complex. SMB aspects that can affect performance include SMB version (1, 2, or 3; version 1 is insecure and should be disabled), opportunistic locking (oplocks), and other features. Microsoft and others offer extensive documentation on SMB performance analysis and tuning.

    The simplest test, though, would be to run the application with the files shared by Windows 10, but with no instance of the application on the Windows 10 system sharing the files.

  • I have done the test with PC2 and PC3 accessing files on PC1. There is no program running on PC1. I start program on PC2, and it works well with acceptable delays. Then I start on PC3. Now there are long delays on both PC2 and PC3. Network activity is high while program is working (unresponsive), mostly showing the process "System" as the owning process.

    So there seems to be a much greater need for data transfer because files are accessed by more than one client. It does sound like oplocks is something I should look into. But could the need for locking be different on a Window Server as opposed to Windows 10?

    Perhaps there is a guide somewhere showing how to set up SMB for best performance with COBOL Server and data files shared on the network?

  • The application's need for locking does not depend on the type of server. How locks are obtained and processed will depend on the type of server, and how that system is configured.

    This is a complex topic. I can only suggest you search online for documentation from Microsoft and third parties. There are many articles available. Reading about oplocks is a good place to start.

    The desktop editions of Windows, including Windows 10, are not tuned for file serving. Some have said they're deliberately tuned to penalize it, to improve the perceived advantage of Windows Server. In any case, there are many system parameters that need to be changed to make Windows 10 perform like Windows Server for file sharing.

    I'm not aware of any guide to tuning Windows file sharing for COBOL programs. I believe our recommendation would be to use Micro Focus Fileshare rather than Windows file sharing for COBOL data files.