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.


1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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