openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James W Dubee" <>
Subject Re: Controller Memory Pressure
Date Sat, 18 Nov 2017 19:47:19 GMT

Here's the related PR containing the action migration script:

From:	"James W Dubee" <>
Date:	11/17/2017 03:21 PM
Subject:	Controller Memory Pressure

Hello all,

In order to reduce the amount of memory used within the controller, we plan
to store action code as attachments in the associated CouchDB documents
instead of inlining the code directly in action documents. Doing so will
allow the controller to not fetch action code from the database when an
action is invoked. Code associated with actions can be fairly large or
there may be several thousands of actions being invoked at any given time
in a system. Given this situation, not fetching action code or storing it
in the cache when it is not needed will help prevent memory pressure on the

Currently only the code associated with Java actions is stored as document
attachments. For all of the other runtime kinds, action code is inlined in
the action document. Allowing all action code to be stored as attachments
will normalize how action code is saved amongst different runtime kinds.

The cost of fully supporting all action code as attachments is that
existing databases will have to be updated in order to migrate existing
actions to the new schema. We will provided a script that will assist in
the action schema migration process. While it is preferable from a
performance perspective to migrate existing databases, the controller will
still function as it does today with the old schema. In the event that an
existing database is not migrated, new or updated actions will still use
the new action schema.

James Dubee

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message