merlimat commented on a change in pull request #3043: Set not just resource 
requests but also limits
URL: https://github.com/apache/pulsar/pull/3043#discussion_r235620989
 
 

 ##########
 File path: 
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java
 ##########
 @@ -585,6 +585,7 @@ private V1Container getFunctionContainer(List<String> 
instanceCommand, Function.
         requests.put("memory", Quantity.fromString(Long.toString(resource != 
null && resource.getRam() != 0 ? resource.getRam() : 1073741824)));
         requests.put("cpu", Quantity.fromString(Double.toString(resource != 
null && resource.getCpu() != 0 ? resource.getCpu() : 1)));
         resourceRequirements.setRequests(requests);
 
 Review comment:
   Actually, if we are requesting to get at least the max resources, there can 
be overhead. Eg: each functions instance has 1 core max limit, therefore we're 
also requesting to guarantee at-min to have 1 core reserved.
   
   We could just set the limit and not the request, or have a request much 
lower than the actual limit, and leave K8S to move pods around when several of 
them are using up to the max the resources.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to