Sponsored Content
Operating Systems Solaris How to find memory size on solaris zone Post 302278886 by incredible on Wednesday 21st of January 2009 11:14:11 AM
Old 01-21-2009
The amount of physical memory that a Zone uses cannot be constrained as it stands now, but Sun is working on a feature that will address this issue soon
however you can configure capped mem it like this:

zonecfg:my-zone> add capped-memory
zonecfg:zone:capped-memory> set physical=50m
zonecfg:zone:capped-memory> set swap=100m
zonecfg:zone:capped-memory> set locked=30m
zonecfg:zone:capped-memory> end

To change the max-swap resource do the following:

# prctl -n zone.max-swap -r -v 200M `pgrep -z <zone> init`To change the max-locked-memory resource do the following:

# prctl -n zone.max-locked-memory -r -v 100M `pgrep -z <zone> init`Changing the physical memory capping is a little different, you'll need to use the rcapadm command:

# rcapadm -z <zone> -m 100M

Later you can verify using
# zonecfg -z <zone>
 

9 More Discussions You Might Find Interesting

1. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

2. Solaris

Memory usuage per zone in solaris

Hello all, How can i find the memory usuage per zone in solaris. (5 Replies)
Discussion started by: sophos
5 Replies

3. HP-UX

how to find size of memory allocated to a pointer?

Hi, Am new to HP UX , is there a way to find out the size of memory allocated to a pointer on hp ux? For example we can use the _msize() on windows to find the size of memory allocated to a pointer . #include <stdio.h> #include <malloc.h> void main() { void *buffer; ... (0 Replies)
Discussion started by: Wkdunreal
0 Replies

4. Solaris

restrcit physical memory with zone.max-locked-memory

Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies

5. Solaris

Memory usage, free and used, using sar, top and vmstat in Solaris zone/container

Hi all, I have a server running an Oracle database that is part of a Solaris M5000 container. Presumably this is referred to as a zone within a cluster, not sure if I get the terminology right. Anyway, a third-party manages the zone and unfortunately is not "helpful/friendly" to assist me on... (1 Reply)
Discussion started by: newbie_01
1 Replies

6. UNIX for Advanced & Expert Users

Solaris 10: I forgot to detach a zone before zpool export. Uninstall zone?

Dear all, recently, I migrated a solaris zone from one host to another. The zone was inside of a zpool. The zpool cotains two volumes. I did the following: host1: $ zlogin zone1 shutdown -y -g0 -i0 #Zone status changes from running to installed $ zpool export zone1 host2: $ zpool... (2 Replies)
Discussion started by: custos
2 Replies

7. Solaris

Solaris 11 Global zone patching having Solaris 10 branded zone

I am planning to do solaris 11 global zone patching having solaris 10 branded zone. I have a doubts on step 8 specially Can someone clear my step 8 doubts or if anything wrong between step 1 to step 9 please correct that also as I have pretty good idea about Step 10 mean patching in solaris 10... (2 Replies)
Discussion started by: amity
2 Replies

8. Solaris

Increase /tmp file system size dynamically in Solaris zone

Hi Please let me know how to increase the size of /tmp file system from 512m to 1024m dynamically without reboot in solaris zone # df -h Filesystem size used avail capacity Mounted on zones/zone1 11G 1.0G 10.0G 10% / /dev 11G 1.0G ... (6 Replies)
Discussion started by: sb200
6 Replies

9. Solaris

How to change pset.size value in processor set in Solaris zone?

Hi I have a pool name yuk-pool and its associated pset is yuk-pset. It has a min value is 20 and max value is 56. But size field has 48 value . This same pool is assign to 4 local zones. Whenever Cpu usage is high on one local zone it impact the cpu usage at other local zone as well during high... (1 Reply)
Discussion started by: sb200
1 Replies
rcapadm(1M)						  System Administration Commands					       rcapadm(1M)

NAME
rcapadm - configure resource capping daemon SYNOPSIS
rcapadm rcapadm [ [-n] -E | -D] [-i interval=value,...,interval=value] [-c percent] [-z zonename -m maxvalue] DESCRIPTION
The rcapadm command allows a user with the privileges described below to configure various attributes of the resource capping daemon. If used without arguments, rcapadm displays the current status of the resource capping daemon if it has been configured. See rcapd(1M) for more information. In the current release of the Solaris operating environment, rcapadm is available to users with all privileges and to users who have the Process Management profile in their list of profiles. The System Administrator role includes the Process Management profile. OPTIONS
-c percent Set the minimum physical memory utilization for memory cap enforcement. Caps will not be enforced until the physical memory available to processes is low. The percent value should be in the range 0 to 100. The minimum (and default) value is 0, which means that memory caps are always enforced. -D Disable the resource capping daemon so that it will not be started when the system is booted. Also stop the resource capping daemon now, if the -n option is not specified and it is currently running. -E Enable the resource capping daemon so that it will be started each time the system is booted. Also start the resource capping daemon now, if the -n option is not specified and it is not currently running. -i interval=value,...,interval=value Set intervals for various periodic operations performed by rcapd. All intervals are specified in seconds. You can set the following intervals: scan The interval at which rcapd scans for new processes. The default scan interval is every 15 seconds. The minimum value is 1 second. sample The interval of process resident set size sampling. The default sample interval is every 5 seconds. The minimum value is 1 second. report The interval at which various paging statistics are updated by rcapd, in seconds. These statistics can be viewed by using rcapstat(1SRM). The default reporting interval is every 5 seconds. When the interval is set to 0, statistics will not be updated. Note - Paging refers to the act of relocating portions of memory, called pages, to or from physical memory. rcapd pages out the most infrequently used pages. config The reconfiguration interval, in seconds. At each reconfiguration event, rcapd checks its configuration file for updates, and scans the project databases for new project caps. The default reconfiguration interval is every 60 seconds. The minimum interval is 0. When the interval is set to 0, no periodic reconfiguration occurs, although the running daemon can still be reconfigured by sending it SIGHUP. -m maxvalue Used in conjunction with the -z option. Specifies a value for rcap.max-rss, a dynamically-set cap on the usage of physical memory for the zone specified by -z. You can apply a scale (K, M, G, T) to the value you specify. K means kilobyte; M, megabyte; G, gigabyte; and T, terabyte. For example, 100M is 100 megabytes. -n Do not affect the running state of the resource capping daemon when enabling or disabling it. -z zonename Used in conjunction with the -m option. Specifies the zone for which you are dynamically specifying a cap on physical memory usage (using -m). Note - To set a persistent cap on memory usage within a zone, use zonecfg(1M). EXAMPLES
Example 1 Configuring the Resource Capping Daemon with Immediate Enforcement # rcapadm -E -i scan=15,sample=5,report=5,config=60 -c 0 Example 2 Specifying a Resource Cap for a Zone The command shown below specifies the maximum amount of memory that can be consumed by a specified zone. Note that this value lasts only until the next reboot. To set a persistent cap, use zonecfg(1M). # rcapadm -z testzone -m 512M EXIT STATUS
The following exit values are returned: 0 Successful completion. The modifications to the current configuration were valid and made successfully. 1 An error occurred. A fatal error occurred either in obtaining or modifying the resource capping configuration. 2 Invalid command-line options were specified. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrcapu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ The -z and -m options are committed interfaces. SEE ALSO
rcapstat(1), rcapd(1M), zonecfg(1M), project(4), attributes(5), zones(5) "Physical Memory Control Using the Resource Capping Daemon" in System Administration Guide: Solaris Containers-Resource Management, and Solaris Zones SunOS 5.11 18 Dec 2006 rcapadm(1M)
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy