You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Igor Seliverstov (JIRA)" <ji...@apache.org> on 2017/08/29 10:10:00 UTC

[jira] [Comment Edited] (IGNITE-6182) Change default max memory size from 80% to 20%

    [ https://issues.apache.org/jira/browse/IGNITE-6182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145045#comment-16145045 ] 

Igor Seliverstov edited comment on IGNITE-6182 at 8/29/17 10:09 AM:
--------------------------------------------------------------------

the check happens at the node start time or on NODE_JOIN event 

in general it looks like: 

1) calculate expected used memory = heap max + system cache max + all 
custom policies max + default policy size and put it into a node attribute 

2) get total physycal memory, calculate expected safe to be used memory 
amount (leave 4 gb min or 20% of available memory for OS) 

3) if expected used memory + expected used memory of other nodes on the 
host > than safe to be used memory amount, start calculating suggestions 

4) Each ignite instance needs at least 512mb heap + 40mb system cache + 
100mb default polycy, if available memory is less we cannot suggest 
anything reasonable, print warning, stop calculation. 

5) check heap size (shouldn't exceed 30% of available memory (total_memory - reserved for OS memory) * 30% for all JVMs, if it exeedes, suggest just 
calculated value or 512MB minimal) 

6) check if system cache size changed, suggest default value if it's so 

7) in case 100 mb * policies count < available memory, suggest using 
default policy with max size equals to remaining memory (available - heap - 
system cache) 

8) calculate new size for each memory policy ( it's user defined size * 
(remaining / (all_policies_size * nodes_cnt)); in proportion to 
remaining memory, devided by nodes number on the host or 100 mb minimal) 

9) print suggestions 



was (Author: gvvinblade):
the check happens at the node start time or on NODE_JOIN event 

in general it looks like: 

1) calculate expected used memory = heap max + system cache max + all 
custom policies max + default policy size and put it into a node attribute 

2) get total physycal memory, calculate expected safe to be used memory 
amount (leave 4 gb min or 20% of available memory for OS) 

3) if expected used memory + expected used memory of other nodes on the 
host > than safe to be used memory amount, start calculating suggestions 

4) Each ignite instance needs at least 512mb heap + 40mb system cache + 
100mb default polycy, if available memory is less we cannot suggest 
anything reasonable, print warning, stop calculation. 

5) check heap size (shouldn't exceed 30% of available memory (total_memory 
- reserved for OS memory) * 30% for all JVMs, if it exeedes, suggest just 
calculated value or 512MB minimal) 

6) check if system cache size changed, suggest default value if it's so 

7) in case 100 mb * policies count < available memory, suggest using 
default policy with max size equals to remaining memory (available - heap - 
system cache) 

8) calculate new size for each memory policy ( it's user defined size * 
(remaining / (all_policies_size * nodes_cnt)); in proportion to 
remaining memory, devided by nodes number on the host or 100 mb minimal) 

9) print suggestions 


> Change default max memory size from 80% to 20%
> ----------------------------------------------
>
>                 Key: IGNITE-6182
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6182
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Assignee: Igor Seliverstov
>            Priority: Blocker
>             Fix For: 2.2
>
>
> Currently we can allocate up to 80% of available RAM by default. It could lead to swap with potential risk of hang.
> In order to improve user experience, we need to do the following:
> 1) Decrease default to 20% ({{MemoryConfiguration.DFLT_MEMORY_POLICY_FRACTION}})
> 2) When node starts it should sum max sizes of all memory regions plus Java's XMX. If result is greater than 50% of total RAM, we should issue a warning about potential swap.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)