Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

Connection Reset and CPU load (no replies)

$
0
0
I'm using .Net connector 6.9.9 on Windows Server 2008 R2. MySQL 5.7.14 x64
If I set in connection string ConnectionReset=true; than on high concurrent access I see high CPU load by WMIPrvSrv process.
I've found in sources MysqlDefs.cs this line
var searcher = new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
I've comment all code in OSDetails property and no more CPU load by WMIPrvSrv.

1. Why detect OS name on each connection - OS will never changed while soft with connector runned. Am I right? Maybe move this code to some place where it can be runned just once for first start?

2. Can MySQL team fix this problem in next Connector release? For me this behaviour very important. My middleware with connector on the same server as MySQL and on high concurrent access server has 100% CPU and performance so bad


For sample you can make test client like this


Parallel.For(0, 50000, (i) =>
{
using (
var objCon =
new MySqlConnection(
"server=localhost;port=3306;user=root;password=root;database=kdm;Character Set=utf8;Pooling=true;Allow user variables=true;ConnectionReset=true;")
)
{
try
{
objCon.Open();

}
catch (Exception ex)
{
Console.WriteLine("Error " + ex.Message);
}
}
});

On Core i7 Windows 10 this code load WMI provider host on 50% CPU


Thanks.

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>