Hello Dmitry!

The performance drop that you describe is too severe to answer outright,
but I will outline a few settings that should make some difference.

See below in your examples. The main suggestion is walMode setting.

Note that Ignite is a distributed system, so its performance doesn't
compare directly with single-server DB like PostgreSQL.

2017-10-04 14:32 GMT+03:00 Dmitry Pryakhin <[email protected]>:

<?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd";>
>
>     <bean id="grid.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>           <property name="persistentStoreConfiguration">

        <bean
class="org.apache.ignite.configuration.PersistentStoreConfiguration">
           <!-- In LOG_ONLY mode, as long as operating system on the node
is functioning correctly and there's no power failure, the data is
guaranteed to be in persistent store after put.
                 In BACKGROUND mode, Ignite instance on node has to
continue running (or be stopped correctly) to guarantee that the data is in
persistent store.
                 In default mode, fsync() is done after every operation on
cache, which is most reliable but makes no sense for bulk data loading. -->
           <property name="walMode" value="BACKGROUND"/>
        </bean>
       </property>

        <property name="memoryConfiguration">
            <bean
class="org.apache.ignite.configuration.MemoryConfiguration">
                <!-- Set the size of default memory region to 4GB. -->
                <property name="defaultMemoryPolicySize" value="#{4L * 1024
* 1024 * 1024}"/>
                <!-- Setting the page size to 4 KB -->
                <property name="pageSize" value="#{4 * 1024}"/>
            </bean>
        </property>

          <property name="cacheConfiguration">
>                 <bean class="org.apache.ignite.configuration.
> CacheConfiguration">
>                         <property name="name" value="CacheOne"/>
>                 </bean>
>           </property>
>     </bean>
> </beans>
>
>
> Client code:
>
>                                 cache.put(String.valueOf(i),
> bf.toString());
>
Consider also batching this operation by calling putAll() on a big chunk of
data (for example, only doing putAll on collected entries every 1000
iterations).


-- 
Ilya Kasnacheev

Reply via email to