title: AWS, how high should I set memory limit?
body: <p>I'm running web service on EC2-small which has 2gig memory.</p>
  <p>It has <code>soft</code> and <code>hard</code> limit option.</p>
  <p>I had set <code>soft</code> limit to 1gig and my server kept crashing when load is high.</p>
  <p>Then I found the following SO post,
  <a href="https://stackoverflow.com/a/44764770/433570">AWS ECS Task Memory Hard and Soft Limits</a> says, it's better to use hard limit if I'm memory bound.</p>
  <p>So how high should I set my <code>hard</code> limit for my <code>2gig</code> memory EC2 machine?</p>
  <p>I want my EC2 don't crash and scale up with <code>auto scaling group</code> policy.</p>