MFREDIR and Index call slowness

We are an Infor/Lawson customer working on an upgrade to their version 10 application suite. We are seeing significant delays in our batch job processing. When only one job is running with no users in our new environment we see process time 4 - 5 times longer than when they are run in version 9. We are running in a VM environment with the application and DB servers on separate servers running under Windows 2012 and SQL Server 2012 R2. After verifying and increasing resources on the servers we noted three things when the jobs are running.

1. There is a FINDBEGRNG being used against the indexes, The increased times are associated with this call. The programs have been recompiled, with no change in the timing.

2. While monitoring and capturing processing on the PID associated with the job there were messages indicating that that _ MFREDIR that the name not found or no such file. It attempted to locate the file multiple times with different file extensions - dll, gnt, int, 390, and lbr. The operation for Query Directory on path e:\MicroFocus\bin64\_MFREDIR(with each extension dll, gnt, int, and lbr) having a result of NO SUCH FILE with Detail: Filter:_MFREDIR(with each extension dll, gnt, int, and lbr). Same result and detail for QueryDirectory on E:\lsfprod\law\print\(User_ID). For QueryOpen Operation it appears to be looking for _MFREDIR in all of the directory structure - E:\MicroFocus\bin64, E:\MicroFocus\binn64, E:\MicroFocus\bin, C:\Windows\System32\, C:\Windows\System\, C:\Windows, E:\LUU, E:\cygwin64, E:\lsfprod\gen\bin, and under E:\Java, E:\PERL. All doing the QueryOpen looking for _MFREDIR.dll.

3. After the job starts running and starts to perform COBOL it appears to stop and resource utilization drops to virtually no activity, which might be when the FINDBEGRNG call on the index might me running or extremely slow.

We increased the ARRAYBUFSIZE to 100, added more memory did a defrag, recompiled all COBOL.

  • You can turn off the search for _MFREDIR by setting the run-time tunable no_mfredir=TRUE. _MFREDIR is only required if you are using Fileshare on a remote server. See the documentation here.

    FINDBEGRNG appears to be a Lawson API and not a Micro Focus one. I Googled this term and it came up with a couple hits on the Lawson site about performance concerns in this area that all appear to be database related and not really COBOL related.

    If you are using OpenESQL as your embedded SQL processor to access SQL Server and you believe that the performance problem is related to that then I would recommend that you open up a support incident with Customer Care so that we can take a closer look at the ODBC traces involved to determine where the bottleneck is.


  • Chris, thank you for the quick turnaround this morning. I am waiting for our engineers to get out of a meeting to implement the change. Do we have to create that cfg file or does it already exist in one of the folders under  Visual COBOL

  • There are two ways to set tunables on in a native project. You can either create a config file yourself and set the environment variable COBCONFIG to point to it or you can add an application.config file to your project and add it there.. If you choose to use the application.config file then there is a template for this. Right-click on your project name and select Add-New Item and then Application.config from the list,

    If you then click on this and go to the Run-time Configuration tab you can set the option under Program Loading-->no_mfredir to true. When you build the project it will create a file with the same name as the output file with an extension of mfgcf. If this is in the same folder as the .exe it will pick this up automatically.