Very High CPU Usages

Apr 21, 2011 at 3:17 PM

I’m trying to implement distributed shared cache and trying following test case and after shared cache service reaches 150MB memory it uses CUP 85-90%. 

Changing CacheAmountOfObjects="-1" resolves this issue but I throws outofmemoey exception when I increase Count/size and run for some time.
Please let me know what’s wrong with setup and what will be best setup to deploy in production? 

My server settings:
   <serverSetting 
			ServiceCacheIpAddress="127.0.0.1" 
			ServiceCacheIpPort="48888" 
			SharedCacheVersionNumber="3.0.5.1" 
			LoggingEnable="0" 
			ServiceFamilyMode="1" 
			CacheAmountOfObjects="100" 
			CacheAmountFillFactorInPercentage="90" 
			ServiceCacheCleanup="LRU" 
			ServiceCacheCleanupThreadJob="3600000"
			TcpServerMaxThreadToSet="-1" 
			TcpServerMinThreadToSet="-1"
			SocketPoolMinAvailableSize="5"
			SocketPoolValidationInterval="00:02:00"
			SocketPoolTimeout="00:02:00"
			/>
Sample Code to reproduce this:
   int count = 50000; // Number of Objects
    int size = 16384; // Object Size
    byte[] byteArray;
    for (int j = 0; j <= count; j++)
    {
        byteArray = new byte[size];
        for (int i = 0; i < size; i++)
        {
            int bb = random.Next(65, 97);
            byteArray[i] = Convert.ToByte(bb);
            }
        Common.Util.CacheAdd(Guid.NewGuid().ToString(), Encoding.ASCII.GetString(byteArray));
    }

Jul 5, 2011 at 7:21 AM

Hello, did you fix the problem?