Skip to content

Building support for local deployment#142

Open
Rajiv2605 wants to merge 3 commits intospcl:masterfrom
Rajiv2605:master
Open

Building support for local deployment#142
Rajiv2605 wants to merge 3 commits intospcl:masterfrom
Rajiv2605:master

Conversation

@Rajiv2605
Copy link
Copy Markdown

@mcopik This is the PR related to issue #119 . The perf-cost experiment gives the following output now:

14:15:13,285 INFO Experiment.PerfCost-1013: Begin cold experiments
14:15:20,462 INFO Experiment.PerfCost-1013: Processed 0 warm-up samples, ignoring these results.
14:15:30,505 INFO Experiment.PerfCost-1013: Invocation 6638ab55-36a5-49dd-acd8-d6371336ad42 is not cold!
14:15:30,507 INFO Experiment.PerfCost-1013: Invocation 724b9370-8b4c-4942-8db0-df2ebd070dc7 is not cold!
14:15:30,509 INFO Experiment.PerfCost-1013: Invocation f228f076-bcc4-4257-87e7-3c10a00d104b is not cold!

It continues to loop like this.

Comment thread sebs/experiments/perf_cost.py Outdated
settings["benchmark"], deployment_client, self.config
)
self._function = deployment_client.get_function(self._benchmark)
self._functions = deployment_client.get_function(self._benchmark, 3)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The allocation of multiple function instances should happen in the deployment.

For example, AWS/GCP/Azure will create instances for us automatically. In Local, you need to allocate them as requested by spawning more Docker containers hosting the function.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Furthermore, the number 3 should not be hardcoded anywhere.

Copy link
Copy Markdown
Author

@Rajiv2605 Rajiv2605 Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I had done this for testing purpose but missed to remove it before pushing. I will remove it.

Comment thread sebs/experiments/perf_cost.py Outdated
self._benchmark_input = self._benchmark.prepare_input(
storage=self._storage, size=settings["input-size"]
)
for i in range(len(self._functions)):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above - we should have one function instance, and the Local instance and its triggers will allocate many Docker containers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this seems more complex than anticipated since cloud platforms expose an HTTP trigger, and the local deployment would have a different HTTP address for each instance. We don't want to have to change every experiment - we want to hide this complexity behind the trigger.

The simplest solution would be to implement a new sebs.Local.ScalableHTTPTrigger (or something similar) that would allocate/deallocate container instances, and redirect invocations to the proper HTTPTrigger.

Comment thread sebs/faas/system.py Outdated

@abstractmethod
def create_function(self, code_package: Benchmark, func_name: str) -> Function:
def create_function(self, code_package: Benchmark, func_name: str, num: int) -> Function:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change this API

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had added the num parameter to know how many containers to dispatch.

Comment thread sebs/local/function.py Outdated
)
except docker.errors.NotFound:
raise RuntimeError(f"Cached container {instance_id} not available anymore!")
# clear cache
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants