This project has moved and is read-only. For the latest updates, please go here.

Improve Performance Of NMemory

Oct 24, 2012 at 2:25 PM

I read the source codes of NMemory these day, and I also compare it to SQL Server.

I will add memory management to NMemory to improve the performance of it:

1. Add query plan cache management

2. Add data cache management to manage data in the .NET managed heap.

Oct 26, 2012 at 1:19 PM
Edited Oct 26, 2012 at 1:36 PM

 First of all, I would like to thank you for your efforts to contribute! Could you please write with a bit more details about your features and how do you plan to implement them?

Query plan caching seems quite obvious for me. Do you want to store the IQueryPlan objects in a cache collection whose elements are identified by the expression that represent the queries? By adding this cache layer the heavy compilation step (expression rewriters, expression compilation) can be skipped.

I am not sure what you exactly mean about data cache management, so I would hear some more info about it, if you didn't mind.

Oct 27, 2012 at 2:20 AM

Hi tamasflamich,

1. As to Query Plan Caching. You are right. I will give you a detail plan later.

2. Data Cache Management. As you know, NMemory is base on .NET. That's mean, the data is in the managed heap. So objects on the heap must be allot properly. I got this idea from two points:

   a.There are two heap in the .NET, the first is small object heap, The other is large object heap. If the size of the object is less than 85K, then the object allot on small object heap. The small heap can be compress after GC, instead the large heap. so the large heap caused memory fregement. If NMemory does not deal with this situation, the performance will go down.

  b. I compare the method of the memory managent in SQL Server. It is a good method to do it in the NMemory to improve the usage of the memory.



Dec 19, 2012 at 12:41 AM

Hey agilesharp,

Might I ask about your development progress?