Maybe some more information on this. Apparently the more concurrent threads
the worse it becomes. Therefore, I guess that there is some sort of lock (I
get why) that is maybe slowing down the load in the cache.

Here is my cache configuration:

                final CacheConfiguration<K, V> ccfg = new 
CacheConfiguration<>(cacheName);

                final CacheJdbcPojoStoreFactory<Object, Object> storeFactory = 
new
CacheJdbcPojoStoreFactory<>();
                storeFactory.setDataSourceFactory(new 
JndiFactory<>(datasourceJndiName));
                storeFactory.setDialect(new OracleDialect());

                if (parallelLoadCacheMinThreshold != null) {
                
storeFactory.setParallelLoadCacheMinimumThreshold(parallelLoadCacheMinThreshold);
                }
                if (maxPoolSize != null) {
                        storeFactory.setMaximumPoolSize(maxPoolSize);
                }

                ccfg.setCacheStoreFactory(storeFactory);
                ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
                ccfg.setAffinityMapper(new AffinityKeyMapper() {
                        private static final long serialVersionUID = 1L;

                        @Override
                        public void reset() {
                        }

                        @Override
                        public Object affinityKey(Object key) {
                                if (key instanceof CKey) {
                                        return ((CKey) key).getRowId();
                                } else if (key instanceof BinaryObject) {
                                        BinaryObject binaryKey = (BinaryObject) 
key;
                                        Object affKey = 
binaryKey.field("rowId");
                                        return affKey == null ? "" : affKey;
                                }
                                throw new IllegalStateException("Affinity 
function null for " + key);
                        }
                });
                ccfg.setAffinity(new FairAffinityFunction(false, nbPartitions) {
                        private static final long serialVersionUID = 1L;

                        /** {@inheritDoc} */
                    @Override public int partition(Object key) {
                        return key.hashCode() % getPartitions();
                    }

                });
                ccfg.setStartSize(5*1024*1024);



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/LoadCache-Performance-decreases-with-the-size-of-the-cache-tp9645p9647.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to