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


##########
proposals/POEM-3-action-limit-for-namespace.md:
##########
@@ -0,0 +1,132 @@
+<!--
+#
+# 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, which is shared by 
all namespaces.
+There is no way to loosen the action limit for just a few users, and changing 
the action limit setting will affect all users.
+
+## Proposed changes
+
+### 3 types of action limits
+
+There are 3 types of action limits:
+
+- (1) system limits: This limits can never be exceeded.
+- (2) namespace default limits: This limit can be used if a limit has not been 
set for the namespace.
+- (3) namespace limits: This limit can be set by the system administrator for 
namespace and cannot exceed the range of the system limit.
+
+
+#### namespace default limit
+Namespaces without additional namespace limits can create actions with memory 
ranging from 512MB to 1024MB.
+
+<img 
src="https://user-images.githubusercontent.com/5635513/166409786-bb6759f8-e860-4f1e-8524-a91cc8ddd2f9.png";
 width="600">
+
+#### namespace limit (for `foo` namespace)
+The `foo` namespace with a maximum memory limit of 2048MB can create actions 
that have between 512MB and 2048MB of memory.
+
+<img 
src="https://user-images.githubusercontent.com/5635513/166409938-66a257e5-e9a5-4031-9f3a-a0001a9c5c93.png";
 width="600">
+
+### Limit document for CouchDB
+
+You can set namespace limits with `{namespace}/limits` document just like any 
other existing setting.
+The config keys related to the action limit start with the string `action` and 
end with `Min`, and `Max`.
+
+```json
+{
+  "concurrentInvocations": 100,
+  "invocationsPerMinute": 100,
+  "firesPerMinute": 100,
+  "actionMemoryMax": 1024,
+  "actionMemoryMin": 128,
+  "actionConcurrencyMax": 400,
+  "actionConcurrencyMin": 1,
+  "actionLogsMax": 128,
+  "actionLogsMin": 0
+}
+```
+
+#### namespace limit configs

Review Comment:
   I appreciate your comments on the situation of concern.
   
   > How does a user update their set limits?
   
   You can set namespace limits by updating `/limits` document in CouchDB. 
(wskadmin can be used, not implemented yet). 
   And this is for administrators, not users.
   
   > Whereas action concurrency still needs to have a set limit for the 
namespace within the min and max because the concurrency limit is by namespace, 
not set when creating an action.
   
   The concurrency limit I said in document is the number of simultaneous 
executions in one action. his can be specified when creating an action. So this 
is an action scope, not a namespace scope.
   
   https://github.com/apache/openwhisk/blob/master/docs/concurrency.md
   
   ```
   create a new action
   Usage:
     wsk action create ACTION_NAME ACTION [flags]
   
   Flags:
     -c, --concurrency LIMIT      the maximum intra-container concurrent 
activation LIMIT for the action (default 1)
   ```
   
   ```json
   {
       "namespace": "whisk.system",
       "name": "hello",
       "version": "0.0.5",
       "exec": {
           "kind": "nodejs:10",
           "binary": false
       },
       "annotations": [
           {
               "key": "provide-api-key",
               "value": false
           },
           {
               "key": "exec",
               "value": "nodejs:10"
           }
       ],
       "parameters": [
           {
               "key": "key",
               "value": "value"
           }
       ],
       "limits": {
           "timeout": 10000001,
           "memory": 256,
           "logs": 10,
           "concurrency": 100 <- 
       },
   ```
   



##########
proposals/POEM-3-action-limit-for-namespace.md:
##########
@@ -0,0 +1,132 @@
+<!--
+#
+# 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, which is shared by 
all namespaces.
+There is no way to loosen the action limit for just a few users, and changing 
the action limit setting will affect all users.
+
+## Proposed changes
+
+### 3 types of action limits
+
+There are 3 types of action limits:
+
+- (1) system limits: This limits can never be exceeded.
+- (2) namespace default limits: This limit can be used if a limit has not been 
set for the namespace.
+- (3) namespace limits: This limit can be set by the system administrator for 
namespace and cannot exceed the range of the system limit.
+
+
+#### namespace default limit
+Namespaces without additional namespace limits can create actions with memory 
ranging from 512MB to 1024MB.
+
+<img 
src="https://user-images.githubusercontent.com/5635513/166409786-bb6759f8-e860-4f1e-8524-a91cc8ddd2f9.png";
 width="600">
+
+#### namespace limit (for `foo` namespace)
+The `foo` namespace with a maximum memory limit of 2048MB can create actions 
that have between 512MB and 2048MB of memory.
+
+<img 
src="https://user-images.githubusercontent.com/5635513/166409938-66a257e5-e9a5-4031-9f3a-a0001a9c5c93.png";
 width="600">
+
+### Limit document for CouchDB
+
+You can set namespace limits with `{namespace}/limits` document just like any 
other existing setting.
+The config keys related to the action limit start with the string `action` and 
end with `Min`, and `Max`.
+
+```json
+{
+  "concurrentInvocations": 100,
+  "invocationsPerMinute": 100,
+  "firesPerMinute": 100,
+  "actionMemoryMax": 1024,
+  "actionMemoryMin": 128,
+  "actionConcurrencyMax": 400,
+  "actionConcurrencyMin": 1,
+  "actionLogsMax": 128,
+  "actionLogsMin": 0
+}
+```
+
+#### namespace limit configs

Review Comment:
   I appreciate your comments on the situation of concern.
   
   > How does a user update their set limits?
   
   You can set namespace limits by updating `/limits` document in CouchDB. 
(wskadmin also can be used, not implemented yet). 
   And this is for administrators, not users.
   
   > Whereas action concurrency still needs to have a set limit for the 
namespace within the min and max because the concurrency limit is by namespace, 
not set when creating an action.
   
   The concurrency limit I said in document is the number of simultaneous 
executions in one action. his can be specified when creating an action. So this 
is an action scope, not a namespace scope.
   
   https://github.com/apache/openwhisk/blob/master/docs/concurrency.md
   
   ```
   create a new action
   Usage:
     wsk action create ACTION_NAME ACTION [flags]
   
   Flags:
     -c, --concurrency LIMIT      the maximum intra-container concurrent 
activation LIMIT for the action (default 1)
   ```
   
   ```json
   {
       "namespace": "whisk.system",
       "name": "hello",
       "version": "0.0.5",
       "exec": {
           "kind": "nodejs:10",
           "binary": false
       },
       "annotations": [
           {
               "key": "provide-api-key",
               "value": false
           },
           {
               "key": "exec",
               "value": "nodejs:10"
           }
       ],
       "parameters": [
           {
               "key": "key",
               "value": "value"
           }
       ],
       "limits": {
           "timeout": 10000001,
           "memory": 256,
           "logs": 10,
           "concurrency": 100 <- 
       },
   ```
   



-- 
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