Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Thanks Steffen, The memory capping from the global zone is why we decided to go with Nevada instead of Solaris 10... We are desperately waiting for dedicated memory, Jeff said this is not on the cards for 2007 though... The problem we are finding with capping memory is that our clients and more importantly other software can see the total memory of the physical server.. ie I know a lot of enterprise software that defaults initial memory usage to a portion of physical memory, unless configured right.. eg my previous post on "java -version" taking 1/64 of the physical memory of the server... Jason. Steffen Weiberle wrote: Hi Jason, coming late into this thread, Jason Bradfield wrote: Thanks Jeff. FYI, These zones will be allocated to different clients each with root access to their zone and running their own software. Whether you choose to provide root access to the non-global zone users has no effect on the ability to set the limits via zonecfg in Nevada and the next update of Solaris 10. They will not be able to increase the cap from within the non-global zone. (This is not the case with S10 11/06 and prior, where rcapd runs per zone. A user with sufficient privileges in the zone could change the cap.) What we really want and are waiting for is dedicated memory, not capping.. Your workload characteristics and service delivery constraints may be best served with dedicated memory, and it is independent of whether the zones' users have root access. Steffen Do you know when this will be coming, and will this also include prstat, df, swap etc only displaying the allocated Memory.. Jeff Victor wrote: Jason Bradfield wrote: Sorry if this comes through as a duplicate response but I responded from a different email account earlier... Thanks Bob and Jeff... Therefore here is my confusion.. From Bob * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM From Jeff set swap= this is VM - the total address space available to the zone Ok.. to solve my immediate problem 16GB Physical and 16GB disk = total of 32GB Virtual If I were to create 3 zones and wanted to evenly allocate memory to all 3 and the global zone, would this config be ok zonecfg:host30> add capped-memory zonecfg:host30:capped-memory> set physical=4G zonecfg:host30:capped-memory> set swap=8G zonecfg:host30:capped-memory> end Memory capping isn't really intended to solve the 'problem' of allocating memory, because usually there isn't a problem. Memory capping is intended to prevent memory hogs (accidental or otherwise) from impacting proper operation of other workloads. This allows you to choose large caps, improving resource usage efficiency. With some v12n solutions, allocating memory is required. This has the potential of wasting memory - if one virtual server is not using all of its memory, another cannot. With zones, memory allocation (and its wastefulness) is not necessary. Further, choosing a physical memory cap that is too low will result in unnecessary paging activity, which will significantly reduce performance on that one zone, and also affect performance of other zones, to some extent. However, if you want to ensure that one zone does not use too much and impact other zones, measure (or estimate) its normal memory usage, and choose a value larger than that. After the zone is running, "prstat -Z" can be used to measure memory usage, both physical and swap. With all of that in mind, in your situation I would choose much larger numbers than the ones shown above. But without understanding the normal resource consumption of your workloads, I can't guess at good values. Finally, it usually helps to know that those caps can be changed while the zone is running, using rcapadm from the global zone. Thanks. Bob Bownes wrote: >> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use:
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Hi Jason, coming late into this thread, Jason Bradfield wrote: Thanks Jeff. FYI, These zones will be allocated to different clients each with root access to their zone and running their own software. Whether you choose to provide root access to the non-global zone users has no effect on the ability to set the limits via zonecfg in Nevada and the next update of Solaris 10. They will not be able to increase the cap from within the non-global zone. (This is not the case with S10 11/06 and prior, where rcapd runs per zone. A user with sufficient privileges in the zone could change the cap.) What we really want and are waiting for is dedicated memory, not capping.. Your workload characteristics and service delivery constraints may be best served with dedicated memory, and it is independent of whether the zones' users have root access. Steffen Do you know when this will be coming, and will this also include prstat, df, swap etc only displaying the allocated Memory.. Jeff Victor wrote: Jason Bradfield wrote: Sorry if this comes through as a duplicate response but I responded from a different email account earlier... Thanks Bob and Jeff... Therefore here is my confusion.. From Bob * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM From Jeff set swap= this is VM - the total address space available to the zone Ok.. to solve my immediate problem 16GB Physical and 16GB disk = total of 32GB Virtual If I were to create 3 zones and wanted to evenly allocate memory to all 3 and the global zone, would this config be ok zonecfg:host30> add capped-memory zonecfg:host30:capped-memory> set physical=4G zonecfg:host30:capped-memory> set swap=8G zonecfg:host30:capped-memory> end Memory capping isn't really intended to solve the 'problem' of allocating memory, because usually there isn't a problem. Memory capping is intended to prevent memory hogs (accidental or otherwise) from impacting proper operation of other workloads. This allows you to choose large caps, improving resource usage efficiency. With some v12n solutions, allocating memory is required. This has the potential of wasting memory - if one virtual server is not using all of its memory, another cannot. With zones, memory allocation (and its wastefulness) is not necessary. Further, choosing a physical memory cap that is too low will result in unnecessary paging activity, which will significantly reduce performance on that one zone, and also affect performance of other zones, to some extent. However, if you want to ensure that one zone does not use too much and impact other zones, measure (or estimate) its normal memory usage, and choose a value larger than that. After the zone is running, "prstat -Z" can be used to measure memory usage, both physical and swap. With all of that in mind, in your situation I would choose much larger numbers than the ones shown above. But without understanding the normal resource consumption of your workloads, I can't guess at good values. Finally, it usually helps to know that those caps can be changed while the zone is running, using rcapadm from the global zone. Thanks. Bob Bownes wrote: >> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: > >add capped-memory >set physical=128m >set swap=384m >end >If you already have added these, you must use "select capped-memory" instead >of "add capped-memory". > > >Does that help? ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Jason Bradfield wrote: Thanks Jeff. FYI, These zones will be allocated to different clients each with root access to their zone and running their own software. Ah. Yes, that would indicate tighter controls. You could even charge more for a higher cap... ;-) Jeff Victor wrote: Jason Bradfield wrote: Ok.. to solve my immediate problem 16GB Physical and 16GB disk = total of 32GB Virtual If I were to create 3 zones and wanted to evenly allocate memory to all 3 and the global zone, would this config be ok zonecfg:host30> add capped-memory zonecfg:host30:capped-memory> set physical=4G zonecfg:host30:capped-memory> set swap=8G zonecfg:host30:capped-memory> end Memory capping isn't really intended to solve the 'problem' of allocating memory, because usually there isn't a problem. Memory capping is intended to prevent memory hogs (accidental or otherwise) from impacting proper operation of other workloads. This allows you to choose large caps, improving resource usage efficiency. With some v12n solutions, allocating memory is required. This has the potential of wasting memory - if one virtual server is not using all of its memory, another cannot. With zones, memory allocation (and its wastefulness) is not necessary. Further, choosing a physical memory cap that is too low will result in unnecessary paging activity, which will significantly reduce performance on that one zone, and also affect performance of other zones, to some extent. However, if you want to ensure that one zone does not use too much and impact other zones, measure (or estimate) its normal memory usage, and choose a value larger than that. After the zone is running, "prstat -Z" can be used to measure memory usage, both physical and swap. With all of that in mind, in your situation I would choose much larger numbers than the ones shown above. But without understanding the normal resource consumption of your workloads, I can't guess at good values. Finally, it usually helps to know that those caps can be changed while the zone is running, using rcapadm from the global zone. -- -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Thanks Jeff. FYI, These zones will be allocated to different clients each with root access to their zone and running their own software. What we really want and are waiting for is dedicated memory, not capping.. Do you know when this will be coming, and will this also include prstat, df, swap etc only displaying the allocated Memory.. Jeff Victor wrote: Jason Bradfield wrote: Sorry if this comes through as a duplicate response but I responded from a different email account earlier... Thanks Bob and Jeff... Therefore here is my confusion.. From Bob * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM From Jeff set swap= this is VM - the total address space available to the zone Ok.. to solve my immediate problem 16GB Physical and 16GB disk = total of 32GB Virtual If I were to create 3 zones and wanted to evenly allocate memory to all 3 and the global zone, would this config be ok zonecfg:host30> add capped-memory zonecfg:host30:capped-memory> set physical=4G zonecfg:host30:capped-memory> set swap=8G zonecfg:host30:capped-memory> end Memory capping isn't really intended to solve the 'problem' of allocating memory, because usually there isn't a problem. Memory capping is intended to prevent memory hogs (accidental or otherwise) from impacting proper operation of other workloads. This allows you to choose large caps, improving resource usage efficiency. With some v12n solutions, allocating memory is required. This has the potential of wasting memory - if one virtual server is not using all of its memory, another cannot. With zones, memory allocation (and its wastefulness) is not necessary. Further, choosing a physical memory cap that is too low will result in unnecessary paging activity, which will significantly reduce performance on that one zone, and also affect performance of other zones, to some extent. However, if you want to ensure that one zone does not use too much and impact other zones, measure (or estimate) its normal memory usage, and choose a value larger than that. After the zone is running, "prstat -Z" can be used to measure memory usage, both physical and swap. With all of that in mind, in your situation I would choose much larger numbers than the ones shown above. But without understanding the normal resource consumption of your workloads, I can't guess at good values. Finally, it usually helps to know that those caps can be changed while the zone is running, using rcapadm from the global zone. Thanks. Bob Bownes wrote: >> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: > >add capped-memory >set physical=128m >set swap=384m >end >If you already have added these, you must use "select capped-memory" instead >of "add capped-memory". > > >Does that help? ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Jason Bradfield wrote: Sorry if this comes through as a duplicate response but I responded from a different email account earlier... Thanks Bob and Jeff... Therefore here is my confusion.. From Bob * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM From Jeff set swap= this is VM - the total address space available to the zone Ok.. to solve my immediate problem 16GB Physical and 16GB disk = total of 32GB Virtual If I were to create 3 zones and wanted to evenly allocate memory to all 3 and the global zone, would this config be ok zonecfg:host30> add capped-memory zonecfg:host30:capped-memory> set physical=4G zonecfg:host30:capped-memory> set swap=8G zonecfg:host30:capped-memory> end Memory capping isn't really intended to solve the 'problem' of allocating memory, because usually there isn't a problem. Memory capping is intended to prevent memory hogs (accidental or otherwise) from impacting proper operation of other workloads. This allows you to choose large caps, improving resource usage efficiency. With some v12n solutions, allocating memory is required. This has the potential of wasting memory - if one virtual server is not using all of its memory, another cannot. With zones, memory allocation (and its wastefulness) is not necessary. Further, choosing a physical memory cap that is too low will result in unnecessary paging activity, which will significantly reduce performance on that one zone, and also affect performance of other zones, to some extent. However, if you want to ensure that one zone does not use too much and impact other zones, measure (or estimate) its normal memory usage, and choose a value larger than that. After the zone is running, "prstat -Z" can be used to measure memory usage, both physical and swap. With all of that in mind, in your situation I would choose much larger numbers than the ones shown above. But without understanding the normal resource consumption of your workloads, I can't guess at good values. Finally, it usually helps to know that those caps can be changed while the zone is running, using rcapadm from the global zone. Thanks. Bob Bownes wrote: >> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: > >add capped-memory >set physical=128m >set swap=384m >end >If you already have added these, you must use "select capped-memory" instead >of "add capped-memory". > > >Does that help? -- -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Jason Bradfield wrote: Actually put simply how can both of these be true... From Bob * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM From Jeff set swap= this is VM - the total address space available to the zone Bob and I used different definitions of the word 'swap.' Because there are different definitions out there, I provided mine solely for use in my description. While we're here, I'll further clarify my earlier response. For the purposes of the swap cap, when Solaris is counting up the memory pages used by the processes in a zone, it does not count shared program pages (called 'text pages' in Unix lingo). In Solaris, these non-writable pages are shared by all users running the same program. This reduces physical memory usage and I/O traffic. There is no need to ever page them out because they already have a copy on disk - the file system. The same is true for users in the global zone and sparse-root zones - all users in those environments use the same /usr/bin/ls, and share the same text pages for that program. When a swap cap has been applied to a zone, those text pages are not counted, because there is no swap reservation for them. Therefore: a slightly more accurate way of answering "what is a swap cap" is: the maximum amount of space used by physical memory and disk-based swap in use by a zone, *minus* the size of the text pages in use by that zone. Jason Bradfield wrote: Thanks Bob and Jeff... Therefore here is my confusion.. I have 16GB physical and 16GB disk as swap giving me a total of 32G of virtual memory.. For simplicity I then create 4 zones each with 4G physical and 8G swap (VM in zone) From what Jeff confirmed is this will give me 4G physical and 4G disk as swap. From Bob I'll have 8G per zone "amount of disk space set aside to copy physical memory to when copying it out of RAM" but the system only has 16GB total.. Also if swap is the amount of disk able to be swaped to then why does swap -s give me 32G when really it should be 16G. Bob Bownes wrote: >> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: > >add capped-memory >set physical=128m >set swap=384m >end >If you already have added these, you must use "select capped-memory" instead >of "add capped-memory". > > >Does that help? -- -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
>> Can anyone, in lamens (ex linux) terms explain the differences between >> virtual/swap/rss/size/physical etc or recomend a good >> blog/article/document. > >I don't know Linux terms, so I'll define terms for this conversation: >* physical memory: RAM, memory chips >* VM (virtual memory): the total memory space available, both in RAM and > on disk > I'll add: * swap: the amount of disk space set aside to copy physical memory to when copying it out of RAM * rss: Resident Set Size - the part of a process address space which is currently resident in RAM * size: The total address space used by a process * physical - various definitions, most common one i've seen is the total amount of RAM in the system. Also refered to as 'real' in some places And a link I found that might be of some use: http://www.memorymanagement.org/ >The terms in zonecfg are: >* set physical= this is what I am calling "physical memory" >* set swap= this is VM - the total address space available to the zone > >So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: > >add capped-memory >set physical=128m >set swap=384m >end >If you already have added these, you must use "select capped-memory" instead >of "add capped-memory". > > >Does that help?___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Re: Java VM defaults in memory capped zones
Jason Bradfield wrote: Also, on a similar note can someone confirm my understanding of the physical and swap caps... In my case above will that give the zone a total of 256M Virtual memory of which no more than 128M will be physical.. My tests seem to prove this.. Yes, although the zone is allowed to temporarily 'burst' above the physical memory cap. The pager will page out enough physical memory pages to bring the zone back under the physical memory cap. My initial thoughts were that I would have 384M of which 128M is physical and 256M is disk swap.. Can anyone, in lamens (ex linux) terms explain the differences between virtual/swap/rss/size/physical etc or recomend a good blog/article/document. I don't know Linux terms, so I'll define terms for this conversation: * physical memory: RAM, memory chips * VM (virtual memory): the total memory space available, both in RAM and on disk The terms in zonecfg are: * set physical= this is what I am calling "physical memory" * set swap= this is VM - the total address space available to the zone So if you want to limit the zone's processes to 384MB of VM and 128MB of RAM, use: add capped-memory set physical=128m set swap=384m end If you already have added these, you must use "select capped-memory" instead of "add capped-memory". Does that help? -- Jeff VICTOR Sun Microsystemsjeff.victor @ sun.com OS AmbassadorSr. Technical Specialist Solaris 10 Zones FAQ:http://www.opensolaris.org/os/community/zones/faq -- ___ zones-discuss mailing list zones-discuss@opensolaris.org