There is Solaris 10 OS on our server, and I would like to make test on this server. For this test memory usage should be high.
So I wonder if there is an easy way to increase memory usage manually ?
|
|
The simplest way is to fill /tmp, assuming it is using tmpfs which is the default. Run To increase your (virtual) memory usage by 1 GB, run
release it with
|
|||||||||
|
|
This page should help you. Just small program in c:
Keep in mind that without giving the program a maximum amount of memory it'll allocate until it exhausts the amount it can (may be limited by ulimit, amount of memory, or size of address space). |
||||
|
|
|
The easiest way I know to fill memory is to make a program that allocates an array of strings (or arrays of any other type), if you need to keep the data in memory and not paged, you should scan the allocated memory periodically. I would add a long (perhaps controlled by a command line argument) sleep interval after the allocation. I would run several instances of the above program until I fill the desired amount of memory. |
|||
|
|
|
I have no idea if this works with Solaris, too - but since it is designed to run on Posix compliant systems you could give it a try: stress is a very "simple" stress-test generator, that can do all sorts of stress - creating memory hogs is part of it. I compiled/tested it so far on some Linux distributions (CentOS, SLES) without problems. |
|||
|
|