Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am doing server testing and intentionally trying to crash a virtual Solaris server by using all memory. Server has a ulimit of 15 GB (several hundred GB of total system/swap memory). Is there a straight forward way of doing this using a shell/Perl script? (This is in a hardened/secured environment so the only accessable tool is Perl [and shell of course]).

Background: What is actually being tested is failover of essential processes to another server. Lately we have been having a number of processes "go out of control" and consume all system resources thus causing server to crash (separate issue). I am trying to create a simple repeatable scenario to test the response to this situation.

share|improve this question
To avoid crossposting, see my answer here: stackoverflow.com/questions/13806990/… – jlliagre Dec 11 '12 at 6:33
What does ulimit -aH tell you? – Charles Stewart Dec 11 '12 at 9:04

jlliagre answered the question. And posted a link to a good answer. Credit him, not me.

When you write to /tmp, in Solaris only - you are writing to RAM not to disk. This is why writes to /tmp files go super fast. Once RAM fills up the system will come to a crawl. If you completely fill /tmp, then writews to /tmp will attempt to write to swap, and eventually the system falls over. This approach bypasses ulimit for memory. Be sure you do not have a max file size specified:

ulimit -a
file(blocks)         unlimited
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.