How to stop running out of memory when working on your server

It’s a fairly simple thing to do, but I have seen a lot of people drive their servers really far into swap and kill performance due to an administrative action they are performing in the shell. Just open up another terminal on your server and run:

# watch free -m

This is pretty useful if you’ve not got much free memory to play with and you’re installing a gem, using irb or syncing portage or whatever and as long as you keep an eye on it you can terminate your process if it starts to eat too far into swap.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s