Dot bet Sql and memory consumption

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • marcel

    #1

    Dot bet Sql and memory consumption

    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


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Dot bet Sql and memory consumption

    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)paldin o=At-exisconsulting' dot|com

    On Mon, 6 Oct 2003 16:24:31 +1000, marcel <NotHERE@nospam .com.au> wrote:
    [color=blue]
    > 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
    >
    >[/color]


    Comment

    • Horatiu Ripa

      #3
      Re: Dot bet Sql and memory consumption

      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.NETFramework SDKv1.1/cpguidenf/html/cpconimplementi ngdisposemeth
      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 "aduseserve r", 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.
      --
      Horatiu Ripa
      "marcel" <NotHERE@nospam .com.au> wrote in message
      news:ODIV7Q9iDH A.2580@TK2MSFTN GP10.phx.gbl...[color=blue]
      > 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#[/color]
      SQL[color=blue]
      > 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
      >
      >[/color]


      Comment

      • marcel

        #4
        Re: Dot bet Sql and memory consumption

        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.getst ring(,,"</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 [.NET/C# MVP]" <nicholas.paldi no@exisconsulti ng.com> wrote
        in message news:oprwmg8wul a4u15p@msnews.m icrosoft.com...[color=blue]
        > Marcel,
        >
        > First, I would take a very, very good look at how the page was converted.[/color]
        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.[color=blue]
        >
        > Anyways, your web machine probably has more than enough memory to handle[/color]
        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).[color=blue]
        >
        > Also, you can change the amount of memory that ASP.NET allows to be[/color]
        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.[color=blue]
        >
        > Hope this helps.
        >
        > --
        > - Nicholas Paldino [.NET/C# MVP]
        > - nick(d0t)paldin o=At-exisconsulting' dot|com
        >
        > On Mon, 6 Oct 2003 16:24:31 +1000, marcel <NotHERE@nospam .com.au> wrote:
        >[color=green]
        > > 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#[/color][/color]
        SQL[color=blue][color=green]
        > > web page requires as apposed the ASP/SQL
        > >
        > > We have recently moved an ASP page to C# this page that creates a[/color][/color]
        sizable[color=blue][color=green]
        > > 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[/color][/color]
        than[color=blue][color=green]
        > > Classic ASP.
        > >
        > >
        > > How much RAM does an WK2000 server running Dot Net require (don't say[/color][/color]
        the[color=blue][color=green]
        > > 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[/color][/color]
        of[color=blue][color=green]
        > > RAM into a server to satisfy C#.
        > >
        > >
        > > Any Ideas, pointers would be of great help.
        > >
        > > Marcel
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...