Skip to content

Custom VM requirements #17

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

Merged
merged 12 commits into from
Oct 9, 2023
Merged

Custom VM requirements #17

merged 12 commits into from
Oct 9, 2023

Conversation

dann1
Copy link
Collaborator

@dann1 dann1 commented Sep 28, 2023

Custom VM requirements implemented using oneflow vm_template_contents parameter in a merge_template option passed to the service_template create API Call.

{
  "SERVERLESS_RUNTIME": {
    "NAME": "Function_d5088846-fdb8-4ca8-a0b9-730464d61c75",
    "ID": 320,
    "FAAS": {
      "MEMORY": 133,
      "CPU": 0.33,
      "VCPU": 3,
      "DISK_SIZE": 1337,
      "FLAVOUR": "Function",
      "VM_ID": 231,
      "STATE": "ACTIVE",
      "ENDPOINT": "172.16.100.2"
    },
    "SCHEDULING": {
    },
    "DEVICE_INFO": {
    },
    "SERVICE_ID": 319
  }
}

Also added

  • VCPU support. Schema has been updated.
  • live resize support for VCPU and MEMORY using BALLOONING
    • if VCPU and MEMORY are specified within the Function VM requirements on the Serverless Runtime specification. Then the upper limit for resizing will be 2x. This multiplier is configurable on /etc/provision-engine/engine.conf within the :capacity section.
    • If no specification is provided, then a baseline VCPU and MEMORY are used as reference alongside the multipliers. These baselines are also configurable on the :capacity section.
# When custom VM requirements for a given function are not specified
# these values will be used to calculate the max resize values for VCPU and MEMORY
# upper limit = default * max 
:capacity:
  :max:
    :vcpu_mult: 2
    :memory_mult: 2
  :default:
    :vcpu: 2
    :memory: 1024

Live resize is needed in order to avoid downtime in case of a future update call issued to the serverless runtime instance where more resources are requested.

Closes #10

@dann1 dann1 requested a review from tinova September 28, 2023 23:13
@dann1 dann1 marked this pull request as ready for review October 9, 2023 02:09
@tinova tinova merged commit 2964865 into main Oct 9, 2023
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.

Serverless Runtime custom VM requirements
2 participants