copyOnRead performance issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

copyOnRead performance issues

Alexei Scherbakov
Guys,

Currently Ignite tries to be compatible with JSR-107 specification which is
"store-by-value" by default.

So we have the copyOnRead flag with default value set to true in
CacheConfiguration.

The truth is the performance of Ignite with this flag disabled is
significantly better.
With a simple test reading locally 1Kb values I see about 7x performance
gain with copying disabled.

Then the https://issues.apache.org/jira/browse/IGNITE-2795 will be finished
total performance impact will even be worse.

I propose to add new performance hint related to copyOnRead property.

It can be done in two ways:

1. Read static cache configurations on start and print hint if at least one
cache has copyOnRead=true.
If the dynamic cache with copyOnRead=true is started print hint as well.

2. Introduce IgniteConfiguration.copyOnRead property, which is true by
default.
All caches will have their respective property set by default using
IgniteConfiguration default value.
If the IgniteConfiguration.copyOnRead=true when print hint on start.

What do you think ?

One more thing to mention.
MutableConfiguration has storeByValue property, which has the same meaning
as copyOnRead, but strangely not used.
This might be confusing for users expecting full JSR-107 compatibility.
That's the reason for it?

--

Best regards,
Alexei Scherbakov
Reply | Threaded
Open this post in threaded view
|

Re: copyOnRead performance issues

yzhdanov
1. Agree. You can use org.apache.ignite.internal.GridPerformanceSuggestions
to print this warning.
2. Disagree. For me this brings a lot of confusion.

Alex, can you please check that all internal caches used in Ignite
internals have this property set to false.

--Yakov

2016-08-18 17:24 GMT+03:00 Alexei Scherbakov <[hidden email]>:

> Guys,
>
> Currently Ignite tries to be compatible with JSR-107 specification which is
> "store-by-value" by default.
>
> So we have the copyOnRead flag with default value set to true in
> CacheConfiguration.
>
> The truth is the performance of Ignite with this flag disabled is
> significantly better.
> With a simple test reading locally 1Kb values I see about 7x performance
> gain with copying disabled.
>
> Then the https://issues.apache.org/jira/browse/IGNITE-2795 will be
> finished
> total performance impact will even be worse.
>
> I propose to add new performance hint related to copyOnRead property.
>
> It can be done in two ways:
>
> 1. Read static cache configurations on start and print hint if at least one
> cache has copyOnRead=true.
> If the dynamic cache with copyOnRead=true is started print hint as well.
>
> 2. Introduce IgniteConfiguration.copyOnRead property, which is true by
> default.
> All caches will have their respective property set by default using
> IgniteConfiguration default value.
> If the IgniteConfiguration.copyOnRead=true when print hint on start.
>
> What do you think ?
>
> One more thing to mention.
> MutableConfiguration has storeByValue property, which has the same meaning
> as copyOnRead, but strangely not used.
> This might be confusing for users expecting full JSR-107 compatibility.
> That's the reason for it?
>
> --
>
> Best regards,
> Alexei Scherbakov
>
Reply | Threaded
Open this post in threaded view
|

Re: copyOnRead performance issues

Alexei Scherbakov
Yakov, I've checked the current master and found out what only 2 of 4
system caches were updated to have copyOnRead=false. I'm wondering why.

The work was done for https://issues.apache.org/jira/browse/IGNITE-3569
issue.

Regarding the hint I've filed the new issue:
https://issues.apache.org/jira/browse/IGNITE-3714







2016-08-18 18:34 GMT+03:00 Yakov Zhdanov <[hidden email]>:

> 1. Agree. You can use org.apache.ignite.internal.
> GridPerformanceSuggestions
> to print this warning.
> 2. Disagree. For me this brings a lot of confusion.
>
> Alex, can you please check that all internal caches used in Ignite
> internals have this property set to false.
>
> --Yakov
>
> 2016-08-18 17:24 GMT+03:00 Alexei Scherbakov <[hidden email]
> >:
>
> > Guys,
> >
> > Currently Ignite tries to be compatible with JSR-107 specification which
> is
> > "store-by-value" by default.
> >
> > So we have the copyOnRead flag with default value set to true in
> > CacheConfiguration.
> >
> > The truth is the performance of Ignite with this flag disabled is
> > significantly better.
> > With a simple test reading locally 1Kb values I see about 7x performance
> > gain with copying disabled.
> >
> > Then the https://issues.apache.org/jira/browse/IGNITE-2795 will be
> > finished
> > total performance impact will even be worse.
> >
> > I propose to add new performance hint related to copyOnRead property.
> >
> > It can be done in two ways:
> >
> > 1. Read static cache configurations on start and print hint if at least
> one
> > cache has copyOnRead=true.
> > If the dynamic cache with copyOnRead=true is started print hint as well.
> >
> > 2. Introduce IgniteConfiguration.copyOnRead property, which is true by
> > default.
> > All caches will have their respective property set by default using
> > IgniteConfiguration default value.
> > If the IgniteConfiguration.copyOnRead=true when print hint on start.
> >
> > What do you think ?
> >
> > One more thing to mention.
> > MutableConfiguration has storeByValue property, which has the same
> meaning
> > as copyOnRead, but strangely not used.
> > This might be confusing for users expecting full JSR-107 compatibility.
> > That's the reason for it?
> >
> > --
> >
> > Best regards,
> > Alexei Scherbakov
> >
>



--

Best regards,
Alexei Scherbakov