upgle commented on code in PR #5236:
URL: https://github.com/apache/openwhisk/pull/5236#discussion_r878078290


##########
proposals/POEM-3-action-limit-for-namespace.md:
##########
@@ -0,0 +1,283 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Title
+Providing action limits for each namespace
+
+## Status
+* Current state: In-progress
+* Author(s): @upgle
+
+## Summary and Motivation
+
+This POEM proposes a new feature that allows administrators to set action 
limits (memory, timeout, log, and concurrency) for each namespace.
+
+Sometimes some users want to make an action with more memory and longer 
duration. But, Openwhisk only has a system limit for action shared by all 
namespaces.
+There is no way to adjust the action limit for a few users, and changing the 
action limit setting will affect all users.
+
+In some private environments, you can operate Openwhisk more flexibly by 
providing different action limits.
+(For example, providing high memory only to some users.)
+
+```
+          256M                               512M
+
+            │     namespace default limit      │
+            ▼                                  ▼
+ 
┌──────────┬──────────────────────────────────┬────────────┬────────────────────────┐
+ │          │┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼│----------► │                  
      │
+ 
└──────────┴──────────────────────────────────┴────────────┴────────────────────────┘
+ ▲                                                          ▲                  
      ▲
+ │ system limit                                             │ namespace limit  
      │ system limit
+
+128M                                                      1024M                
    2048M
+```
+
+## Proposed changes
+
+### 3 types of action limits
+
+There was only a system limit shared by all namespaces, but two more concepts 
for namespace limits are added.
+
+- (1) system limit: It can never be exceeded under any circumstances.
+- (2) namespace default limit: It can be used if a limit has not been set for 
a namespace.
+- (3) namespace limit: It can be set by a system administrator for a namespace 
and cannot exceed the range of the system limit.
+
+### Limit configs for namespace
+
+- The maxParameterSize, maxPayloadSize and truncationSize values are treated 
as `ByteSize` string. (e.g. 1 MB, 512 KB...)
+
+The following settings are new:
+
+config key             | Type                         | description
+---------------------- | ---------------------------- | ---------------
+minActionMemory        | integer (unit: MB)           | minimum action memory 
size for namespace
+maxActionMemory        | integer (unit: MB)           | maximum action memory 
size for namespace
+minActionLogs          | integer (unit: MB)           | minimum activation log 
size for namespace
+maxActionLogs          | integer (unit: MB)           | maximum activation log 
size for namespace
+minActionTimeout       | integer (unit: milliseconds) | minimum action time 
limit for namespace
+maxActionTimeout       | integer (unit: milliseconds) | maximum action time 
limit for namespace
+minActionConcurrency   | integer                      | minimum action 
concurrency limit for namespace

Review Comment:
   Thank you for your comments. I've been thinking a lot too but I can't come 
up with a good config name.
   And a lot of code already calls it the **action concurrency limit**. I think 
using a new name can also be more confusing.
   
   
https://github.com/apache/openwhisk/blob/59b67fe96f44e573f3348afed966a1cdaf80ddf2/tests/src/test/scala/org/apache/openwhisk/core/limits/ConcurrencyTests.scala#L53
   
   
https://github.com/apache/openwhisk/blob/b0a88b5b523b1867038b0d2615fc2cf7b4951972/ansible/roles/controller/tasks/deploy.yml#L223
   
   - concurrentInvocations: Max allowed concurrent in-flight invocations for a 
namespace level.
   - minActionConcurrency: Minimum allowed concurrent invocations for an action 
level.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to