Skip to content

Conversation

@pykello
Copy link
Contributor

@pykello pykello commented Nov 5, 2024

No description provided.

macieksarnowicz and others added 4 commits November 5, 2024 06:53
This is a hacked together quick demo of burstable instances. With this code changes you get the following:
- when creating a Standard-4 instance it gets placed in a dedicated and resource-constrained slice, with 4 vCPUs
- when creating a Stanard-2 instance it is created as a burstable 1 vCPU + 1 vCPU instance, running in a 2 vCPU slice. Multiple of those instances will get placed into the same slice.

The allocator logic is hacked to allow us to overbook the host a bit, but it will work only to some point. More work is needed on this.
When you create burstable instances, run
    systemctl status burstable.slice
to see how this is setup.
The resouce limits can be see under
    /sys/fs/cgroup/burstable.slice
Adding more logic on Control Plane to help with creating of VMs inside slices. Also introduced new families and VM configurations to help with experimentation.
- two new families added: 'burstable' and 'sharable'. Both get created in an isolated slice called like the family. Allowed sizes are -50 and -100 which mean 50% or 100% vCPU, respectively. Burstable instances can go up another 50% or 100%.
- iniital slice allocation and tracking at VmHost level, this will need to be changed later
- cleaned up some earlier hardcoded values on Data Plane side
- temporarily turned off CPU accounting on VmHost/Allocator to allow for overcommiting

With this, new instances can be created with:
Prog::Vm::Nexus.assemble(File.read("/home/maciek/.ssh/id_ed25519.pub"), Project.first.id, name: "r2d2", size: "burstable-50", location: "hetzner-fsn1", enable_ip4: true, boot_image: "ubuntu-jammy")
Adding a new script for running stress-ng workload on one or more VMs and collecting statistics from the run.
Usage:
./stress_up <vm1> <vm2> ... - run the load test on one or more VMs listed. All VMs need to be on the same host.
./stress_up - run the load on all available VMs. All VMs need to be on the same host.

The load is run through stress-ng utility, which needs to be installed already on the VM.

This is likely not the best place for this script, but I wanted to check it in somewhere. I will likely change it be part of rack command.
@pykello pykello closed this Feb 21, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants