Skip to content
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

Set k3s to use mysql as datastore, not etcd #66

Merged
merged 2 commits into from
May 30, 2024

Conversation

tyler-romero
Copy link
Member

@tyler-romero tyler-romero commented May 30, 2024

With this change, we can now run edge-inference (and k3s in general) on rpi4s with SD card storage. Etcd was too demanding of the SD card, making the k3s server unstable.

Some info:
It can run at 1.4frames/s (~0.7s/request) for this round-trip request:
0. Laptop issues request over wireless network to the rpi connected via ethernet on my desk (stays within local network)

  1. Edge inference w/ default edge model returns unconfident result
  2. Cloud inference returns confident result

Higher FPS is possible if:

  • Edge inference is confident most of the time

Higher FPS may be possible if:

  • An SSD is used instead of an SD card

Resource usage under load:
image

exec /bin/k3s server --server "${K3S_URL}" ${EXTRA_K3S_SERVER_ARGS:-}
else
# shellcheck disable=SC2086
exec /bin/k3s server --cluster-init ${EXTRA_K3S_SERVER_ARGS:-}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --cluster-init flag is what tells k3s to use etcd. This server.sh script I coopted from the balena-k3s repo is meant to allow users to setup multi-node clusters, but we dont care about doing that here.

@tyler-romero tyler-romero requested a review from robotrapta May 30, 2024 19:09
Copy link
Member

@robotrapta robotrapta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woot!

deploy/balena-k3s/server/server.sh Show resolved Hide resolved
@tyler-romero tyler-romero merged commit e4a256d into main May 30, 2024
5 of 6 checks passed
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.

2 participants