Performance slows down gradually

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

    Performance slows down gradually

    Is there anyone who can help me with this:

    I have written a fairly complicated vb application of hydrological
    model that does a lot of number crunching. The model creates a set of
    object variables before entering the main loop and then main
    calculations are done within the main loop using the object variables
    previously created. The application starts off with pretty good
    performance. But, after a while, it starts to slow down gradually to
    an unbearable point. In a suspision that file accesses might be
    causing the problem, I turn off the file writing, but no improvements.
    Has anyone experienced similar problem? Any insight would be very much
    appreciated.

    Thanks,

    Chris
  • One Handed Man

    #2
    Re: Performance slows down gradually

    Shot in the dark but . . .

    This may be a memory issue ( either disk or physical memory ) . If your
    program is creating huge quantities of new objects and waiting for the
    garbage collector to come along and remove them, it may be that you are
    using up your physical memory and swaping out to disk.

    Try closing down all other open applications if applicable and see of this
    makes any difference, ( check your physical memory when you get the go
    slow ), if neccesary, put more memory in or start changing your code to
    delete objects once ur done with them.


    Regards - OHM




    cow3 wrote:[color=blue]
    > Is there anyone who can help me with this:
    >
    > I have written a fairly complicated vb application of hydrological
    > model that does a lot of number crunching. The model creates a set of
    > object variables before entering the main loop and then main
    > calculations are done within the main loop using the object variables
    > previously created. The application starts off with pretty good
    > performance. But, after a while, it starts to slow down gradually to
    > an unbearable point. In a suspision that file accesses might be
    > causing the problem, I turn off the file writing, but no improvements.
    > Has anyone experienced similar problem? Any insight would be very much
    > appreciated.
    >
    > Thanks,
    >
    > Chris[/color]


    Comment

    • January Smith

      #3
      Re: Performance slows down gradually

      NuMega has a free profiler tool at :



      This community edition profiler is free and provides a great picture of what
      you code is doing...

      Adios,

      January

      "cow3" <cow3@hotmail.c om> wrote in message
      news:373cefdf.0 311250729.b47f5 91@posting.goog le.com...[color=blue]
      > Is there anyone who can help me with this:
      >
      > I have written a fairly complicated vb application of hydrological
      > model that does a lot of number crunching. The model creates a set of
      > object variables before entering the main loop and then main
      > calculations are done within the main loop using the object variables
      > previously created. The application starts off with pretty good
      > performance. But, after a while, it starts to slow down gradually to
      > an unbearable point. In a suspision that file accesses might be
      > causing the problem, I turn off the file writing, but no improvements.
      > Has anyone experienced similar problem? Any insight would be very much
      > appreciated.
      >
      > Thanks,
      >
      > Chris[/color]


      Comment

      • cow3

        #4
        Re: Performance slows down gradually

        OHM,

        Thanks very much for your advice...
        It seems I didn't explain very well about my problem :(
        When my model slows down, even when it becomes VERY slow, the memory
        usage of the process doesn't fluctuate too much - almost same from the
        beginng till I kill it (I cannot stand it!). As there is about 200MB
        of free memory, I don't think it is a memory deficit problem. As I
        said, it doesn't access the disk either. So I feel I'm left in a
        complete darkness not knowing where to dig!

        Thanks,
        Chris

        "One Handed Man" <Bombay@Duck.ne t> wrote in message news:<bpvtqa$qo 0$1@hercules.bt internet.com>.. .[color=blue]
        > Shot in the dark but . . .
        >
        > This may be a memory issue ( either disk or physical memory ) . If your
        > program is creating huge quantities of new objects and waiting for the
        > garbage collector to come along and remove them, it may be that you are
        > using up your physical memory and swaping out to disk.
        >
        > Try closing down all other open applications if applicable and see of this
        > makes any difference, ( check your physical memory when you get the go
        > slow ), if neccesary, put more memory in or start changing your code to
        > delete objects once ur done with them.
        >
        >
        > Regards - OHM
        >
        >
        >
        >
        > cow3 wrote:[color=green]
        > > Is there anyone who can help me with this:
        > >
        > > I have written a fairly complicated vb application of hydrological
        > > model that does a lot of number crunching. The model creates a set of
        > > object variables before entering the main loop and then main
        > > calculations are done within the main loop using the object variables
        > > previously created. The application starts off with pretty good
        > > performance. But, after a while, it starts to slow down gradually to
        > > an unbearable point. In a suspision that file accesses might be
        > > causing the problem, I turn off the file writing, but no improvements.
        > > Has anyone experienced similar problem? Any insight would be very much
        > > appreciated.
        > >
        > > Thanks,
        > >
        > > Chris[/color][/color]

        Comment

        • One Handed Man

          #5
          Re: Performance slows down gradually

          This is a little bit difficult without more information.

          Basic Questions. . .

          1.) Is the application accessing a remote service ( Such as an SQL server ),
          if so is it waiting for a response ?

          2.) Are you using remote disk letter assignments or URL's
          \\servername\sh are\directory etc ?

          3.) Is this only on your machine or does the application fail on another
          machine also ?


          Other than that, if the application is not to large, you could post either
          that ( zipped ) or your code segment which is causing the problem and maybe
          we could take a closer look.


          Regards - OHM









          cow3 wrote:[color=blue]
          > OHM,
          >
          > Thanks very much for your advice...
          > It seems I didn't explain very well about my problem :(
          > When my model slows down, even when it becomes VERY slow, the memory
          > usage of the process doesn't fluctuate too much - almost same from the
          > beginng till I kill it (I cannot stand it!). As there is about 200MB
          > of free memory, I don't think it is a memory deficit problem. As I
          > said, it doesn't access the disk either. So I feel I'm left in a
          > complete darkness not knowing where to dig!
          >
          > Thanks,
          > Chris
          >
          > "One Handed Man" <Bombay@Duck.ne t> wrote in message
          > news:<bpvtqa$qo 0$1@hercules.bt internet.com>.. .[color=green]
          >> Shot in the dark but . . .
          >>
          >> This may be a memory issue ( either disk or physical memory ) . If
          >> your program is creating huge quantities of new objects and waiting
          >> for the garbage collector to come along and remove them, it may be
          >> that you are using up your physical memory and swaping out to disk.
          >>
          >> Try closing down all other open applications if applicable and see
          >> of this makes any difference, ( check your physical memory when you
          >> get the go slow ), if neccesary, put more memory in or start
          >> changing your code to delete objects once ur done with them.
          >>
          >>
          >> Regards - OHM
          >>
          >>
          >>
          >>
          >> cow3 wrote:[color=darkred]
          >>> Is there anyone who can help me with this:
          >>>
          >>> I have written a fairly complicated vb application of hydrological
          >>> model that does a lot of number crunching. The model creates a set
          >>> of object variables before entering the main loop and then main
          >>> calculations are done within the main loop using the object
          >>> variables previously created. The application starts off with
          >>> pretty good performance. But, after a while, it starts to slow down
          >>> gradually to an unbearable point. In a suspision that file accesses
          >>> might be causing the problem, I turn off the file writing, but no
          >>> improvements. Has anyone experienced similar problem? Any insight
          >>> would be very much appreciated.
          >>>
          >>> Thanks,
          >>>
          >>> Chris[/color][/color][/color]


          Comment

          • cow3

            #6
            Re: Performance slows down gradually

            At this stage, my model is designed to run on a PC and no
            communications with other PCs or access to network disks/DBs is
            implemented. My instinct is that it might be something to do with the
            garbage collection, but do not know how to check :(
            The code is pretty large - over 4000 lines - so it is not appropriate
            to be posted in here and I am not sure if I am allowed to do so.
            Thanks,
            Chris

            "One Handed Man" <Bombay@Duck.ne t> wrote in message news:<bq06tt$id d$1@hercules.bt internet.com>.. .[color=blue]
            > This is a little bit difficult without more information.
            >
            > Basic Questions. . .
            >
            > 1.) Is the application accessing a remote service ( Such as an SQL server ),
            > if so is it waiting for a response ?
            >
            > 2.) Are you using remote disk letter assignments or URL's
            > \\servername\sh are\directory etc ?
            >
            > 3.) Is this only on your machine or does the application fail on another
            > machine also ?
            >
            >
            > Other than that, if the application is not to large, you could post either
            > that ( zipped ) or your code segment which is causing the problem and maybe
            > we could take a closer look.
            >
            >
            > Regards - OHM
            >
            >
            >
            >
            >
            >
            >
            >
            >
            > cow3 wrote:[color=green]
            > > OHM,
            > >
            > > Thanks very much for your advice...
            > > It seems I didn't explain very well about my problem :(
            > > When my model slows down, even when it becomes VERY slow, the memory
            > > usage of the process doesn't fluctuate too much - almost same from the
            > > beginng till I kill it (I cannot stand it!). As there is about 200MB
            > > of free memory, I don't think it is a memory deficit problem. As I
            > > said, it doesn't access the disk either. So I feel I'm left in a
            > > complete darkness not knowing where to dig!
            > >
            > > Thanks,
            > > Chris
            > >
            > > "One Handed Man" <Bombay@Duck.ne t> wrote in message
            > > news:<bpvtqa$qo 0$1@hercules.bt internet.com>.. .[color=darkred]
            > >> Shot in the dark but . . .
            > >>
            > >> This may be a memory issue ( either disk or physical memory ) . If
            > >> your program is creating huge quantities of new objects and waiting
            > >> for the garbage collector to come along and remove them, it may be
            > >> that you are using up your physical memory and swaping out to disk.
            > >>
            > >> Try closing down all other open applications if applicable and see
            > >> of this makes any difference, ( check your physical memory when you
            > >> get the go slow ), if neccesary, put more memory in or start
            > >> changing your code to delete objects once ur done with them.
            > >>
            > >>
            > >> Regards - OHM
            > >>
            > >>
            > >>
            > >>
            > >> cow3 wrote:
            > >>> Is there anyone who can help me with this:
            > >>>
            > >>> I have written a fairly complicated vb application of hydrological
            > >>> model that does a lot of number crunching. The model creates a set
            > >>> of object variables before entering the main loop and then main
            > >>> calculations are done within the main loop using the object
            > >>> variables previously created. The application starts off with
            > >>> pretty good performance. But, after a while, it starts to slow down
            > >>> gradually to an unbearable point. In a suspision that file accesses
            > >>> might be causing the problem, I turn off the file writing, but no
            > >>> improvements. Has anyone experienced similar problem? Any insight
            > >>> would be very much appreciated.
            > >>>
            > >>> Thanks,
            > >>>
            > >>> Chris[/color][/color][/color]

            Comment

            • One Handed Man

              #7
              Re: Performance slows down gradually

              Yes, 4000 lines is rather large, is it not ?

              I suggest then that you read up on garbage collection and examine your code.
              Try and think of a way of sectioning your code so as to test various
              classes/modules to see if you can establish the culprit.

              I know this is not any direct help, but at the end of the day it is a
              process of elimination which will get you the answer to this conundrum.

              Let us know how you proceed and if we can be of any specific help along the
              way.


              Regards - OHM






              cow3 wrote:[color=blue]
              > At this stage, my model is designed to run on a PC and no
              > communications with other PCs or access to network disks/DBs is
              > implemented. My instinct is that it might be something to do with the
              > garbage collection, but do not know how to check :(
              > The code is pretty large - over 4000 lines - so it is not appropriate
              > to be posted in here and I am not sure if I am allowed to do so.
              > Thanks,
              > Chris
              >
              > "One Handed Man" <Bombay@Duck.ne t> wrote in message
              > news:<bq06tt$id d$1@hercules.bt internet.com>.. .[color=green]
              >> This is a little bit difficult without more information.
              >>
              >> Basic Questions. . .
              >>
              >> 1.) Is the application accessing a remote service ( Such as an SQL
              >> server ), if so is it waiting for a response ?
              >>
              >> 2.) Are you using remote disk letter assignments or URL's
              >> \\servername\sh are\directory etc ?
              >>
              >> 3.) Is this only on your machine or does the application fail on
              >> another machine also ?
              >>
              >>
              >> Other than that, if the application is not to large, you could post
              >> either that ( zipped ) or your code segment which is causing the
              >> problem and maybe we could take a closer look.
              >>
              >>
              >> Regards - OHM
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >> cow3 wrote:[color=darkred]
              >>> OHM,
              >>>
              >>> Thanks very much for your advice...
              >>> It seems I didn't explain very well about my problem :(
              >>> When my model slows down, even when it becomes VERY slow, the memory
              >>> usage of the process doesn't fluctuate too much - almost same from
              >>> the beginng till I kill it (I cannot stand it!). As there is about
              >>> 200MB of free memory, I don't think it is a memory deficit problem.
              >>> As I said, it doesn't access the disk either. So I feel I'm left in
              >>> a complete darkness not knowing where to dig!
              >>>
              >>> Thanks,
              >>> Chris
              >>>
              >>> "One Handed Man" <Bombay@Duck.ne t> wrote in message
              >>> news:<bpvtqa$qo 0$1@hercules.bt internet.com>.. .
              >>>> Shot in the dark but . . .
              >>>>
              >>>> This may be a memory issue ( either disk or physical memory ) . If
              >>>> your program is creating huge quantities of new objects and waiting
              >>>> for the garbage collector to come along and remove them, it may be
              >>>> that you are using up your physical memory and swaping out to disk.
              >>>>
              >>>> Try closing down all other open applications if applicable and see
              >>>> of this makes any difference, ( check your physical memory when you
              >>>> get the go slow ), if neccesary, put more memory in or start
              >>>> changing your code to delete objects once ur done with them.
              >>>>
              >>>>
              >>>> Regards - OHM
              >>>>
              >>>>
              >>>>
              >>>>
              >>>> cow3 wrote:
              >>>>> Is there anyone who can help me with this:
              >>>>>
              >>>>> I have written a fairly complicated vb application of hydrological
              >>>>> model that does a lot of number crunching. The model creates a set
              >>>>> of object variables before entering the main loop and then main
              >>>>> calculations are done within the main loop using the object
              >>>>> variables previously created. The application starts off with
              >>>>> pretty good performance. But, after a while, it starts to slow
              >>>>> down gradually to an unbearable point. In a suspision that file
              >>>>> accesses might be causing the problem, I turn off the file
              >>>>> writing, but no improvements. Has anyone experienced similar
              >>>>> problem? Any insight would be very much appreciated.
              >>>>>
              >>>>> Thanks,
              >>>>>
              >>>>> Chris[/color][/color][/color]


              Comment

              • cow3

                #8
                Re: Performance slows down gradually

                January,
                Wow, this is a great tool and I cannot believe it is free!
                Thousand times thanks ;)
                Chris

                "January Smith" <january@texas. net> wrote in message news:<eATRlR3sD HA.3196@TK2MSFT NGP11.phx.gbl>. ..[color=blue]
                > NuMega has a free profiler tool at :
                >
                > http://www.compuware.com/products/de...evPartner&sf=1
                >
                > This community edition profiler is free and provides a great picture of what
                > you code is doing...
                >
                > Adios,
                >
                > January
                >
                > "cow3" <cow3@hotmail.c om> wrote in message
                > news:373cefdf.0 311250729.b47f5 91@posting.goog le.com...[color=green]
                > > Is there anyone who can help me with this:
                > >
                > > I have written a fairly complicated vb application of hydrological
                > > model that does a lot of number crunching. The model creates a set of
                > > object variables before entering the main loop and then main
                > > calculations are done within the main loop using the object variables
                > > previously created. The application starts off with pretty good
                > > performance. But, after a while, it starts to slow down gradually to
                > > an unbearable point. In a suspision that file accesses might be
                > > causing the problem, I turn off the file writing, but no improvements.
                > > Has anyone experienced similar problem? Any insight would be very much
                > > appreciated.
                > >
                > > Thanks,
                > >
                > > Chris[/color][/color]

                Comment

                • One Handed Man

                  #9
                  Re: Performance slows down gradually

                  Did this help resolve your issues ?

                  Regards - OHM


                  cow3 wrote:[color=blue]
                  > January,
                  > Wow, this is a great tool and I cannot believe it is free!
                  > Thousand times thanks ;)
                  > Chris
                  >
                  > "January Smith" <january@texas. net> wrote in message
                  > news:<eATRlR3sD HA.3196@TK2MSFT NGP11.phx.gbl>. ..[color=green]
                  >> NuMega has a free profiler tool at :
                  >>
                  >>[/color][/color]
                  http://www.compuware.com/products/de...evPartner&sf=1[color=blue][color=green]
                  >>
                  >> This community edition profiler is free and provides a great picture
                  >> of what you code is doing...
                  >>
                  >> Adios,
                  >>
                  >> January
                  >>
                  >> "cow3" <cow3@hotmail.c om> wrote in message
                  >> news:373cefdf.0 311250729.b47f5 91@posting.goog le.com...[color=darkred]
                  >>> Is there anyone who can help me with this:
                  >>>
                  >>> I have written a fairly complicated vb application of hydrological
                  >>> model that does a lot of number crunching. The model creates a set
                  >>> of object variables before entering the main loop and then main
                  >>> calculations are done within the main loop using the object
                  >>> variables previously created. The application starts off with
                  >>> pretty good performance. But, after a while, it starts to slow down
                  >>> gradually to an unbearable point. In a suspision that file accesses
                  >>> might be causing the problem, I turn off the file writing, but no
                  >>> improvements. Has anyone experienced similar problem? Any insight
                  >>> would be very much appreciated.
                  >>>
                  >>> Thanks,
                  >>>
                  >>> Chris[/color][/color][/color]


                  Comment

                  • cow3

                    #10
                    Re: Performance slows down gradually

                    Well, not yet. But I am sure this tool will be of a great help to
                    pinpoint my problem.
                    Thanks,
                    Chris


                    "One Handed Man" <Bombay@Duck.ne t> wrote in message news:<bq2792$6c 7$1@hercules.bt internet.com>.. .[color=blue]
                    > Did this help resolve your issues ?
                    >
                    > Regards - OHM
                    >
                    >
                    > cow3 wrote:[color=green]
                    > > January,
                    > > Wow, this is a great tool and I cannot believe it is free!
                    > > Thousand times thanks ;)
                    > > Chris
                    > >
                    > > "January Smith" <january@texas. net> wrote in message
                    > > news:<eATRlR3sD HA.3196@TK2MSFT NGP11.phx.gbl>. ..[color=darkred]
                    > >> NuMega has a free profiler tool at :
                    > >>
                    > >>[/color][/color]
                    > http://www.compuware.com/products/de...evPartner&sf=1[color=green][color=darkred]
                    > >>
                    > >> This community edition profiler is free and provides a great picture
                    > >> of what you code is doing...
                    > >>
                    > >> Adios,
                    > >>
                    > >> January
                    > >>
                    > >> "cow3" <cow3@hotmail.c om> wrote in message
                    > >> news:373cefdf.0 311250729.b47f5 91@posting.goog le.com...
                    > >>> Is there anyone who can help me with this:
                    > >>>
                    > >>> I have written a fairly complicated vb application of hydrological
                    > >>> model that does a lot of number crunching. The model creates a set
                    > >>> of object variables before entering the main loop and then main
                    > >>> calculations are done within the main loop using the object
                    > >>> variables previously created. The application starts off with
                    > >>> pretty good performance. But, after a while, it starts to slow down
                    > >>> gradually to an unbearable point. In a suspision that file accesses
                    > >>> might be causing the problem, I turn off the file writing, but no
                    > >>> improvements. Has anyone experienced similar problem? Any insight
                    > >>> would be very much appreciated.
                    > >>>
                    > >>> Thanks,
                    > >>>
                    > >>> Chris[/color][/color][/color]

                    Comment

                    Working...