Friday, March 9, 2012

Memory settings/considerations when running multiple instances of SQL Server

I've got a server, Dual PIII 733's with 2gb of RAM that I setup with 3 named
instances of SQL Server. I'm not sure what I should do with the memory
settings, specifically the min and max and whether that has any bearing or
not.
I noticed when pulling up task manager that the memory for 1 instance will
grow to be 800mb or so while the other 2 will hover around 46-60 mb. I
tried setting them each to use exactly 500mb but that didn't appear to have
any impact. I know that the memory will grow as the databases get used but
the other 2 instances still stayed low even when I was restoring a 40gb
database. I also noticed that stopping the services from the first instance
would kill the sqlserver.exe process that had the high allocation of memory,
but the others still stayed in the 46-60 mb range.
How can I manage the memory used by each instance of SQL Server or what
should I set so that I don't have to worry about it? Any help with this is
greatly appreciated.
Thx,
KenThis is a multi-part message in MIME format.
--000107050009040201040201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
My advice would be just to leave it how it is. By default, SQL 2000 out
of the box uses a dynamic memory management strategy (as it seems you
already know). With only 2G of physical RAM in the box you don't need
to play with /3GB switches or AWE memory or anything fancy like that.
SQL Server will cache data into its address space as it is accessed
(restoring a DB is not the same as accessing data in that DB, which is
done via standard T-SQL statements like SELECT, INSERT, UPDATE &
DELETE). It will try to maintain a minimum free physical RAM threshold
(by default 10MB but configurable) so when another app (like one of your
other sqlservr.exe instances for example) make a request for memory and
there is less than that threshold available, it will release some of its
memory allocation in order for the OS to satisfy the new memory request
of the other app AND maintain that free memory threshold.
If the SQL instances using less RAM need the memory then they will ask
for it and get it at the other instance's expense. Basically, the most
needy SQL instances will have the most memory (as it should be).
If you really want to set hard limits for your SQL instances you can set
high & low limits for the dynamic memory management to work with via
sp_configure ("max server memory" and "min server memory") or you can
set a fixed amount of memory for SQL Server to work with (so that it
does *not* swap pages out of RAM) via sp_configure ("set working set size").
But I'd just leave it exactly how it is if I were you.
--
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
Ken Patton wrote:
>I've got a server, Dual PIII 733's with 2gb of RAM that I setup with 3 named
>instances of SQL Server. I'm not sure what I should do with the memory
>settings, specifically the min and max and whether that has any bearing or
>not.
>I noticed when pulling up task manager that the memory for 1 instance will
>grow to be 800mb or so while the other 2 will hover around 46-60 mb. I
>tried setting them each to use exactly 500mb but that didn't appear to have
>any impact. I know that the memory will grow as the databases get used but
>the other 2 instances still stayed low even when I was restoring a 40gb
>database. I also noticed that stopping the services from the first instance
>would kill the sqlserver.exe process that had the high allocation of memory,
>but the others still stayed in the 46-60 mb range.
>How can I manage the memory used by each instance of SQL Server or what
>should I set so that I don't have to worry about it? Any help with this is
>greatly appreciated.
>Thx,
>Ken
>
>
--000107050009040201040201
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>My advice would be just to leave it how it is. By default, SQL
2000 out of the box uses a dynamic memory management strategy (as it
seems you already know). With only 2G of physical RAM in the box you
don't need to play with /3GB switches or AWE memory or anything fancy
like that.<br>
<br>
SQL Server will cache data into its address space as it is accessed
(restoring a DB is not the same as accessing data in that DB, which is
done via standard T-SQL statements like SELECT, INSERT, UPDATE &
DELETE). It will try to maintain a minimum free physical RAM threshold
(by default 10MB but configurable) so when another app (like one of
your other sqlservr.exe instances for example) make a request for
memory and there is less than that threshold available, it will release
some of its memory allocation in order for the OS to satisfy the new
memory request of the other app AND maintain that free memory threshold.<br>
<br>
If the SQL instances using less RAM need the memory then they will ask
for it and get it at the other instance's expense. Basically, the most
needy SQL instances will have the most memory (as it should be).<br>
<br>
If you really want to set hard limits for your SQL instances you can
set high & low limits for the dynamic memory management to work
with via sp_configure ("max server memory" and "min server memory") or
you can set a fixed amount of memory for SQL Server to work with (so
that it does <b>not</b> swap pages out of RAM) via sp_configure ("set
working set size").<br>
<br>
But I'd just leave it exactly how it is if I were you.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font> </span><b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"> <font face="Tahoma"
size="2">|</font><i><font face="Tahoma"> </font><font face="Tahoma"
size="2"> database administrator</font></i><font face="Tahoma" size="2">
| mallesons</font><font face="Tahoma"> </font><font face="Tahoma"
size="2">stephen</font><font face="Tahoma"> </font><font face="Tahoma"
size="2"> jaques</font><font face="Tahoma"><br>
</font><b><font face="Tahoma" size="2">T</font></b><font face="Tahoma"
size="2"> +61 (2) 9296 3668 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2"> F</font></b><font face="Tahoma" size="2"> +61
(2) 9296 3885 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2">M</font></b><font face="Tahoma" size="2"> +61
(408) 675 907</font><br>
<b><font face="Tahoma" size="2">E</font></b><font face="Tahoma" size="2">
<a href="http://links.10026.com/?link=mailto:mike.hodgson@.mallesons.nospam.com">
mailto:mike.hodgson@.mallesons.nospam.com</a> |</font><b><font
face="Tahoma"> </font><font face="Tahoma" size="2">W</font></b><font
face="Tahoma" size="2"> <a href="http://links.10026.com/?link=/">http://www.mallesons.com">
http://www.mallesons.com</a></font></span> </p>
</div>
<br>
<br>
Ken Patton wrote:
<blockquote cite="midd6j517$7rh$1@.news01.intel.com" type="cite">
<pre wrap="">I've got a server, Dual PIII 733's with 2gb of RAM that I setup with 3 named
instances of SQL Server. I'm not sure what I should do with the memory
settings, specifically the min and max and whether that has any bearing or
not.
I noticed when pulling up task manager that the memory for 1 instance will
grow to be 800mb or so while the other 2 will hover around 46-60 mb. I
tried setting them each to use exactly 500mb but that didn't appear to have
any impact. I know that the memory will grow as the databases get used but
the other 2 instances still stayed low even when I was restoring a 40gb
database. I also noticed that stopping the services from the first instance
would kill the sqlserver.exe process that had the high allocation of memory,
but the others still stayed in the 46-60 mb range.
How can I manage the memory used by each instance of SQL Server or what
should I set so that I don't have to worry about it? Any help with this is
greatly appreciated.
Thx,
Ken
</pre>
</blockquote>
</body>
</html>
--000107050009040201040201--

No comments:

Post a Comment