Dear all,
Kindly need your advice on swap issue on my container, SunOS 5.10.
We have allocated swap 20GB and memory 8 GB. We have some application installed on the container.
A few days ago we experienced a very slow system response...even for command like ls, df -k, etc..
I tried to display history of virtual memory status since start-up and got the following output, it seems that the swap doesn't work.
vmstat -s
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
etc...
Any advice will be helpful. Thanks.
Swapping has been deprecated since ages with Solaris. It is replaced by demand paging unless severe RAM demand occurs.
Hi, the thing is in the global zone, there are value for those parameter. How do I solve my problem then (without add RAM)?
The zone RAM or VM might have been capped. Can you post its configuration ? What says "dmesg" in the global and non-global zones ?
What say, in the global zone,:
swap -s
swap -l
vmstat 2 2
There are 2 times we experienced slow system response. The first day has no log in dmesg, the second day
The dmesg of global zone is showing file system full, we deleted some unnecessary files. And there are others message as below:
genunix: [ID 936769 kern.info] devinfo0 is /pseudo/devinfo@0
explorer: [ID 702911 daemon.notice] Explorer started
pseudo: [ID 129642 kern.info] pseudo-device: lockstat0
genunix: [ID 936769 kern.info] lockstat0 is /pseudo/lockstat@0
pseudo: [ID 129642 kern.info] pseudo-device: fbt0
genunix: [ID 936769 kern.info] fbt0 is /pseudo/fbt@0
Global zone:
swap -s
total: 21534888k bytes allocated + 7251168k reserved = 28786056k used, 8948352k available
swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d2 85,2 16 52447088 23295984
vmstat 2 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m1 m2 m3 m4 in sy cs us sy id
0 0 64 9881880 1113080 1212 374 9509 150 185 0 345 0 18 0 0 2090 12336 2977 5 2 93
0 1 149 8944336 935992 154 91 5231 0 0 0 0 202 1 0 0 1788 4952 2002 13 0 86
Container:
swap -s
total: 21538816k bytes allocated + 7251072k reserved = 28789888k used, 8944480k available
swap -l
swapfile dev swaplo blocks free
/dev/swap 0,0 16 52447088 23296272
vmstat 2 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m1 m2 m3 m4 in sy cs us sy id
0 0 64 9881848 1113072 20 45 268 5 5 0 0 0 18 0 0 625 1634 554 1 0 99
0 0 149 8944096 871864 2 49 27 0 0 0 0 0 0 0 0 897 4017 1181 2 0 98
Thanks for your help.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
Thank You.
The UNIX and Linux Forums
Depends on Solaris 10 release, I think that since release 5 is possible to configure swap values directly in zone configuration via
add capped-memory
sub command in
zonecfg
If you have once configured values for shared memory, capped memory, amount of swap you can dynamically change values for running zone via
prctl -n zone.max-swap -v 2g -t privileged -r -e deny -i zone myzone
Thanks Brussel,
We're already used cap-memory. Already set the max swap & locked as bellow output.
dedicated-cpu:
ncpus: 8
capped-memory:
physical: 8G
[swap: 16G]
[locked: 8G]
rctl:
name: zone.max-swap
value: (priv=privileged,limit=17179869184,action=deny)
rctl:
name: zone.max-locked-memory
value: (priv=privileged,limit=8589934592,action=deny)
The problem is the container somehow cannot used the allocated swap for itself when the memory is fulled. The output of vmstat 5 show 0 value for po column. Any further suggestion? Thanks
You should monitor what "prstat -Z" outputs to figure out what physical and virtual memory resources the zones are actually using.
To view what the resource capping daemon is doing, use this command:
rcapstat -z