.NET 8 performance issue with IBMMQDotnetClient (v9.3 & v9.4) #109729
Labels
area-System.Threading
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
tenet-performance
Performance related issue
Milestone
### Description
Application logic:
We have a simple application that picks up the messages from Azure Service bus and commits the messages to IBM WebSphere MQ (IBMMQDotnetClient v9.3 & v9.4).
The code has been running successfully in our production environment for more than a year without any issues. We recently upgraded the target framework to .NET 8 and have seen a significant slowness which in turn made us to roll back the solution to use .NET 6.
When the below code is accessed in parallel (through 100 individual threads say using a function app with ASB trigger) or use a simple ‘Parallel.For’ threads in a console app, we are able to replicate the problem. We did open case with Microsoft and IBM team who did point out the fact that this is more for the .NET product group.
Sample code :
{
static void Main(string[] args)
{
static string qm = "***"; static string channel = "***";
static string host = "***"; static int port = ***; static string sslCipherSpec = "*** ";
MQQueueManager qMgr = createQMObject();
for (int i = 1; i <= 10; i++)
{
var watch = System.Diagnostics.Stopwatch.StartNew();
// Conenct to Queue , establish SSL connection
MQQueue mqQueue = qMgr.AccessQueue(queue, MQC.MQOO_OUTPUT);
watch.Stop();
Console.WriteLine("Time taken to access Queue:" + watch.ElapsedMilliseconds + " ms");
}
Parallel.For(0, 20, i =>
{
var watch = System.Diagnostics.Stopwatch.StartNew();
MQQueue mqQueue = qMgr.AccessQueue(queue, MQC.MQOO_OUTPUT);
watch.Stop();
Console.WriteLine("Time taken to access Queue:" + watch.ElapsedMilliseconds + " ms");
}
}
public static MQQueueManager createQMObject()
{
Hashtable connectionProp = new Hashtable()
{{MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED},{MQC.HOST_NAME_PROPERTY, host },
{MQC.CHANNEL_PROPERTY, channel},{MQC.PORT_PROPERTY, port },{MQC.SSL_CIPHER_SPEC_PROPERTY, sslCipherSpec }};
return new MQQueueManager(qm, connectionProp);
}
}
### Configuration
(If you are posting Benchmark.NET results, this info will be included.)
* Which version of .NET is the code running on?
The working version is .NET 6 and if the code is run against .NET 8, it wont work
* What OS version, and what distro if applicable?
Windows platform
* What is the architecture (x64, x86, ARM, ARM64)?
X64
### Regression?
* .NET 6 with IBMMQDotnetClient v9.3 works perfectly fine
* .NET 8 with IBMMQDotnetClient v9.3 or v9.4 doesn’t give the expected performance results. It doesn’t even process like 20 messages in parallel quickly
### Data
.NET 8 vs .NET 6 performance comparison for the above sample code
### Analysis
The text was updated successfully, but these errors were encountered: