You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/02/28 06:38:42 UTC

[GitHub] sven-lange-last commented on issue #104: Dynamically setting the memory limit of the Nodejs VM

sven-lange-last commented on issue #104: Dynamically setting the memory limit of the Nodejs VM
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/104#issuecomment-468156263
 
 
   Well, Docker action containers are only limited with respect to physical memory - there is no limit for virtual memory. If the memory limit is at 256 MiB, all processes in the container must not consume more than 256 MiB in total (including buffers, caches, shared memory, ...). At the same time, the total virtual memory usage can be much higher than 256 MiB as long as 256 MiB physical memory are sufficient.
   
   Your proposal most likely restricts the virtual memory of the Node.js heap. When using improper values, Node.js will be restricted to less virtual memory than it may use today.
   
   At the same time, behaviour changes.
   * Today, the Linux out-of-memory kill will stop the largest memory consuming process in the container if the physical memory limit is exceeded.
   * With your proposal (I guess this was your intention), creating new objects within your Node.js action will fail if the virtual memory limit of the heap is exceeded. The action code needs to deal with this problem - but the action container will continue to run.
      If an out-of-memory situation in the Node.js process leads to the inability of the runtime to respond to the invoker process, we currently have no detection of the oom situation. The invoker would just stop the action container after timeout. The situation would be slightly better if the Node.js process broke due to internal oom.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services