Command to fresh the memory !

Command to fresh the memory !

Some time during some load on the AIX system memory will get hang and will not respond for any new process.

Can you please helper me with command to fresh the memory to avoid that hanging on the memory.

First of all - what you describe is called forking and it should not happen if you have sufficient memory + pagingspace in your box and lru_file_repage is switched off. If it happens frequently, you very likely have insufficient memory in your box or some memory leaks.
Please check your avm value (what is shown in 4k pages!!) with the vmstat command - a healthy box is somewhere around 80% of physical memory. If you're dramatically exceeding it, you simply need to add physical memory or reduce the consumtion.
Check with vmo command the value of lru_file_repage - if its set to 0, than your system rarely uses pagingspace (as long as you have enough physical memory) and your system should not fork at all.
As far as I know, the only fast and reliable way apart from killing the top memory consuming processes (what is sometimes not possible because it would require to start a new process what's usually not possible when your box is really forking/inresponsive) to refresh memory is to reboot the box.
If it's possible that you're out of memory because i.e. a crashed database did not free up its shared memory, you can give it a try using ipcrm on the misallocated shared memory segments - but be careful that you don't do it on shared memory actually in use. And as stated before - this only works if you have enough free memory to start a new process. So you need to give it again and again a try until it works.
Hope that helps,
kind regards
zxmaus

You might probably be interested to read this thread where we have gone through the motions of tuning a system. Perhaps not everything will apply to your problem, but some of it will probably.

I hope this helps.

bakunin

I came today across an undocumented command that might do what you want if you have bos.perf.tools installed - but I would be very careful doing this EVER on a production system: /usr/lib/perf/crush

It basically tells the VMM's page stealer to switch to an "aggressive" mode that may end up freeing pages that applications have not touched in a while.

usage:

/usr/lib/perf/crush <integer>

you calculate the integer using output from 'svmon -G' : memory size total - memory pinned = <integer>

Rumor has it that it was developed for internal IBM use to clean memory pages before running benchmark applications.

Your applications might slow down for a moment but you will see a much bigger free list afterwards.

Kind regards
zxmaus