views:

801

answers:

1

Currently we have MS SQL Server 2005 (32 bit). We have 1 assembly (and only 1 assembly) which we use for encryption and decryption. Only 512 MB of system memory is allocated to CLR. The assembly runs pretty slow, and I'm trying to rule out if its from memory or not. When I run the SQL code in query analyzer (not in an assembly) it runs quick. We are using symmetric keys and certificates for encryption / decryption.

Is there a recommended amound of memory to allocate to CLR? How can I tell if a lack of memory allocation is slowing down the performance of this assembly?

+1  A: 

Hi,

How have you determined that 512MB has been assigned?

Take a look at the article I wrote on SQL Server memToLeave. You need to keep in mind that the portion of memory that is used to execute CLR managed code resides outside of the SQL Server Process space.

Let me know how you get on or if you have any further queries.

http://www.johnsansom.com/index.php/2009/03/sql-server-memory-configuration-determining-memtoleave-settings/

John Sansom
Hi John, My boss told me he assigned 512 to memToLeave after I was having errors calling the assembly. I believe all memory was allocated to SQL Server prior to that. Thanks for the link. I'm going to try to further optimize my assembly and monitor cpu usage.
Chris Klepeis
You're welcome. Feel free to drop me a line if you need any further assistance.
John Sansom