Skip to content

Instantly share code, notes, and snippets.

@dmcgowan
Last active October 25, 2017 00:39
Show Gist options
  • Save dmcgowan/66ded5c6acd9ccd03bb46e5ed1bbf44f to your computer and use it in GitHub Desktop.
Save dmcgowan/66ded5c6acd9ccd03bb46e5ed1bbf44f to your computer and use it in GitHub Desktop.
Containerd stress run script
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target
[Service]
ExecStartPre=/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd
Delegate=yes
KillMode=process
[Install]
WantedBy=multi-user.target
#!/bin/sh
# Run containerd stress tests using the provided containerd build tar
#
# Source at https://gist.github.com/dmcgowan/66ded5c6acd9ccd03bb46e5ed1bbf44f
#
# Builds can be obtained from https://github.com/containerd/containerd/releases
# Local builds can be used doing `make binaries && tar -czf localbuild.tgz bin`
#
# Notes:
# Builds are extracted into /usr/local/bin/ where systemd must be
# configured to use containerd from.
set -e
TARFILE=$1
if [ -z "$TARFILE" ]; then
echo "Tar file must be provided"
exit 1
fi
if [ ! -f $TARFILE ]; then
echo "Tar file does not exist"
exit 1
fi
systemctl stop containerd
rm -rf /var/lib/containerd
rm -rf /run/containerd
tar -xzf $TARFILE -C /usr/local
VERSION=$(containerd --version)
echo "Running $VERSION from $TARFILE"
systemctl start containerd
sleep 1
set -x
containerd-stress -d 2m -c 1
containerd-stress -d 2m -c 2
containerd-stress -d 2m -c 5
containerd-stress -d 2m -c 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment