[
https://issues.apache.org/jira/browse/IGNITE-5024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976477#comment-15976477
]
Sergey Chugunov edited comment on IGNITE-5024 at 4/20/17 1:34 PM:
------------------------------------------------------------------
[~dsetrakyan], sure, examples are below. I'll use this proposed setting in them
and at the end explain how configuration looks like without it.
I would consider Memory Policy configuration on three different levels.
*Fully default*: user doesn't need to specify anything, default MemoryPolicy
with default name and 80% of available RAM size is created.
*Semi-default*: user wants to override this "80% RAM" setting. All is needed is
to use the following configuration:
{code:xml}
<property name="memoryConfiguration">
<bean class="org.apache.ignite.configuration.MemoryConfiguration">
<property name="defaultMemoryPolicySize" value="#{2 * 1024 * 1024
* 1024}"/>
</bean>
</property>
{code}
*Fully customized*: user defines everything by his/her own including name and
size of default Memory Policy.
{code:xml}
<property name="memoryConfiguration">
<bean class="org.apache.ignite.configuration.MemoryConfiguration">
<property name="defaultMemoryPolicyName" value="default_mem_plc"/>
<property name="memoryPolicies">
<list>
<bean
class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
<property name="name" value="default_mem_plc"/>
<property name="size" value="#{16 * 1024 * 1024 *
1024}"/>
</bean>
</list>
</property>
</bean>
</property>
{code}
Proposed setting allows to simplify semi-default level; without it user needs
to use verbose fully-customized syntax in order to adjust only default Memory
Policy size.
was (Author: sergey-chugunov):
[~dsetrakyan], sure, examples are below. I'll use this proposed setting in them
and at the end show how configuration looks like without it.
I would consider Memory Policy configuration on three different levels.
*Fully default*: user doesn't need to specify anything, default MemoryPolicy
with default name and 80% of available RAM size is created.
*Semi-default*: user wants to override this "80% RAM" setting. All is needed is
to use the following configuration:
{code:xml}
<property name="memoryConfiguration">
<bean class="org.apache.ignite.configuration.MemoryConfiguration">
<property name="defaultMemoryPolicySize" value="#{2 * 1024 * 1024
* 1024}"/>
</bean>
</property>
{code}
*Fully customized*: user defines everything by his/her own including name and
size of default Memory Policy.
{code:xml}
<property name="memoryConfiguration">
<bean class="org.apache.ignite.configuration.MemoryConfiguration">
<property name="defaultMemoryPolicyName" value="default_mem_plc"/>
<property name="memoryPolicies">
<list>
<bean
class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
<property name="name" value="default_mem_plc"/>
<property name="size" value="#{16 * 1024 * 1024 *
1024}"/>
</bean>
</list>
</property>
</bean>
</property>
{code}
Proposed setting allows to simplify semi-default level; without it user needs
to use verbose fully-customized syntax in order to adjust only default Memory
Policy size.
> Default MemoryPolicy settings improvements
> ------------------------------------------
>
> Key: IGNITE-5024
> URL: https://issues.apache.org/jira/browse/IGNITE-5024
> Project: Ignite
> Issue Type: Improvement
> Reporter: Sergey Chugunov
> Assignee: Sergey Chugunov
> Labels: general
> Fix For: 2.0
>
>
> h2. Notes
> Currently when user doesn't specify any MemoryPolicy configuration a default
> one is created. It has a fixed size of 1 GB which seems to be too rigid.
> Also when user wants to override size of the default MemoryPolicy, the full
> syntax of this configuration must be used; it is cumbersome in such simple
> case.
> h2. Acceptance Criteria
> # Default MemoryPolicy is created with size of 80% of physical memory
> available on machine.
> # New configuration property *defaultMemoryPolicySize* is introduced in
> *memoryConfiguration* section to allow user to specify exact size in bytes
> without applying verbose syntax of *memoryPolicyConfiguration* section.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)