ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivér Szabó (JIRA) <j...@apache.org>
Subject [jira] [Commented] (AMBARI-14690) Configurable system resource values for ambari-agent
Date Tue, 19 Jan 2016 20:11:40 GMT

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

Olivér Szabó commented on AMBARI-14690:
---------------------------------------

Hi Vinod!
The (1) solution can work well with  heterogeneous cluster, ambari-agent,ini files can be
different on different hosts. Also that means the specified values should be set before start
ambari-agents (so the higher layer should determine and set these values)
Of course I can implement (2), but then we should agree about the format for the file. My
vote is use a json file for this and also these values should be independent from the /proc/meminfo
format (im not sure that is the best way to gather info about system resources, and that is
not accessable in all OS)

It can look like this: resource-limits.json
{code:java}
{
    [{
        "resource_name" : "memoryfree"
        "resource_value" : "15600"
        "description" : "memory in KB ..."
    },
   ...
    ]
    
}
{code}

or:

{code:java}
{
"memory_free" :  "15600",
"memory_total" : ....
}
{code}





> Configurable system resource values for ambari-agent
> ----------------------------------------------------
>
>                 Key: AMBARI-14690
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14690
>             Project: Ambari
>          Issue Type: Improvement
>          Components: ambari-agent
>    Affects Versions: 2.4.0
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-14690.patch
>
>
> When an ambari agent starts, host system details are registered into ambari server database.
These values are calculated by ambari-agents based on different files on the hosts (e.g :
/proc/meminfo). 
> In some cases it isn't a correct behavior: If ambari-agent is in a docker-container,
it will see the same memory/cpu details. (stack advisor also uses these values, its possible
stack advisor can recommend a too high memory value for some services)
> Solution: Configurable system resources in ambari-agent.ini (if a value does not exist
or empty, it will use the default behavior)
> {code:java}
> [system_resource]
> processorcount=2
> physicalprocessorcount=2
> memorysize=50000
> memoryfree=50000
> memorytotal=100000
> swapsize=20
> swapfree=20
> ...
> {code}
> In ambari-agent Facter.py set these values, all of the factor info values can be redefined
in ambari-agent.ini file.
> That means ambari is not responsible to gather these values from the system.
> - use case: 
> During 'docker run' , if there is a script which calls 'ambari-agent start', before that,
some of the memory values can be replaced/inserted into the ambari-agent.ini file in that
script. (e.g. the user knows that, 4 ambari-agent containers will be started, with the same
services, so the real memory needs to be devided by 4 etc.)
> Facter.py is called during ambari-agent start, so if the values will be modified later,
ambari-agent needs to be restarted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message