Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Zone RAM usage: vmstat, prstat? I'm quite confused

89 views
Skip to first unread message

the_dwarf

unread,
Nov 12, 2015, 4:44:07 AM11/12/15
to
Hi all,
I have some zones running on a 5.10 box. I need to understand how can I know how much RAM is using each zone. For example, this zone has this cap:

zone1
capped-memory:
physical: 65G
[swap: 100G]

now, if I use the prstat -Z grepping the zonename, I have this:

ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
1 500 28G 28G 5,6% 1176:30:0 1,9% zone1
1 499 28G 28G 5,6% 1176:30:1 1,8% zone1
1 499 28G 28G 5,6% 1176:30:2 1,8% zone

so, if I understand correctly, it's using 28G of RAM, so 65G-28G=37G.

Now, from the vmstat, I have this:

kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s6 s8 s1 s1 in sy cs us sy id
2 1 0 514724224 306168416 1702 3205 2942 0 0 0 0 8 1 8 1 13420 69229 16954 19 4 76
0 0 0 506094624 284604120 1409 1457 4828 0 0 0 0 0 0 1 0 14858 97266 19925 16 4 81
0 0 0 506186344 284651400 1845 2813 5112 0 0 0 0 22 0 23 0 13664 127714 17343 13 6 81

284G free? I'm quite clueless.
Any way to help me on how understand in a reliable way how much RAM my zone is using my zone?
Thanks!

Andrew Gabriel

unread,
Nov 12, 2015, 3:55:13 PM11/12/15
to
In article <d02a8553-ab9d-406a...@googlegroups.com>,
the_dwarf <diego....@gmail.com> writes:
> Hi all,
> I have some zones running on a 5.10 box. I need to understand how can I know how much RAM is using each zone.

This got significantly improved at some point. I can't remember when,
but it might well have been Solaris 11.

> For example, this zone has this cap:
>
> zone1
> capped-memory:
> physical: 65G
> [swap: 100G]
>
> now, if I use the prstat -Z grepping the zonename, I have this:
>
> ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
> 1 500 28G 28G 5,6% 1176:30:0 1,9% zone1
> 1 499 28G 28G 5,6% 1176:30:1 1,8% zone1
> 1 499 28G 28G 5,6% 1176:30:2 1,8% zone
>
> so, if I understand correctly, it's using 28G of RAM, so 65G-28G=37G.
>
> Now, from the vmstat, I have this:
>
> kthr memory page disk faults cpu
> r b w swap free re mf pi po fr de sr s6 s8 s1 s1 in sy cs us sy id
> 2 1 0 514724224 306168416 1702 3205 2942 0 0 0 0 8 1 8 1 13420 69229 16954 19 4 76
> 0 0 0 506094624 284604120 1409 1457 4828 0 0 0 0 0 0 1 0 14858 97266 19925 16 4 81
> 0 0 0 506186344 284651400 1845 2813 5112 0 0 0 0 22 0 23 0 13664 127714 17343 13 6 81
>
> 284G free? I'm quite clueless.

I don't think vmstat is per-zone, at least not back then.

> Any way to help me on how understand in a reliable way how much RAM my zone is using my zone?

prstat -Z

By the way, capping physical memory in a Solaris zone tends to work
very badly. Over allocation will still work, but cause the Zone to swap
like mad, severely impacting the rest of the system. By default, rcapd
looks too infrequently to prevent a zone from grabbing all the memory,
and if you change its scan period to 1 second, it can use a lot of CPU.

On the other hand, capping swap will cause allocations to be failed
when you try and go over limit, limiting the impact to just the Zone,
rather than half killing the rest of the system. This is almost always
better.

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
0 new messages