CAP Theorem (CP? or AP?)

2018-12-23 Thread joseheitor
In this GridGain presentation:

https://www.youtube.com/watch?v=u8BFLDfOdy8=1806s
  

Valentin Kulichenko explains the CAP theorem and states that Apache Ignite
is designed to favour Strong-Consistency (CP) over High-Availability (AP).

However, in my test case, my system appears to be behaving as an AP system.
Here is my setup:

4 partitioned nodes in 2 availability-zones [AZa-1, AZa-2] [AZb-3, AZb-4],
configured as described in this post:

http://apache-ignite-users.70518.x6.nabble.com/RESOLVED-Cluster-High-Availability-tp25740.html

  

With 7,000 records loaded into a table in the cluster with JDBC Thin client:

1. [OK] I can connect to any node and verify that there are 7,000 records
with a SELECT COUNT(*)

2. [OK] If I kill all nodes in AZ-a [AZa-1, AZa-2], and connect to one of
the remaining online nodes in AZ-b, I can still verify that there are 7,000
records with a SELECT COUNT(*)

3. [?] I then kill one of the remaining two nodes in AZ-b and connect to the
single remaining node. Now a SELECT COUNT(*) returns a value of 3,444
records.

This seems to illustrate that the partitioning and backup configuration is
working as intended. But if Ignite is strongly-consistent (CP), shouldn't
the final query fail rather than return an inaccurate result (AP)?

Or am I missing some crucial configuration element(s)?



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


Re: Do we require to set MaxDirectMemorySize JVM parameter?

2018-12-23 Thread summasumma
Thanks Ivan.

This means having both configuration as follows:
xml-->  
jvmption --> "-XX:MaxDirectMemorySize=8g" 

Means, i should have minimum 16 Gb of RAM (8 dataregion+ 8 directmem) for
Ignite to run properly i guess.

In my current setup i have 16GB of total ram and given 12GB=maxSize
Dataregion and jvmoption as '-XX:MaxDirectMemorySize=8g'. And this is
crashing Ignite with OOME after a while (though not immediatly) when i try
to do a performance testing of Update operation. so this means either i
should increase the RAM or decrease the XX:MaxDirectMemorySize to 4g ?

Please clarify

Thanks
...summa



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


Full GC in client after cluster become unstable with "Unable to await partitions release latch within timeout"

2018-12-23 Thread aMark
Hi,

We are using Ignite 2.6 as persistent store in Partitioned Mode having 6
cluster node running, each node is running on different machine. 

We have noticed that on all the server nodes were trying to rebalance due to
'too many dirty pages': 
2018-12-22 14:56:17,161 INFO
[db-checkpoint-thread-#104%d66a2109-94b4-4eb3-bb3c-e611aa842a2a%] {}
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager
- Checkpoint started [
checkpointId=cabfb20d-d53d-4dd5-8e2b-d270f062c010, startPtr=FileWALPointer
[idx=5025, fileOff=65789181, len=5487], checkpointLockWait=34ms,
checkpointLockHoldTime=20ms, walCpRecordFsyncDuration=68ms, pages=1
820016, reason='too many dirty pages']

then I can see following log after a minute: 
2018-12-22 14:57:26,040 WARN
[exchange-worker-#102%d66a2109-94b4-4eb3-bb3c-e611aa842a2a%] {}
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture
- Unable to await partitions release latch within timeout: ClientLatch


After this cluster became unresponsive for 30 minutes and timeout started
happening while writing to cluster at the client end.
But at the same time number of ignite related objects increased by many
threshold over the time. 

Following is histogram from one of the client machine : 
1: 67551977016212474480 
org.apache.ignite.internal.util.future.GridFutureAdapter$Node
2:   6637390 3837988712  [Ljava.lang.Object;
3:   6557471  262298840 
org.apache.ignite.internal.util.future.GridCompoundFuture
4:   6627708  159064992  java.util.ArrayList
5:177242   36609304  [B

And eventually client machine went in Full GC mode.
Following is the code to write in the ignite cache :
 try(IgniteDataStreamer streamer =
ignite.dataStreamer(cacheName)){
igniteMap.forEach((key,value) -> streamer.addData(key, value));
 
}catch(CacheException|IgniteInterruptedException|IllegalStateException|IgniteDataStreamerTimeoutException
e){
ignite.log().error("Entries not written to Ignite Cache, please
check the logs.");
throw new IgniteException(e);
  }


Any help will be much appreciated.




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


[RESOLVED] Cluster High-Availability

2018-12-23 Thread joseheitor
Okay - I found the answer to my Exception problem in the following post:

http://apache-ignite-users.70518.x6.nabble.com/Default-Cache-template-tp19494p19497.html

  



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


Re: Do we require to set MaxDirectMemorySize JVM parameter?

2018-12-23 Thread Павлухин Иван
Hi summasumma,

DataRegion maxSize and jvm MaxDirectMemorySize are completely different.
Ignite DataRegion uses offheap memory allocated with help of Unsafe.
And that memory is not related to "direct memory" which jvm allocates
when direct buffers are used (e.g. ByteBuffer.allocateDirect). To
constraint max amount of memory for direct buffers one can use
MaxDirectMemorySize jvm option. As far as I know, by default
MaxDirectMemorySize is equal to Xmx. Consult [1] for more details.

[1] https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html

2018-12-23 11:17 GMT+03:00, Павлухин Иван :
> Hi collnc,
>
> Perhaps, documentation can answer you question [1].
>
> [1] https://apacheignite.readme.io/docs/durable-memory-tuning
>
> 2018-12-21 20:39 GMT+03:00, summasumma :
>> In the above example,
>>
>> is setting  "
>> "
>> in xml config file same as adding a jvmoption
>> "-XX:MaxDirectMemorySize=8g"
>> ?
>> or its different?
>>
>> Can somone please clarify?
>>
>> Thanks
>> ...summa
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>


-- 
Best regards,
Ivan Pavlukhin


Re: Do we require to set MaxDirectMemorySize JVM parameter?

2018-12-23 Thread Павлухин Иван
Hi collnc,

Perhaps, documentation can answer you question [1].

[1] https://apacheignite.readme.io/docs/durable-memory-tuning

2018-12-21 20:39 GMT+03:00, summasumma :
> In the above example,
>
> is setting  "
> "
> in xml config file same as adding a jvmoption "-XX:MaxDirectMemorySize=8g"
> ?
> or its different?
>
> Can somone please clarify?
>
> Thanks
> ...summa
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


-- 
Best regards,
Ivan Pavlukhin