vmstat and top shows wrong free memory ?
I have installed "top" to monitor memory usage (Solaris 10 10/09 s10s_u8wos_08a SPARC).
It shows, more or less, this same what vmstat. Free memory = 5580M Code:
Memory: 2048M phys mem, 5580M free mem, 1024M total swap, 958M free swap Code:
vmstat 1 3 Please note that: Physical Memory: 2048M Total Swap: 1024M So how is that possible i see: 5580M free mem ? |
What return these commands:
Code:
prstat -c -n 5 -Z 1 1 |
Here you go: (executed on logical zone)
Code:
bash-3.00# prstat -c -n 5 -Z 1 1 Code:
bash-3.00# swap -s Code:
bash-3.00# swap -l |
Your zone is possibly set with memory capping.
|
memory capping - so memory should be limited ?
How can I see what is the size of all memory on logical zone ? Here is what I see on global zone for logical zone: Code:
[root@host /]# zonecfg -z probe1 info |
Quote:
Quote:
RAM installed ? Virtual Memory available to the zone ? Something else ? |
Quote:
In my config: physical: 2G swap: 1G What I see on logical zone is: Physical Memory: 2048M Total Swap: 1024M but Free Memory is: 5580M - that is impossible ! All I need is to know what free memory is for real. |
What is the free memory value you are interested in ?
Having the zone set with less swap (ie VM) than RAM doesn't make much sense in my opinion. |
OK, let me introduce my problem in other way:
1. Total Memory (Swap and Physical) on local zone is: physical: 2G swap: 1G Assuming Total avalible memory = phisical + swap 2 + 1 = 3 Gb 2. If above is true, how is that possible that top and vmstat show Free Memory above 5 Gb ? It should be below 3 Gb. |
The above is false. Virtual Memory includes Physical Memory so swap should be equal to or larger than physical.
|
Nevertheless it shouldnt indicate 5Gb of free memory... but it does.
How to display correct free memory ? |
Why wouldn't it ? vmstat values are correct, as far as the kernel is concerned.
|
Come on Jlliagre, how can it be ?
If physical is 2Gb and Swap 1Gb then free mem shouldnt be/cant be greater than 3 Gb. (In fact it shows more than 5 Gb). Can you please explain me this/what im reading wrong ? |
I already did but you failed to read/understand it.
Physical and swap do not add. You have capped the memory for the zone to 1 GB, not 3GB, your 2GB physical capping is pointless. The kernel isn't subject to memory capping so reports it has 5 GB free. With OS level virtualization, there is a single kernel shared by all zones. |
Ok, now I think I got it.
So the local zone reports free memory which in fact free memory of global zone. If I understand you correctly: to read correct value of free memory on local zone I should enlarge swap (to 2 GB or more) for that logical zone ? Is this right ? |
All times are GMT -5. The time now is 10:53 PM. |