8000 adding per-lambda memory limit files by guptadevagya · Pull Request #306 · open-lambda/open-lambda · GitHub
[go: up one dir, main page]

Skip to content

adding per-lambda memory limit files #306

8000 New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

guptadevagya
Copy link

I've tried implementing per-lambda memor 8000 y limits. This would allow a function to define its own memory limit via a memory_mb key in its ol.yaml file.

My changes are:

  • I added a MemoryMaxMB field to the LambdaConfig struct in src/common/lambdaConfig.go.
  • I updated the sandbox creation logic in src/worker/sandbox/sockPool.go to use this new value. If a per-lambda limit isn't set, it falls back to the global default as expected.

@@ -37,7 +37,8 @@ type CronTrigger struct {

// LambdaConfig defines the overall configuration for the lambda function.
type LambdaConfig struct {
Triggers Triggers `yaml:"triggers"` // List of HTTP triggers
Triggers Triggers `yaml:"triggers"`
MemoryMaxMB int `yaml:"memory_mb,omitempty"` // List of HTTP triggers
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment here seems to be misplaced

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
0