Bug 15778 - High CPU usage when using Npgsql on Mono 64bit
Summary: High CPU usage when using Npgsql on Mono 64bit
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 3.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-10-29 08:16 UTC by Mikkel Kruse Johnsen
Modified: 2013-11-02 12:15 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Test sample produce 100% CPU usage. (460 bytes, text/x-csharp)
2013-10-29 08:16 UTC, Mikkel Kruse Johnsen

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mikkel Kruse Johnsen 2013-10-29 08:16:47 UTC
Created attachment 5261 [details]
Test sample produce 100% CPU usage.

When using Npgsql on Mac OS X (Maverick and less) and Mono 3.2.3 (and other) 64bit version, I see very high CPU load.

When using the provided Mono 32bit, there is no problem.

The 64bit version is compiled using Fedora DarwinX cross compiling.

Could someone confirm the high CPU usage on 64bit on Mac ?
Comment 1 Mikkel Kruse Johnsen 2013-10-30 05:49:19 UTC
The Npgsql version is 2.0.13 (and also testet with

Also testet with the Npgsql provided with Mono.

All is same result. High CPU usage on 64bit.
Comment 2 Zoltan Varga 2013-10-30 08:08:46 UTC
That might be caused by cross compilation. Mono doesn't work very well in many cross compilation scenarios, since it was never tested.
Comment 3 Mikkel Kruse Johnsen 2013-10-30 15:15:58 UTC
Can you confirm the CPU usage, with a 64bit version of mono on mac ?
Comment 4 Zoltan Varga 2013-10-30 15:22:53 UTC
I don't have a db to test.
Comment 5 Mikkel Kruse Johnsen 2013-10-30 15:38:36 UTC
You can connect to:

User: demo_xcare
Pwd: demo_xcare
DB: demo_xcare_1.2.5
Comment 6 Zoltan Varga 2013-10-30 16:10:30 UTC
It doesn't cause high cpu usage.
Comment 7 Mikkel Kruse Johnsen 2013-11-02 11:21:35 UTC
Yes, I can confirm myself that the high CPU usage is not happening with mono 3.2.3 build for 64bit on Mac (Maverick).

There must be a problem with the DarwinX toolchain.

Well it should be changed to LLVM anyway.
Comment 8 Zoltan Varga 2013-11-02 12:15:21 UTC