Help us understand the problem. What is going on with this article?

stressコマンドでメモリへの負荷をかける

stressコマンドインストール

curl -OL  http://ftp.riken.jp/Linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/stress-1.0.2-1.el7.rf.x86_64.rpm
rpm -ivh stress-1.0.2-1.el7.rf.x86_64.rpm

メモリへ負荷をかける

--vm-keepはメモリを解放せずにkeep。
オプションなしだと、いちいち解放するっぽい?

stress --vm 3 --vm-bytes 256M --vm-keep

AWSEC2の1GBインスタンス

上記コマンドだと、3つのプロセスが256MBを確保する。

image.png

4つ(物理メモリ以上)起動しようとしたら怒られた

stress: info: [8065] dispatching hogs: 0 cpu, 0 io, 4 vm, 0 hdd
stress: FAIL: [8065] (420) <-- worker 8068 got signal 9
stress: WARN: [8065] (422) now reaping child worker processes
stress: FAIL: [8065] (456) failed run completed in 2s
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away