dubeejw commented on issue #2730: Reduce memory consumption for action 
invocation
URL: 
https://github.com/apache/incubator-openwhisk/pull/2730#issuecomment-332299004
 
 
   Profiling of action invocations using the changes provided in this PR and 
without these changes. The action is a 34 MB zipped Node action. 
   
   With WhiskActionMetadata changes:
   <img width="509" alt="screen shot 2017-09-26 at 2 46 09 pm" 
src="https://user-images.githubusercontent.com/11520887/30878095-c7623960-a2c9-11e7-9cc0-f17af3120f67.png";>
   
   Without WhiskActionMetadata changes:
   <img width="506" alt="screen shot 2017-09-26 at 3 19 09 pm" 
src="https://user-images.githubusercontent.com/11520887/30879947-fd223fa0-a2ce-11e7-88fe-39fa5ee24ff4.png";>
   
   First action invocation is a cache miss causing the controller to fetch the 
action from the DB. This means the code associated with the action is 
downloaded into the controller causing a spike in the used heap. Garbage 
collection is then performed to lower the used heap. The same action is then 
invoked three times without the previous heap increase since the action is now 
cached, which does not cause a fetch from the DB.
   
   Differences in the above graphs can been seen after garbage collection is 
performed. The non-modified controller contains a cache of the action's zip 
file causing that controller to consume more heap space than the modified 
controller.
   
   In order to avoid the large spike in heap usage incurred during a cache 
miss. We will need to turn the action code into a DB attachment, and only fetch 
that attachment when absolutely necessary.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to