I'm getting confused by swap
From the -l command, I see swap space is totally free, not allocated. But from -s command, there are about 10G of swap space is being allocated.
So how to read it.
Plus, when I run top command on the system, I got 0.0% swapping.
Thanks
Last edited by DukeNuke2; 03-20-2012 at 06:38 PM..
All memory is backed by swap whether it's needed right this moment or not. So the swap space isn't actually being used at present -- but if memory became short, everything already has preallocated locations in swap to get dumped into.
All memory is backed by swap whether it's needed right this moment or not. So the swap space isn't actually being used at present -- but if memory became short, everything already has preallocated locations in swap to get dumped into.
That used to be the way swap was handled with SunOS 4 but it is no more with Solaris 2 and newer. While it is still recommended to have some swap set, a swap area isn't technically required on Solaris.
---------- Post updated at 22:47 ---------- Previous update was at 22:25 ----------
Quote:
Originally Posted by redstone
I'm getting confused by swap
You need to know that swap means two different concepts here.
"swap -l" shows the size of the swap area, i.e. a dedicated storage area where the OS can paginate memory pages from/to RAM.
Your swap area size is 32 GiB and all free.
"swap -s" shows virtual memory statistics.
You virtual memory size is 34 GiB, this includes 32 GiB of swap area plus 2 GiB of RAM. The command tells 6.7 GiB are really allocated as reserved memory doesn't use RAM or swap.
There is then a contradiction between both of these commands.
Can you re-run both of these commands and post also the last lines of
and
commands.
Last edited by jlliagre; 03-21-2012 at 11:58 AM..
These 2 Users Gave Thanks to jlliagre For This Post:
Greetings!
Have a quick question for the community today; this time looking at a nifty little sed puzzle ;)
Consider the following file content to be worked through:What needs to happen is theblock should be removed up to and including the following blank line, leavingI have bits and pieces... (8 Replies)
Hi Solaris Folks :),
I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands.
$swap -s
total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available
$swap -l
swapfile dev swaplo... (6 Replies)
I have a simple sandbox program which runs a command as user "nobody" in a chroot jail. It sets resource limits with setrlimit, changes the user id with setuid, changes the root dir with chroot, and then calls exec to execute the command given as command line parameters. It is of course a... (8 Replies)
Hi, all,
I am writing a BST (Binary Search Tree).
What I am concerned about is
typedef struct BST{
struct BST *p_left;
struct BST *p_right;
void *p_data;
char *p_key;
unsigned int *length;
}BST;
I have to malloc some space for p_key.
How many of chars... (4 Replies)
It writes in Section 9.3 in Unix Network programming about SCTP:
"The sctp_bindx call can be used on a bound or unbound socket."
And then it writes:
"The port number in all the socket address structures must be the same and must match any port number that is already bound; if it doesn't, then... (0 Replies)
Hi
I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system:
- I would like to know when does the memory swap space spill over to the device swap space?
- And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Here is "escape puzzle" from real life task:
Conditions:
We need to create an alias which will
Save current directory path
Will ssh to particular server
Then will cd to saved path (it's mounted via NFS)
Then will find all files with name patter as "All*.bld" and run particular editor... (0 Replies)