{
"function_name": The serverless function's name,
"vendor": The cloud provider ("AWS" or "GCP" or "GCPv2"),
"region": The serverless function's region,
"payload": Payload to invoke the serverless function with (Required if "payloads" attribute is not provided),
"payloads": [
{
"payload": Payload to invoke the serverless function with (Required),
"weight": Impact of the exploration with this payload over the weighted average cost. (Required and Should be in [0, 1]),
}...
] (Required if "payload" attribute is not provided. Sum of weights must be equal to 1),
}
{
...
"memory_bounds": Array containing two memory values that represent the memory configuration bounds (Optional),
"termination_threshold": When the knowledge value for the optimal memory configuration reaches this threshold the recommendation algorithm terminates. (Optional, Default is 3),
"max_total_sample_count": The maximum size of the sample. (Optional, Default is 20),
"min_sample_per_config": The minimum number of invocations per iteration. (Optional, Default is 4, minimum is 2),
"dynamic_sampling_params": {
"max_sample_per_config": The maximum number of samples we gather through dynamically (Default is 8),
"coefficient_of_variation_threshold": When sample dynamically until we find a consistant enough. Consistency is measured by the coefficient of variation,
and when the calculated coefficient of variation reaches this threshold we terminate the dynamic sampling (Default is 0.05),
} (Optional),
"max_number_of_invocation_attempts": The maximum number of attempts per invocation when this number is reached an error is raised. (Optional, Default is 5)
"constraint_execution_time_threshold": The execution time threshold constraint. We leverages the execution time model to recommend a configuration
that minimizes cost while adhering to the specified execution time constraint. (Optional, Default is +infinity)
"constraint_cost_tolerance_percent": The cost tolerance window (in percent). We leverage the cost model to recommend a configuration that maximizes performance while
increasing the cost by at most X%, where X is the cost tolerance window . (Optional, Default is 0)
}
{
"function_name": "example_function",
"vendor": "AWS",
"region": "example_region",
"payload": "payload"
}
{
"function_name": "example_function",
"vendor": "AWS",
"region": "example_region",
"payloads": [
{
"payload": "payload",
"weight": 0.3
},
{
"payload": "payload",
"weight": 0.7
}
]
}
To generate the results in the paper, we used these parameters:
termination_threshold=2
min_invocations=2
dynamic_sampling_params.max_sample_count=5
{
"arn": The Amazon Resource Name (ARN) of the Step Function,
"region": The AWS region where the Step Function is deployed,
"payload": The input payload used to invoke the Step Function
"payloads": [
{
"payload": Payload to invoke the serverless function with (Required),
"weight": Impact of the exploration with this payload over the weighted average cost. (Required and Should be in [0, 1]),
}...
] (Required if "payload" attribute is not provided. Sum of weights must be equal to 1),
}
{
...
"termination_threshold": When the knowledge value for the optimal memory configuration reaches this threshold the recommendation algorithm terminates. (Optional, Default is 3),
"max_total_sample_count": The maximum size of the sample. (Optional, Default is 20),
"min_sample_per_config": The minimum number of invocations per iteration. (Optional, Default is 4, minimum is 2),
"dynamic_sampling_params": {
"max_sample_per_config": The maximum number of samples we gather through dynamically (Default is 8),
"coefficient_of_variation_threshold": When sample dynamically until we find a consistant enough. Consistency is measured by the coefficient of variation,
and when the calculated coefficient of variation reaches this threshold we terminate the dynamic sampling (Default is 0.05),
} (Optional),
"max_number_of_invocation_attempts": The maximum number of attempts per invocation when this number is reached an error is raised. (Optional, Default is 5)
"constraint_execution_time_threshold": The step function execution time threshold constraint. We leverages the execution time model and step function workflow structure
to recommend a configuration that minimizes cost while adhering to the specified execution time constraint. (Optional, Default is +infinity)
"memory_size_increment": The step size by which memory size is increased to meet execution time threshold. (Optional, Default is 10)
}
{
"arn": "example_step_function_arn",
"region": "example_region",
"payload": "payload",
"constraint_execution_time_threshold": 5000
}
Parrotfish now supports optimization for both CPU and memory configurations in GCP Cloud Functions V2. To enable this feature, use GCPv2
as vendor.
{
"function_name": "example_function_name",
"region": "example_region",
"vendor": "GCPv2",
"payload": "example_payload"
}