Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.