Monday, February 20, 2012

Memory management

I have 12 gigs of memory on each server in a cluster. Each server carries
about the same load. In
this case I should allot 5.5 gigs to each server and leave 1 gig for the
OS? Is 1 gig enough for the OS?
I should use the /3GB switch and set the max server memory to 5.5 for
each server. Is that correct?
thanks
You need to leave enough memory in case all instances land on the same node,
enough for the OS, and enough for other processes and services running on
that node.
An easy way to tell how much you should leave for other processes is to see
how much memory is consumed when SQL Server is not running on that node.
To use up to 3 GB User Mode space, you need to enable the /3GB switch. If
you enable the AWE configuration setting, you can use up to 4 GB. To use
more than 4 GB, you will also need to enable the /PAE switch, unless you are
running Win2K3, which enables that by default.
Keep in mind that the User mode/Kernel mode balance of the first 4 GB is
VIRTUAL, not physical memory, and is for each process; so, by using the /3GB
switch, you've reduced the Kernel mode space from 2 GB to 1 GB. However,
this is VIRTUAL, it can page. So, it says nothing about how much space the
OS will consume.
Typically, the OS will not use much more than 384 to 512 GB of RAM; it is
typically the other User Mode processes that will request memory. If it is
not available in physical RAM, then it will page, including any Kernel mode
allocations. You should make all attempts to keep paging to a minimum. So,
you might have to tweak the settings a little bit.
Also, be aware that if you are addressing more than 3 GB of memory by
enabling the AWE configuration, the memory is physically acquired at startup
and will not be preempted by other processes: the AWE region will be static.
The Buffer Pool will still be dynamic however.
Sincerely,
Anthony Thomas

"RomM" <RomM@.discussions.microsoft.com> wrote in message
news:8D9275F7-A6A7-4BC9-8DCE-2F2AE8E7FA26@.microsoft.com...
> I have 12 gigs of memory on each server in a cluster. Each server carries
> about the same load. In
> this case I should allot 5.5 gigs to each server and leave 1 gig for the
> OS? Is 1 gig enough for the OS?
> I should use the /3GB switch and set the max server memory to 5.5 for
> each server. Is that correct?
> thanks
>
|||Thank you for your response. I have only one instance of SQL running on each
box with no other applications. I have 12 gig of memory on each box. I am
going to have each server use half of its available memory in case of a
failover. My question is 12 gigs of memory total per server, is 1 gig enough
for the OS?
"Anthony Thomas" wrote:

> You need to leave enough memory in case all instances land on the same node,
> enough for the OS, and enough for other processes and services running on
> that node.
> An easy way to tell how much you should leave for other processes is to see
> how much memory is consumed when SQL Server is not running on that node.
> To use up to 3 GB User Mode space, you need to enable the /3GB switch. If
> you enable the AWE configuration setting, you can use up to 4 GB. To use
> more than 4 GB, you will also need to enable the /PAE switch, unless you are
> running Win2K3, which enables that by default.
> Keep in mind that the User mode/Kernel mode balance of the first 4 GB is
> VIRTUAL, not physical memory, and is for each process; so, by using the /3GB
> switch, you've reduced the Kernel mode space from 2 GB to 1 GB. However,
> this is VIRTUAL, it can page. So, it says nothing about how much space the
> OS will consume.
> Typically, the OS will not use much more than 384 to 512 GB of RAM; it is
> typically the other User Mode processes that will request memory. If it is
> not available in physical RAM, then it will page, including any Kernel mode
> allocations. You should make all attempts to keep paging to a minimum. So,
> you might have to tweak the settings a little bit.
> Also, be aware that if you are addressing more than 3 GB of memory by
> enabling the AWE configuration, the memory is physically acquired at startup
> and will not be preempted by other processes: the AWE region will be static.
> The Buffer Pool will still be dynamic however.
> Sincerely,
>
> Anthony Thomas
>
> --
> "RomM" <RomM@.discussions.microsoft.com> wrote in message
> news:8D9275F7-A6A7-4BC9-8DCE-2F2AE8E7FA26@.microsoft.com...
>
>
|||There is only one virtual server even though you have two host nodes.
Memory is reserved for instances, not nodes. With 12GB and no non-SQL
applications, I would set SQL to 10GB memory and leave it there.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"RomM" <RomM@.discussions.microsoft.com> wrote in message
news:F1276980-01D7-4F2D-8C02-A7EDA0A0CB05@.microsoft.com...[vbcol=seagreen]
> Thank you for your response. I have only one instance of SQL running on
> each
> box with no other applications. I have 12 gig of memory on each box. I
> am
> going to have each server use half of its available memory in case of a
> failover. My question is 12 gigs of memory total per server, is 1 gig
> enough
> for the OS?
> "Anthony Thomas" wrote:
|||I may have misstated - I have one instance running on each server (basically
a standard setup) in the cluster. If a failover occurs and I have set each
to 5.5 gigs, I would have enough memory on one server to cover the 2 servers
combined. But my question is, 5.5 + 5.5 = 11, is the remaining 1 gig enough
for the OS?
"Geoff N. Hiten" wrote:

