Multithreading Blocking Issue with Windows Service

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Multithreading Blocking Issue with Windows Service

Post by martin » Sun 05 Jan 2014 11:20

Hi devart team,

First happy new year to all of you.

We have a very strange behaviour with the dbexpsda component in one of our applications. Hopefully you can shed some light on the issue.

We are basically reading BLOBs from a SQL Server 2008 database with 24 threads simultanously. We don't do anything with the BLOBs, just read them one after the other in a 100% reproducable way.

When running it as a standalone app under Windows Server 2008 x64, it works just fine and we can only see maybe 15-20% blocking/context switches (the red bar in the windows task manager). Run time to read 15'000'000 BLOBs is around 50-60 minutes.

When we do the very same within a Windows Service, we encounter blocking/context switching of around 80-85%. Run time to read 15'000'000 BLOBs goes up to 5 hours so around 5 times slower.

It's beyond our understanding how the two different implementations (as an app and as a service) do have such a severe impact on the performance of the BLOB reading process ?

Your support is greatly appreciated.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Multithreading Blocking Issue with Windows Service

Post by Dimon » Thu 09 Jan 2014 13:45

This problem is not related to dbExpress. It seems that Windows apportions less processor time and a system memory for Services than for a standalone application. Try changing System Performance Options.

Post Reply