Skip to content

Instantly share code, notes, and snippets.

@haphan
Last active March 8, 2018 05:00
Show Gist options
  • Select an option

  • Save haphan/b4ee9a5f66f850db9af0a2baab94e7e7 to your computer and use it in GitHub Desktop.

Select an option

Save haphan/b4ee9a5f66f850db9af0a2baab94e7e7 to your computer and use it in GitHub Desktop.
Stress test new vm instance
#!/bin/bash
echo "vm.overcommit_memory=2" >> /etc/sysctl.conf
sysctl vm.overcommit_memory=2
apt update
apt-get -y install vnstat memtester stress stress-ng iperf
stress-ng -vm 7 -c 3 --vm-bytes 1G -t 1y --vm-method zero-one --metrics-brief --vm-hang 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment