Skip to content

Instantly share code, notes, and snippets.

View rootfs's full-sized avatar
🎯
Focusing

Huamin Chen rootfs

🎯
Focusing
View GitHub Profile

create minikube

The following create a minikube with 10 CPU cores and 32GB memory. This is for experiments with heavy workload.

It uses kvm hypervisor. Make sure the qemu and libvirt have already installed

minikube start --cpus 10 --memory 32GB --disk-size=400g --extra-disks=2 --driver=kvm2 --force --container-runtime cri-o

install prometheus and grafana

Environment

RHEL 8.4 4.18.0-305.19.1.el8_4.x86_64

Verify setup

lspci -nnv |grep -i nvidia

e.g.

@rootfs
rootfs / a2dp_sink_ubuntu_linux.md
Created September 24, 2023 18:42 — forked from joergschiller/a2dp_sink_ubuntu_linux.md
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink:

@rootfs
rootfs / _README.md
Created September 24, 2023 18:41 — forked from oleq/_README.md
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@rootfs
rootfs / Windows-qemu-KVM.10.xml
Created January 31, 2021 22:04
Windows 10 qemu/kvm optimizations CPU usage #virt-manager
<domain type="kvm">
<!-- https://www.reddit.com/r/VFIO/comments/80p1q7/high_kvmqemu_cpu_utilization_when_windows_10/ -->
<!-- https://github.com/duncanthrax/scream -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/PiMaker/Win10-VFIO -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/sk1080/nvidia-kvm-patcher -->
<!-- https://github.com/T-vK/MobilePassThrough -->
apiVersion: v1
kind: Namespace
metadata:
labels:
sustainable-computing.io/app: kepler
name: kepler
---
apiVersion: v1
kind: ServiceAccount
metadata:

test env

host

MacBook

% uname -a
Darwin xxx 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64

cluster

kind 1.27

Environment

Jetpack 4.6, Jetson Xavier, Ubuntu 18.04

prepare

apt install -y curl jq runc iptables conntrack nvidia-container-runtime nvidia-container-toolkit

crio

Install crio

main branch 5b9c91af68c8644911e0955639750004e803c41f

(pprof) top20 -cum (all)
Active filters:
   focus=(all)
Showing nodes accounting for 1.13s, 61.75% of 1.83s total
Showing top 20 nodes out of 186
      flat  flat%   sum%        cum   cum%
     0.85s 46.45% 46.45%      0.85s 46.45%  runtime.cgocall

Background

Using podman to start containerized microshift can ensure timely image update to pick up the latest Microshift release. Additionally, using crio service on host allows workload continunity during Microshift upgrade.

image

Start containerized microshift

podman run --privileged --ipc=host --network=host  \