Hi, following is my load cache method if I comments out following line of code, it does not slows down act(GetKeyValue(item), item);
public void LoadCache(Action<object, object> act, params object[] args) { using (DbConnection _connection = Create()) { using (DbCommand command = _connection.CreateCommand()) { MakeLoadCacheCommand(command, args); using (var reader = command.ExecuteReader()) { while (reader.Read()) { var item = new T(); Map(reader, item); //populate object * act(GetKeyValue(item), item); //insert into cache* } } } } } Looks like issue is when inserting data into cache. Thanks, Saif On Wed, Mar 15, 2017 at 7:02 PM, Pavel Tupitsyn <ptupit...@apache.org> wrote: > Hi, > > You have cache store configured, which probably causes the slowdown. > Please try to disable cache store (remove CacheStoreFactory from config) > and see if it makes any difference. > > On Wed, Mar 15, 2017 at 4:02 PM, Saifullah Zahid <saif.m...@gmail.com> > wrote: > >> Hi, >> >> I am facing an issue on cache loading, In the start cache loads quickly >> but after some time it becomes very slow almost 1 row per second. >> There are about 4 million rows in a table. >> OS = Windows Server 2012 >> RAM = 64 GB >> Node Heap config is 16 GB. >> Following is Cache configuration >> >> TransactionsDetailStore = m_cache.GetOrCreateCache<int, >> TransactionsDetail>(new CacheConfiguration("transactionssdetail", >> typeof(TransactionsDetail)) >> { >> CacheStoreFactory = new TransactionsDetailStoreFactory("ApplicationDB", >> true), >> ReadThrough = true, >> WriteThrough = true, >> WriteBehindEnabled = true, >> KeepBinaryInStore = false, >> WriteBehindFlushThreadCount = 4, >> WriteBehindFlushFrequency = new TimeSpan(0, 0, 2), >> MemoryMode = CacheMemoryMode.OffheapTiered, >> OffHeapMaxMemory = 0, >> EvictionPolicy = new LruEvictionPolicy { MaxSize = 1000000 }, >> WriteSynchronizationMode = CacheWriteSynchronizationMode.FullSync >> }); >> >> Am I missing some configuration? >> Kindly see if anyone have idea? >> >> Thanks, >> Saif >> > >