Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2152

Re: Limiting memory usage

From Anton Shepelev <antonius@freeshell.de>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Limiting memory usage
Date 2022-07-05 12:16 +0300
Organization Aioe.org NNTP Server
Message-ID <20220705121625.c2cbb88631fe0a28b8c1e5b0@freeshell.de> (permalink)
References <20220505124052.0ca7954a09edb5ff9ad84a0f@g{oogle}mail.com> <20220704143129.09dc28f65821d135ea404649@g{oogle}mail.com> <XnsAECB6345F77FBYazorman@127.0.0.1>

Show all headers | View raw


Erland Sommarskog to Anton Shepelev:

> > I continue to experiment with my memory balancer, and
> > its worst defect is that sometimes by decreasing
> > 'max server memory' it causes the isntance to freeze and
> > become unresponsive until restarted.  There are three
> > ranges of these setting:
> >
> >       freeze    high CPU      Works OK, zero CPU
> >       until     usage while   usage while idle
> >       restart   idle
> >      |--------|-------------|--------------------->
> >      0        V1            V2   max server memory
> >
> > where V1 and V2 are idiosyncratic to each instance.  I
> > have tried to estimate V1 and V2 using:
> > [...]
> > Have you an idea how to estimate minimum working value
> > for server memory, that is V2 in the diagram above?
>
> You don't say which absolute values you are working with.

Deliberately, because I want to arrive at a universal
approach that will not depend on hard-coded values of V1 and
V2 but will rather estimate them.  In my case, V1 and V2 are
usually between 190 and 350 Mb.  My databases are usually
between 5-50 Gb, 5-15 databases per instance, and I see no
correlation between DB size and minimum required RAM...

> What I've noticed is that if you set "max server memory"
> to really low values, below 400 MB, SQL Server will not
> even start.

I have had that, too.  Most of the times, however, it can be
resurrected:

  1.  rename all the .mdf files for user DBs
      (e.g. to .mdf1),
  2.  start the server (with -m if necessary),
  3.  set 'max server memory' to a working value,
  4.  stop the instance,
  5.  restore the correct names of the .mdf files,
  6.  start the instance.

> I'm not surprised if you can set "max server memory" to
> higher values and still send your server into nirvana.

And I am surprised, because an enterprise system should
either refuse a setting that sends it into limbo or comply
with it even at the expense of a terribly slow performace.
Becoming unresponsive and unable to start is bad manners,
especially because setting server memory requires that the
instance be running!  The documentation says the minimum
value is 128 Mb.

I am here in search of suggestions how to detect the
situation between V1 and V2, when the instance still works,
but is on the verge of swooning.  With the plethora of
performance monitoring facilities in MSSQL, it must be
possible somehow.

-- 
()  ascii ribbon campaign - against html e-mail
/\  http://preview.tinyurl.com/qcy6mjc [archived]

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Limiting memory usage Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-05-05 12:40 +0300
  Re: Limiting memory usage Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-05-05 13:18 +0300
  Re: Limiting memory usage Erland Sommarskog <esquel@sommarskog.se> - 2022-05-05 21:28 +0200
    Re: Limiting memory usage Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-05-11 12:48 +0300
  Re: Limiting memory usage Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-07-04 14:31 +0300
    Re: Limiting memory usage Erland Sommarskog <esquel@sommarskog.se> - 2022-07-05 09:45 +0200
      Re: Limiting memory usage Anton Shepelev <antonius@freeshell.de> - 2022-07-05 12:16 +0300
        Re: Limiting memory usage Erland Sommarskog <esquel@sommarskog.se> - 2022-07-05 21:27 +0200
          Re: Limiting memory usage Anton Shepelev <anton.txt@gmail.com> - 2022-07-06 00:45 +0300

csiph-web