Skip to main content

LFX Mentorship 2026 Term 3 Recap

Author: HAMi Community
Published: 11/30/2026

LFX Mentorship 2026 Term 3 ended on November 27. All four HAMi mentees finished, with more than 70 merged pull requests across five repositories.

Who worked on what​

Applications opened in August and brought in 597 applications from 511 people. We picked one mentee per project, and the term ran 12 weeks from September 7.

ProjectMenteeMentorsUpstream issue
GPU Sharing Workshop and DocumentationJunhao Zou (@togettoyou)Jimmy Song, Reza Jelvehwebsite#656
Fix GPU Memory Isolation for Child and SSH ProcessesShivam Kumar (@maishivamhoo123)Mengxuan Li, Jimmy SongHAMi#2125
Reduce HAMi-core Initialization Lock ContentionAnshuman Agrawal (@iemAnshuman)Mengxuan Li, Shouren YangHAMi#1662
GPU Observability: Metrics and DashboardsThanh Loi Hoang (@loiht2)Mesut Oezdil, Reza Jelveh, Jimmy SongHAMi#2126

Each mentee's final review is in the linked issue. The quotes below come from there.

Junhao: a GPU sharing course and better docs​

Junhao was supposed to add a few hands-on labs. Then he read the existing ones:

The Tutorials section had many labs but no learning order. They were written by different authors on very different environments, they showed "how" but rarely "why".

He wanted to put a full course on the website. Mesut and Jimmy pushed back: the website is not a teaching platform, and its docs needed work first.

So he fixed the docs. He wrote the Concepts section, added a feature support matrix to Choose your setup with every cell checked against the source, and wrote setup guides for Tencent Cloud TKE, Alibaba Cloud ACK and Huawei Cloud CCE, each tested on the real platform.

The course then moved to hami-workshop. It has nine chapters, from a whole GPU per Pod to troubleshooting. He only had one T4 VM, so it runs on free Colab and in kind, and you do not need your own GPU.

The docs work also led him into the scheduler. scheduler.nodeLockExpire had never worked, and every Filter call deep-copied the whole Pod. Without that copy, a KWOK test with 128 nodes and 4,096 Pods showed:

MetricBeforeAfterChange
Throughput14.33 pod/s24.69 pod/s+72.2%
End-to-end P99862.4 ms396.8 ms−54.0%
Allocation per new Pod124.29 MiB9.49 MiB−92.4%

22 of his 23 pull requests are merged.

Shivam: memory limits for SSH and child processes​

HAMi used to pass GPU limits to HAMi-core only through environment variables. SSH, su -, sudo and cron start with a clean environment, so their processes could use the whole GPU.

Shivam reproduced it on an A16. He also found that the limit has to exist before the first process creates the shared region.

He wrote a design doc first, then the fix:

  • HAMi-core reads a limits file (HAMi-core#357)
  • The device plugin writes and mounts it (HAMi#3220)
  • limitDelivery switches back to environment variables per node or Pod (HAMi#3226)

It shipped in v2.11.0, on by default. On the A16, processes from kubectl exec, bash -c, su, su -, sudo, SSH and cron all stayed inside the Pod's 3000 MiB. The same held on an H100.

The code was merged by mid-term, so he spent the rest on e2e tests and the user guide. When his A16 cluster was shut down, Mesut's GPU credit covered the remaining tests.

Anshuman: faster HAMi-core startup​

When many processes started CUDA at once, each held a lock while it created a CUDA context and searched NVML for its host PID. They ran one by one, and startup took close to a minute.

On day one Anshuman sent his mentors a benchmark plan. His harness starts N processes together and records latency, CPU time and memory for each. The scripts and raw data are public.

After the design discussion in HAMi#2244, he added a host PID broker to the device plugin (HAMi#2417, design doc). It reads the caller's PID from SO_PEERCRED, so HAMi-core needs no CUDA context or NVML for it.

HAMi-core got the broker client and lazy context sizing (HAMi-core#354, HAMi-core#374). 64 processes on four A100s, p50 of four runs, builds from October 22:

Plain CUDAmain, broker offmain, broker onWith lazy sizing
cuInit2.79 s45.63 s21.07 s3.09 s
cuInit + first context20.31 s61.10 s65.85 s47.67 s

With lazy sizing, cuInit is only 0.3 s behind plain CUDA. A polling change in the utilization watcher then cut the first context to 27.15 s, and CPU time per process from 21.38 s to 7.25 s.

It did not start that way. At mid-term his first design was slower than main, 21.13 s against 13.89 s, and he reported it as it was. That result led to lazy sizing. His lesson: "To measure my own change before I argue for it."

Still open: tests beyond 64 processes and on a real Kubernetes node, and a docs page for the HAMi-core client.

Loi: metrics, dashboards, alerts and tracing​

Loi merged 30 pull requests, the most this term, and every code change came with tests.

He fixed the metrics first. HAMi-DRA names and labels now match HAMi, vGPUmonitor stops reporting finished Pods, and quota memory is scaled by memoryFactor. Duplicate metrics were deprecated, then removed.

Then he built on them:

  • Grafana panels for allocation, utilization, memory, quota and MIG
  • An alerting guide with seven alerts and a runbook for each
  • Six SLIs that use only HAMi's own metrics
  • OpenTelemetry tracing that shows Filter, Bind and Allocate for one GPU Pod as a single trace

The alerts were first meant as default chart rules. Those had been turned down before, since thresholds are product policy, so on Shouren Yang's suggestion he wrote a guide instead.

One miss: the allocation duration histogram passed every unit test, but on a real NVIDIA node every Pod got device_type="mixed". Mesut caught it in review. In Loi's words: "Since then I check the real /metrics on a lab cluster before opening a PR."

The fixes and deprecations are in v2.11.0, and the rest is on master for v2.12.0. He also ran tests for Reza's talk at Observability Summit Europe.

Next term​

Almost every mentee ran short of GPUs at some point. Next term we will have test hardware ready before it starts.

Thanks​

Thank you, Junhao, Shivam, Anshuman and Loi. All four want to keep working on HAMi, and we are glad to have them.

Thanks to the mentors Mengxuan Li, Jimmy Song, Shouren Yang, Mesut Oezdil and Reza Jelveh. All four mentees thanked Mesut by name, and he reviewed most of this term's pull requests.

Thanks also to @spencercjh, @maverick-woo, @CodeHotel and everyone else who joined the reviews, and to the Linux Foundation and CNCF for supporting LFX Mentorship.

Want to get involved? Start here:

CNCFHAMi is a CNCF Incubating project