My application attaches to, and detaches from many
databases. When I attach, the sqlservr process memory
usage goes up, and when I detach, it sometimes goes back
down, sometimes only partly, and sometimes actually goes
up. When my application exits, the sqlservr process never
releases the memory. Is this a bug? I'm using ADO15 and
I call Close() and Release() on all my connections and
recordsets. Is there something else I should be calling
to clean up the memory in MSDE?awolchinsky,
I don't think it's a bug. If it were, I'm sure it would have been fixed by
now via a service pack or whatever.
The mem usage behaviour you are seeing is not unexpected nor inappropriate
for an application server, which is essentially what MSDE is, being a
cut-down version of SQL Server. Typically, the server would grab as much
memory as is required to manage its workload for optimum performance,
subject to the limitations of the relevant operating system. What it
certainly *won't* do is release its allocated resources (memory) by default!
It wants to keep those resources so it's ready for next time... and no, it
doesn't care if you've got 20 other processes running on your box competing
for those resources - that's for the O/S to manage. This is why application
servers such as SQL Server are (usually) installed on a dedicated box......
You don't need to look at the memory allocation of the sqlserver.exe process
to determine whether your application (and your code) is satisfactory. As a
developer, you should assume that sqlserver.exe is fine and dandy and just
let it get on with doing whatever it's doing. You should concentrate on the
mem usage of your application.exe and any associated components that you've
coded/built etc .. if your app exits "cleanly" (ie your app.exe process
terminates and therefore releases all resources allocated to it) then you
have done your job.
--
--
Kind Regards,
Robert A. Ellis, MCSD
Software Developer
"awolchinsky" <awolchinsky@.bonders.com> wrote in message
news:04f401c35c6f$33c91fd0$a401280a@.phx.gbl...
> My application attaches to, and detaches from many
> databases. When I attach, the sqlservr process memory
> usage goes up, and when I detach, it sometimes goes back
> down, sometimes only partly, and sometimes actually goes
> up. When my application exits, the sqlservr process never
> releases the memory. Is this a bug? I'm using ADO15 and
> I call Close() and Release() on all my connections and
> recordsets. Is there something else I should be calling
> to clean up the memory in MSDE?|||Check the memoryleak FAQ entry and then post back if you think you still have
a leak.
Neil Pike MVP/MCSE. Protech Computing Ltd
Reply here - no email
SQL FAQ (484 entries) see
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq|||Robert, thanks for the response. I agree now that it is
not a bug. And normally, I would only be concerned with
the memory usage of my app. But my app runs in the
background while our primary app executes. As sqlserver
eats up memory (200 MG), our main app, with through-put
requirements, slows down.
I did get some decent info from Microsoft. I set the 'max
server memory' to 20 MG, and that seems to hold the memory
usage down our 33 MG.
Thanks again.
Andy
>--Original Message--
>awolchinsky,
>I don't think it's a bug. If it were, I'm sure it would
have been fixed by
>now via a service pack or whatever.
>The mem usage behaviour you are seeing is not unexpected
nor inappropriate
>for an application server, which is essentially what MSDE
is, being a
>cut-down version of SQL Server. Typically, the server
would grab as much
>memory as is required to manage its workload for optimum
performance,
>subject to the limitations of the relevant operating
system. What it
>certainly *won't* do is release its allocated resources
(memory) by default!
>It wants to keep those resources so it's ready for next
time... and no, it
>doesn't care if you've got 20 other processes running on
your box competing
>for those resources - that's for the O/S to manage. This
is why application
>servers such as SQL Server are (usually) installed on a
dedicated box......
>You don't need to look at the memory allocation of the
sqlserver.exe process
>to determine whether your application (and your code) is
satisfactory. As a
>developer, you should assume that sqlserver.exe is fine
and dandy and just
>let it get on with doing whatever it's doing. You should
concentrate on the
>mem usage of your application.exe and any associated
components that you've
>coded/built etc .. if your app exits "cleanly" (ie your
app.exe process
>terminates and therefore releases all resources allocated
to it) then you
>have done your job.
>--
>--
>Kind Regards,
>Robert A. Ellis, MCSD
>Software Developer
>"awolchinsky" <awolchinsky@.bonders.com> wrote in message
>news:04f401c35c6f$33c91fd0$a401280a@.phx.gbl...
>> My application attaches to, and detaches from many
>> databases. When I attach, the sqlservr process memory
>> usage goes up, and when I detach, it sometimes goes back
>> down, sometimes only partly, and sometimes actually goes
>> up. When my application exits, the sqlservr process
never
>> releases the memory. Is this a bug? I'm using ADO15
and
>> I call Close() and Release() on all my connections and
>> recordsets. Is there something else I should be calling
>> to clean up the memory in MSDE?
>
>.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment