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?
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.
SQL Server Memory Configuration, Determining MemToLeave Settings