High Memory Consumption on Connect()

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

High Memory Consumption on Connect()

Post by martin » Wed 02 Feb 2011 12:00

When establishing the first connection to SQL Server, the client application shows a high peek of memory consumption leading to a decrease in size of over 200MB of the biggest free memory block, which means bad fragmentation of address space.

Can you please shed some light on this ? Are there any huge buffers created on fist connect/load of library ? Anything we can do to reduce this initial peek in memory usage and therefore memory fragmentation ?

Your help is greatly appreciated.
Martin

AndreyZ

Post by AndreyZ » Thu 03 Feb 2011 09:45

Hello,

I cannot reproduce the problem. I have tried to connect to SQL Server 2005 and 2008 and the connection attempt (SQLConnection.Open) took about 3Mb of memory. Please specify the following:
- the exact version of SQL Server;
- the exact version of DbxSda.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Tue 08 Feb 2011 13:27

Hello Andrey,

it's not the plain consumption, it's the memory fragmentation that takes place when loading the DLL or calling Connect() respectively. You can watch this by using SysInternals VMMAP tool and check for the biggest sized free block.

We are using Version 4.75.27 with SQL Server 2008 x64 and SQL Server Native Client 10.

AndreyZ

Post by AndreyZ » Wed 09 Feb 2011 15:27

I have tried to use the VMMAP tool. After connecting to the server the size of the biggest free block decreased on 10 MB.
DbxSda doesn't create any big buffers on connection establishment. The memory allocating is managed by Delphi memory manager and maybe it can cause memory fragmentation. We cannot influence its work.
If you want to know more about memory allocating, please consult Delphi developers.

Post Reply