Dot bet Sql and memory consumption

  • Thread starter Thread starter marcel
  • Start date Start date
M

marcel

Recently we have been looking at converting our systems over to Dot net.

What has been of concern is the excessive amount of resources that a C# SQL
web page requires as apposed the ASP/SQL

We have recently moved an ASP page to C# this page that creates a sizable
report.

Under WK2000/IIS5 ASP SQL2000 the page requires about 250 meg of RAM

The same page as C# on WK2000/IIS5 and SQL2000 rockets over 500 meg!!

Is this normal does dot net require significantly more RAM to operate than
Classic ASP.


How much RAM does an WK2000 server running Dot Net require (don't say the
more the merrier). I ask this because some of the pages will not display
because the page required more than 60% of the RAM. I've never had this
problem with Classic ASP and I don't know if I can ever get the amount of
RAM into a server to satisfy C#.


Any Ideas, pointers would be of great help.

Marcel
 
Marcel,

First, I would take a very, very good look at how the page was converted. It is very possible that you have not converted elements over correctly (and if the page requires 250MB to process, I would say that you are doing something wrong to begin with) and that they should be addressed first before you look at the hardware requirements are.

Anyways, your web machine probably has more than enough memory to handle ASP.NET (I'm guessing, but if you can run a 250 MB ASP page, then I don't think that ASP.NET is a problem).

Also, you can change the amount of memory that ASP.NET allows to be consumed by the ASP.NET worker process before it is shut down. In the web.config file for the application, you can set the memoryLimit attribute on the processModel element to set the threshold.

Hope this helps.
 
the file is a simple report which displays 13,000 clients that use the
system in the Dot Net I and doing a data bind to a grid control

on the ASP page its a straight
recordset.getstring(,,"</td><td>","</td></tr><tr><td>","&nbsp;") "which
dosent seem to work in C#"

the ASP page displays in about 60 seconds where as dot net crashes out.

Whilst I know that returning this amount of information is asking for
trouble but what concerns me is that Dot Net can't handle something that a
lesser technology can, plus I have other reports that crunch quater of a
million records a week in the a 1500 line item reports and I have no
confidence that Dot net can handle it. Again I don't think allocating more
ram to the process is the point .


Nicholas Paldino said:
Marcel,

First, I would take a very, very good look at how the page was converted.
It is very possible that you have not converted elements over correctly (and
if the page requires 250MB to process, I would say that you are doing
something wrong to begin with) and that they should be addressed first
before you look at the hardware requirements are.
Anyways, your web machine probably has more than enough memory to handle
ASP.NET (I'm guessing, but if you can run a 250 MB ASP page, then I don't
think that ASP.NET is a problem).
Also, you can change the amount of memory that ASP.NET allows to be
consumed by the ASP.NET worker process before it is shut down. In the
web.config file for the application, you can set the memoryLimit attribute
on the processModel element to set the threshold.
Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- nick(d0t)paldino=At-exisconsulting'dot|com

Recently we have been looking at converting our systems over to Dot net.

What has been of concern is the excessive amount of resources that a C# SQL
web page requires as apposed the ASP/SQL

We have recently moved an ASP page to C# this page that creates a sizable
report.

Under WK2000/IIS5 ASP SQL2000 the page requires about 250 meg of RAM

The same page as C# on WK2000/IIS5 and SQL2000 rockets over 500 meg!!

Is this normal does dot net require significantly more RAM to operate than
Classic ASP.


How much RAM does an WK2000 server running Dot Net require (don't say the
more the merrier). I ask this because some of the pages will not display
because the page required more than 60% of the RAM. I've never had this
problem with Classic ASP and I don't know if I can ever get the amount of
RAM into a server to satisfy C#.


Any Ideas, pointers would be of great help.

Marcel
 
Some hints:
1. Since Dataset works with disconnected recordsets it is supposed to keep
the recorsets into memory. If you're working with it than do it smart. Make
it an Application level object and share it among all users as a in-memory
database. If you'll use the Dataset at Session level, or worst, at demand
(page level), all you'll obtain will be a lot of objects that have to be
garbage collected...
2. Remember, the garbage collector does not free objects in order to achieve
performance so all the objects will remain for a while in the pool. You
can't control the GC, you can only notify it that there are disposable
objects and have it run sometime with GC.Collect but that "give your
application some direct control over the garbage collector" as MSDN says.
Anyhow implementing "Dispose" can clean-up of objects before GC frees the
object; see:
ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconimplementingdisposemeth
od.htm in MSDN.
Frankly, GC is smarter than 90% of the programmers that are releasing the
resources; it was designed for that, maybe is not perfect but it does not
have bugs...
3. Another issue is, supposing you're not using the Dataset: does a "Select
* from hugeTable" to create an ASP page is a good approach? All the 10.000
records will be displayed? Does anyone need or can read a page that contains
10.000 records? Or, at page creation you'll select only 100 of them. Then
improve your SQL statements in order to return only the 100 records,
remember, you're not using ADO with "aduseserver", you're using ADO.Net with
disconnected recordsets!
4. Anyhow the memory in use by a .Net application will be larger than the
one needed for a classic ASP application, and will try to use as much as
possible memory in order to improve the performance (to keep a pool of
unused objects ready to be delegated when a new instance of that type is
required). It's your call to find the balance.
 
Back
Top