Re: Distribution of keys to partitions

2017-04-06 Thread Yakov Zhdanov
> > > -- > > View this message in context: http://apache-ignite- > developers.2346864.n4.nabble.com/Distribution-of-keys-to- > partitions-tp15455p16005.html > > Sent from the Apache Ignite Developers mailing list archive at > Nabble.com. > >

Re: Distribution of keys to partitions

2017-03-31 Thread Denis Magda
message in context: > http://apache-ignite-developers.2346864.n4.nabble.com/Distribution-of-keys-to-partitions-tp15455p16005.html > Sent from the Apache Ignite Developers mailing list archive at Nabble.com.

Re: Distribution of keys to partitions

2017-03-31 Thread Dmitriy Setrakyan
1707 > > > > > > > > -- > > View this message in context: http://apache-ignite- > > developers.2346864.n4.nabble.com/Distribution-of-keys-to- > > partitions-tp15455p16005.html > > Sent from the Apache Ignite Developers mailing list archive at > Nabble.com. > > >

Re: Distribution of keys to partitions

2017-03-31 Thread Vladimir Ozerov
message in context: http://apache-ignite- > developers.2346864.n4.nabble.com/Distribution-of-keys-to- > partitions-tp15455p16005.html > Sent from the Apache Ignite Developers mailing list archive at Nabble.com. >

Re: Distribution of keys to partitions

2017-03-31 Thread michael.griggs
The change is now ready for review: https://github.com/apache/ignite/pull/1707 -- View this message in context: http://apache-ignite-developers.2346864.n4.nabble.com/Distribution-of-keys-to-partitions-tp15455p16005.html Sent from the Apache Ignite Developers mailing list archive at Nabble.com.

Re: Distribution of keys to partitions

2017-03-22 Thread michael.griggs
://ci.ignite.apache.org/project.html?projectId=IgniteTests&branch_IgniteTests=pull/1645/head Regards Mike -- View this message in context: http://apache-ignite-developers.2346864.n4.nabble.com/Distribution-of-keys-to-partitions-tp15455p15676.html Sent from the Apache Ignite Developers mailing list archiv

Re: Distribution of keys to partitions

2017-03-15 Thread Denis Magda
Excellent discovery, thanks Michael! I would suggest doing the following. If we see that a number of partitions is a power of two then the new algorithm will be applied, otherwise the warning will be printed out and the *old* one approach will be used. Does this resolver all the concerns? Mich

Re: Distribution of keys to partitions

2017-03-15 Thread Dmitriy Setrakyan
On Wed, Mar 15, 2017 at 9:51 AM, Michael Griggs wrote: > Have we ever heard of somebody needing to set the partition count to a > non-power-of-two number? Perhaps we could restrict the method so that it > will only accept a power of two as the partition count? > As Valentin suggested, we should

RE: Distribution of keys to partitions

2017-03-15 Thread Michael Griggs
] Sent: 15 March 2017 16:22 To: dev@ignite.apache.org Subject: Re: Distribution of keys to partitions Andrey, Absolutely, your point is correct. I'm talking about default behavior which must be as effective as possible. In case we do this optimization, I would also show a warning if numb

Re: Distribution of keys to partitions

2017-03-15 Thread Valentin Kulichenko
Andrey, Absolutely, your point is correct. I'm talking about default behavior which must be as effective as possible. In case we do this optimization, I would also show a warning if number of partitions is not a power of two. -Val On Wed, Mar 15, 2017 at 5:09 PM, Andrey Gura wrote: > Anyway, w

Re: Distribution of keys to partitions

2017-03-15 Thread michael.griggs
ions is modified to a non-power-of-two value? -- View this message in context: http://apache-ignite-developers.2346864.n4.nabble.com/Distribution-of-keys-to-partitions-tp15455p15471.html Sent from the Apache Ignite Developers mailing list archive at Nabble.com.

Re: Distribution of keys to partitions

2017-03-15 Thread Andrey Gura
Anyway, we can't always use this optimization because it will not work for non power of two values. On Wed, Mar 15, 2017 at 6:48 PM, Valentin Kulichenko wrote: > In 99% of cases number of partition is a power of two, because it's the > default value. Almost no one changes it. If this change actua

Re: Distribution of keys to partitions

2017-03-15 Thread Valentin Kulichenko
In 99% of cases number of partition is a power of two, because it's the default value. Almost no one changes it. If this change actually provides better distribution, it absolutely makes sense to do it. Michael, can you create a Jira ticket and put you findings there? -Val On Wed, Mar 15, 2017 a

Re: Distribution of keys to partitions

2017-03-15 Thread Andrey Gura
Michael, it makes sense only for cases when partitions count is power of two. Affinity function doesn't have this limitation. Bu, of course, we can check, that partitions count is power of two and use optimized hash code calculation. On Wed, Mar 15, 2017 at 4:09 PM, Michael Griggs wrote: > Hi

Distribution of keys to partitions

2017-03-15 Thread Michael Griggs
Hi Igniters, Last week I was working with a group of Ignite users. They are inserting several million string keys in to a cache. Each string key was approximately 22-characters in length. When I exported the partition counts (via GG Visor) I was able to see an unusual periodicity in the number