Re: Drastic slow-down in the execution time of my program
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Thu, 25 Jun 2009 19:14:26 -0700
Marcelo R wrote:
Thanks again. The test program is a single-thread console
application. At the beginning it opens a file and reads its contents
into an array of 768 K bytes. The file is closed and then the
calculations are done on this array. No extra memory is allocated.
I think you might be on to something with the cache idea. The
computers have only 512 MB of RAM. I added another 512 MB to one of
them and it has been running without slowing down for a few hours.
Still early to say, but maybe that's a solution.
Interesting. Rather than cache, I'd wonder if you're experiencing some kind
of virtual memory thrashing. Try using Perfmon to monitor the hard page
fault rate (Object: Memory, Counter: Page Reads/Sec). Adding memory is
unlikely to significantly affect cache alignment, but it can absolutely
affect virtual memory layout. For what you describe, 512MB sounds like it
ought to be plenty, but if adding RAM improved it, I'd be highly suspicious
of thrashing.
The CPU is a Pentium 4 2.8GHz. I am not sure any of the other
computers that I tested has the same CPU.
Well, that's an ordinary enough CPU, so it doesn't sound like there's
anything to worry bout there.
-cd
.
- Follow-Ups:
- Re: Drastic slow-down in the execution time of my program
- From: Marcelo R
- Re: Drastic slow-down in the execution time of my program
- References:
- Drastic slow-down in the execution time of my program
- From: Marcelo R
- Re: Drastic slow-down in the execution time of my program
- From: Carl Daniel [VC++ MVP]
- Re: Drastic slow-down in the execution time of my program
- From: Marcelo R
- Re: Drastic slow-down in the execution time of my program
- From: Carl Daniel [VC++ MVP]
- Re: Drastic slow-down in the execution time of my program
- From: Marcelo R
- Drastic slow-down in the execution time of my program
- Prev by Date: Re: Drastic slow-down in the execution time of my program
- Next by Date: Tring to get dialog to use WS_EX_NOACTIVATE for VC++6.0
- Previous by thread: Re: Drastic slow-down in the execution time of my program
- Next by thread: Re: Drastic slow-down in the execution time of my program
- Index(es):