Swap space in Solaris box

Hello Team,

By the way of introduction, I am new member in this forum and proud too :slight_smile:

Here is my questions:

In one of our Solaris Sparc v9 box, we are facing issues related to swap space. Our custom applications are using swap space even though physical memory is available.

From some of the forums what I read I understand, that in case of swap space Solaris behaves differently in comparison to other *NIX versions, like other OS tries to save/reserve swap space for future use and would be used only when physical memory is about to full or got full, whereas Solaris starts using the virtual memory (swap space) even though physical memory is not full.

My request you to please confirm if this understanding is correct, if yes are their any recommendations around this?

Thank you for your help

Rrgards
Piyush

Your understanding is partially incorrect unless you confuse usage and reservation, and/or confuse virtual memory and swap area.

Solaris doesn't use (i.e. doesn't paginate from/to) the swap area if enough free RAM is available for all used memory to fit in it.

However, unlike Linux which overcommits memory, Solaris requires memory allocation to be backed by either free RAM or free swap area space.

Thank you for replying.

So from the last statement, I understand that the memory allocation can be done wither on free RAM or on free swap space available.Please correct me if I have understood it wrong.

Because as I said in the problem statement, our application is eating up swap space though free RAM is available. In general memory usage is only 30-35%.

Thanks
Piyush

You can have free but unusable RAM if your swap area is too small.

Please provide some concrete numbers to understand better the issue, if any.

swap -l
swap -s
echo ::memstat | mdb -k
vmstat 2 2
prstat -Z