Skip to content

Commit 7d5b30b

Browse files
committed
Add right-sizing to tasks
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 4454e38 commit 7d5b30b

File tree

6 files changed

+72
-5
lines changed

6 files changed

+72
-5
lines changed

docs/tasks/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Actuated CLI
1+
# Task: Manage Actuated via CLI
22

33
Monitor Actuated runners and jobs from the command line.
44

docs/tasks/debug-ssh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example: Debug a job with SSH
1+
# Task: Debug a job with SSH
22

33
If your it's included within your actuated plan, then you can get a shell into any self-hosted runner - including GitHub's own hosted runners.
44

docs/tasks/local-github-cache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Run a local GitHub Cache
1+
# Task: Run a local GitHub Cache
22

33
The cache for GitHub Actions can speed up CI/CD pipelines. Hosted runners are placed close to the cache which means the latency is very low. Self-hosted runners can also make good use of this cache. Just like caching container images on the host in [a registry mirror](/tasks/registry-mirror/), you can also get a speed boost over the hosted cache by running your own cache directly on the host.
44

docs/tasks/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monitoring
1+
# Task: Monitoring Actuated
22

33
!!! info "Our team monitors actuated around the clock, on your behalf"
44
The actuated team proactively monitors your servers and build queue for issues. We remediate them on your behalf and for anything cannot be fixed remotely, we'll be in touch via Slack or email.

docs/tasks/registry-mirror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example: Set up a registry mirror
1+
# Task: Set up a registry mirror
22

33
Use-cases:
44

docs/tasks/right-sizing-vm.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Task: Right size a VM by profiling a job
2+
3+
Use-cases:
4+
5+
* Reduce costs by using smaller VMs that fit the workload better
6+
* Increase density by running more jobs on the same hardware
7+
* Improve performance bottlenecks by adding more resources when needed
8+
9+
In the blog post [Right sizing VMs for GitHub Actions](https://actuated.com/blog/right-sizing-vms-github-actions), we introduce the need for profiling (or metering) a running job in order to make sure the VM is the right size for the workload.
10+
11+
A range of metrics are collected in addition to the standard ones like CPU & RAM consumption, vmmeter also shows contention on I/O, whether a job is running out of disk apce, and how many open files are in use. Non-obvious metrics like entropy and I/O contention are also collected, which can also be linked to degraded performance.
12+
13+
## Try it out
14+
15+
Add the following to the top of your worklflow:
16+
17+
```yaml
18+
steps:
19+
# vmmeter start
20+
- uses: alexellis/setup-arkade@master
21+
- uses: self-actuated/vmmeter-action@master
22+
# vmmeter end
23+
```
24+
25+
The `vmmeter-action` will run in the background and collect metrics about the job. Its *Post run action* will collect the metrics and upload them to the job's summary.
26+
27+
Here is an example from building a Linux Kernel:
28+
29+
```bash
30+
Total RAM: 61.2GB
31+
Total vCPU: 32
32+
Load averages:
33+
Max 1 min: 5.76 (18.00%)
34+
Max 5 min: 1.34 (4.19%)
35+
Max 15 min: 0.44 (1.38%)
36+
37+
38+
RAM usage (10 samples):
39+
Max RAM usage: 2.348GB
40+
41+
42+
Max 10s avg RAM usage: 1.788GB
43+
Max 1 min avg RAM usage: 1.233GB
44+
Max 5 min avg RAM usage: 1.233GB
45+
46+
47+
Disk read: 405.4MB
48+
Disk write: 469.6MB
49+
Max disk I/O inflight: 0
50+
Free: 45.16GB Used: 4.66GB (Total: 52.52GB)
51+
52+
53+
Egress adapter RX: 275.6MB
54+
Egress adapter TX: 1.341MB
55+
56+
57+
Entropy min: 256
58+
Entropy max: 256
59+
60+
61+
Max open connections: 23
62+
Max open files: 1856
63+
Processes since boot: 19819
64+
65+
66+
Run time: 47s
67+
```

0 commit comments

Comments
 (0)