> There is only one virtual server even though you have two host nodes.
> Memory is reserved for instances, not nodes. With 12GB and no non-SQL
> applications, I would set SQL to 10GB memory and leave it there.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "RomM" <RomM@.discussions.microsoft.com> wrote in message
> news:F1276980-01D7-4F2D-8C02-A7EDA0A0CB05@.microsoft.com...
>
>
|||Maybe. I would watch the performance counters and see. If the system
starts paging, you know you have trimmed it too close. Also, you don't have
to run identical memory settings between instances. If one instance has a
lower average page life expectancy, you can increase performance by giving
more memory to one instance. You would end up running a 7-5 or an 8-4 GB
memory allocation split.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"RomM" <RomM@.discussions.microsoft.com> wrote in message
news:45D22865-05C7-4ABA-96E9-834D7E9A3D2E@.microsoft.com...[vbcol=seagreen]
>I may have misstated - I have one instance running on each server
>(basically
> a standard setup) in the cluster. If a failover occurs and I have set
> each
> to 5.5 gigs, I would have enough memory on one server to cover the 2
> servers
> combined. But my question is, 5.5 + 5.5 = 11, is the remaining 1 gig
> enough
> for the OS?
> "Geoff N. Hiten" wrote:
|||One more question, if I set the 3GB switch will that automatically limit the
OS to using 1 gig of memory? If that is the case and I do not configure the
sum of the max memory on both servers in the cluster to equal 11 gigs (12 gig
on each server minus 1 gig OS) I would be wasting whatever is less than 11
gigs. Is that correct?
"Geoff N. Hiten" wrote:

> Maybe. I would watch the performance counters and see. If the system
> starts paging, you know you have trimmed it too close. Also, you don't have
> to run identical memory settings between instances. If one instance has a
> lower average page life expectancy, you can increase performance by giving
> more memory to one instance. You would end up running a 7-5 or an 8-4 GB
> memory allocation split.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "RomM" <RomM@.discussions.microsoft.com> wrote in message
> news:45D22865-05C7-4ABA-96E9-834D7E9A3D2E@.microsoft.com...
>
>
|||The switch covers Virtual memory for each SQL instance, not necessarily
physical memory from the system.
12GB is the absolute upper limit for /3GB. I would be very careful using it
in your situation.
Again, I would start conservative (2GB for the OS and the rest split between
the SQL instances) and watch what happens. You should be recording
performance monitor counters anyway for long term system analysis. These
records will tell you whether or not you have overcommitted memory.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"RomM" <RomM@.discussions.microsoft.com> wrote in message
news:A93EB02F-913E-4B62-9738-6D2989B4FA5C@.microsoft.com...[vbcol=seagreen]
> One more question, if I set the 3GB switch will that automatically limit
> the
> OS to using 1 gig of memory? If that is the case and I do not configure
> the
> sum of the max memory on both servers in the cluster to equal 11 gigs (12
> gig
> on each server minus 1 gig OS) I would be wasting whatever is less than 11
> gigs. Is that correct?
> "Geoff N. Hiten" wrote:
|||I think you need to go back and read my initial response again. All memory
is virtual except that allocated exclusively for AWE space. That space MUST
be backed by physical RAM, but all else, 1 GB Kernel space, 2 GB Kernel
space, 2 GB User mode space, or 3 GB User mode space is ALL virtual and is
allocated to EACH process. How much is in physical RAM is dependent on what
is active and what is available, all else is paged.
Since SQL Server wants to keep the Buffer Cache in memory, although it may
scale it back, it will NEVER page it. SQL Server will, however, page
sections from the other four memory managers.
Again, run the OS and other processes without SQL Server running to get an
estimate of how much PHYSICAL RAM those pieces would consume if not
constrained by SQL Server.
Sincerely,
Anthony Thomas

"RomM" <RomM@.discussions.microsoft.com> wrote in message
news:A93EB02F-913E-4B62-9738-6D2989B4FA5C@.microsoft.com...
> One more question, if I set the 3GB switch will that automatically limit
the
> OS to using 1 gig of memory? If that is the case and I do not configure
the
> sum of the max memory on both servers in the cluster to equal 11 gigs (12
gig[vbcol=seagreen]
> on each server minus 1 gig OS) I would be wasting whatever is less than 11
> gigs. Is that correct?
> "Geoff N. Hiten" wrote:
have[vbcol=seagreen]
a[vbcol=seagreen]
giving[vbcol=seagreen]
GB[vbcol=seagreen]
non-SQL[vbcol=seagreen]
running[vbcol=seagreen]
box.[vbcol=seagreen]
of a[vbcol=seagreen]
gig[vbcol=seagreen]
same[vbcol=seagreen]
running[vbcol=seagreen]
is[vbcol=seagreen]
switch.[vbcol=seagreen]
To[vbcol=seagreen]
unless[vbcol=seagreen]
GB[vbcol=seagreen]
using[vbcol=seagreen]
RAM; it[vbcol=seagreen]
If[vbcol=seagreen]
Kernel[vbcol=seagreen]
by[vbcol=seagreen]
at[vbcol=seagreen]
be[vbcol=seagreen]
server[vbcol=seagreen]
for[vbcol=seagreen]
5.5[vbcol=seagreen]

No comments:

Post a Comment