RE: Performance degradation in embed mode

2018-08-16 Thread Kvon, Dmitriy
Hello!

It’s incredible!
Thank you for help!

Dmitriy


From: Ilya Kasnacheev [mailto:ilya.kasnach...@gmail.com]
Sent: Tuesday, August 14, 2018 6:02 PM
To: user@ignite.apache.org
Subject: Re: Performance degradation in embed mode

Hello!

It looks like you have debug enabled when running inside Apache Tomcat.

Turning DEBUG on will make Ignite spend a lot of time and RAM building debug 
messages. Please make sure to turn DEBUG off, at least for org.apache.ignite 
packages.

Regards,


--
Ilya Kasnacheev

2018-08-14 11:45 GMT+03:00 Dmitriy 
mailto:dmitriy.k...@nexign-systems.com>>:
Hello Ilya,

Thank you for the replay.
So, I did ran the test after context initialization, but  the problem is
persists.

dump during test execution
<http://apache-ignite-users.70518.x6.nabble.com/file/t1980/threaddump_during.txt>

dump after running the test
<http://apache-ignite-users.70518.x6.nabble.com/file/t1980/threaddump_after.txt>

wbr,

Dmitriy




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



Re: Performance degradation in embed mode

2018-08-14 Thread Ilya Kasnacheev
Hello!

It looks like you have debug enabled when running inside Apache Tomcat.

Turning DEBUG on will make Ignite spend a lot of time and RAM building
debug messages. Please make sure to turn DEBUG off, at least for
org.apache.ignite packages.

Regards,


-- 
Ilya Kasnacheev

2018-08-14 11:45 GMT+03:00 Dmitriy :

> Hello Ilya,
>
> Thank you for the replay.
> So, I did ran the test after context initialization, but  the problem is
> persists.
>
> dump during test execution
>  t1980/threaddump_during.txt>
>
> dump after running the test
>  t1980/threaddump_after.txt>
>
> wbr,
>
> Dmitriy
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Performance degradation in embed mode

2018-08-14 Thread Dmitriy
Hello Ilya,

Thank you for the replay.
So, I did ran the test after context initialization, but  the problem is
persists.

dump during test execution

  

dump after running the test

  

wbr,

Dmitriy




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Performance degradation in embed mode

2018-08-13 Thread Ilya Kasnacheev
Hello!

In your thread dump I observe that context creation is still underway
(org.apache.catalina.mbeans.MBeanFactory.createStandardContext)

No load is passed to Apache Ignite yet.

Regards,

-- 
Ilya Kasnacheev

2018-08-11 12:09 GMT+03:00 Dmitriy :

> Hello Igniters,
>
> I'm using an spring web application with the embed Ignite cache.
> When we run in unit-tests, the insertion time into the cache is about 10
> 000
> values/seconds.
> But when the application is running on the Apache Tomcat server, the insert
> is very slow (about 5 minutes).
> The application runs on one node.
> CPU usage: 15-20%.
> threaddump.txt
> 
>
>
> So do you have any idea what the problem could be?
>
>   @PostConstruct
>   public void putAllCache() {
> Map map = new HashMap<>();
> for (long l = 0; l < 10_000L; l++) {
>   map.put(
> new CacheId(new Random().nextLong(), new Random().nextLong()),
> new DataUnit(new Random().nextLong(), new Random().nextLong(), new
> Random().nextLong())
>   );
> }
>
>
> IgniteConfiguration configuration = new IgniteConfiguration();
> String regionName = "MyRegion";
> DataRegionConfiguration dataRegionConfiguration = new
> DataRegionConfiguration();
> dataRegionConfiguration.setName(regionName);
> dataRegionConfiguration.setMaxSize(DataUnits.MEGABYTE.getBytes(1024));
> dataRegionConfiguration.setPersistenceEnabled(false);
> DataStorageConfiguration dataStorageConfiguration = new
> DataStorageConfiguration();
> dataStorageConfiguration.setDataRegionConfigurations(
>   new DataRegionConfiguration[] {dataRegionConfiguration}
> );
> configuration.setDataStorageConfiguration(dataStorageConfiguration);
>
> Ignite ignite = Ignition.getOrStart(configuration);
> String cacheName = "MyCache";
> CacheConfiguration cacheConfiguration = new
> CacheConfiguration();
> cacheConfiguration.setName(cacheName);
> cacheConfiguration.setIndexedTypes(CacheId.class, DataUnit.class);
> cacheConfiguration.setDataRegionName(regionName);
> cacheConfiguration.setBackups(1);
> cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
> cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
>
> IgniteCache cache =
> ignite.getOrCreateCache(cacheConfiguration);
>
> LOGGER.info("Start putAll.");
> cache.putAll(map);
> LOGGER.info("End putAll.");
>   }
>
> 11:28:23.456 [RMI TCP Connection(2)-127.0.0.1] TX[] INFO
> c.p.o.b.d.a.s.t.i.i.PutAllTest - Start putAll.
> 11:33:23.881 [RMI TCP Connection(2)-127.0.0.1] TX[] INFO
> c.p.o.b.d.a.s.t.i.i.PutAllTest - End putAll.
>
>
> Dmitriy
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Performance degradation in embed mode

2018-08-11 Thread Dmitriy
Hello Igniters,

I'm using an spring web application with the embed Ignite cache.
When we run in unit-tests, the insertion time into the cache is about 10 000
values/seconds.
But when the application is running on the Apache Tomcat server, the insert
is very slow (about 5 minutes). 
The application runs on one node.
CPU usage: 15-20%.
threaddump.txt
  

So do you have any idea what the problem could be?

  @PostConstruct
  public void putAllCache() {
Map map = new HashMap<>();
for (long l = 0; l < 10_000L; l++) {
  map.put(
new CacheId(new Random().nextLong(), new Random().nextLong()),
new DataUnit(new Random().nextLong(), new Random().nextLong(), new
Random().nextLong())
  );
}


IgniteConfiguration configuration = new IgniteConfiguration();
String regionName = "MyRegion";
DataRegionConfiguration dataRegionConfiguration = new
DataRegionConfiguration();
dataRegionConfiguration.setName(regionName);
dataRegionConfiguration.setMaxSize(DataUnits.MEGABYTE.getBytes(1024));
dataRegionConfiguration.setPersistenceEnabled(false);
DataStorageConfiguration dataStorageConfiguration = new
DataStorageConfiguration();
dataStorageConfiguration.setDataRegionConfigurations(
  new DataRegionConfiguration[] {dataRegionConfiguration}
);
configuration.setDataStorageConfiguration(dataStorageConfiguration);

Ignite ignite = Ignition.getOrStart(configuration);
String cacheName = "MyCache";
CacheConfiguration cacheConfiguration = new
CacheConfiguration();
cacheConfiguration.setName(cacheName);
cacheConfiguration.setIndexedTypes(CacheId.class, DataUnit.class);
cacheConfiguration.setDataRegionName(regionName);
cacheConfiguration.setBackups(1);
cacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
cacheConfiguration.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);

IgniteCache cache =
ignite.getOrCreateCache(cacheConfiguration);

LOGGER.info("Start putAll.");
cache.putAll(map);
LOGGER.info("End putAll.");
  }

11:28:23.456 [RMI TCP Connection(2)-127.0.0.1] TX[] INFO 
c.p.o.b.d.a.s.t.i.i.PutAllTest - Start putAll.
11:33:23.881 [RMI TCP Connection(2)-127.0.0.1] TX[] INFO 
c.p.o.b.d.a.s.t.i.i.PutAllTest - End putAll.


Dmitriy




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/