...
Parallelization is actually the sweet spot that makes AI actions perform better than any other linear model, even when compared to a linear GPU processing. For example compare 500 parallel actions running on CPU that process a data input in 10 seconds each, vs 1 GPU action performing the same 500 operations sequentially, with each operation taking 1s. The GPU action produces a response in 500s, and while the 500 parallel actions return produce the response in 10s.
Proposal
...
Allow developers to "attach" a persistent disk to an action. The programming model in this case is the easiest one for developers: they can assume there's always a folder available on the disk on a well known path. The WSK CLI could look like in the example bellow:
...
When running the sequence my-sequence
, the Openwhisk scheduler can use the volume
information defined by each action, to schedule the actions requiring the same volume on the same host. When the read-asset
action starts, it creates a new volume that should be uniquely identified by . For instance the volume name
and the activationId
. ,
the namespace
of the subject invoking, and a UUID, could be used. I.e. my-action-volume--12hjgj45345hj4hseh234guest--<UUID>
. When action-1
starts, it mounts the same volume created previously, same for action-2
and write-asset
actions. Note that the sequence may have other actions that don't need the volume such as action-stateless;
in such cases the actions can be scheduled anywhere in the cluster, as per the existing scheduling mechanism.
The volume my-action-volume
is mounted inside each container on: ow-tmp/my-action-volume .
The programming model in this case is the easiest one for developers: they can assume there's always a folder available on the disk on a well known path.
The volume should be removed once the sequence completes its activations. If the sequence returns earlier with an error, the TBD When the volume should be removed too.
Open questions:
Should the developers specify a size for the volume, or assume a default for each volume ?
...