Re: why does minimizing my app cut mem usage by 90%?
From: Alexander Grigoriev (alegr_at_earthlink.net)
Date: 06/28/04
- Next message: Rick Lee: "Re: Scroll Bar not showing in view"
- Previous message: Scott McPhillips [MVP]: "Re: Question of worker thread"
- In reply to: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Next in thread: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Reply: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 27 Jun 2004 17:39:02 -0700
Trimming working set could make sense with smaller RAM sizes, but not
anymore. It makes Windows paging even more sluggish. I could never
understand why a XP system with 1 GB of RAM has to page the applications
back in after user session switch. Apparently, switch to another user
session minimizes all the applications in the first session (they will get
restored in wrong Z-order, too). Their working set gets trimmed. But why a
free page request gets satisfied from those "candidate" pages, not from
really free memory, which is plenty? Why file cache may get bloated without
a limit, by expense of application memory, starving the applications? MS
programmers don't seem to get a second thought about their paging system
performance. It's sad.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:4f9ud0heucoud9859sjkdpgpvflnqncdvo@4ax.com...
> I'd not seen that article; thanks for pointing it out. But it just proves
my continuing
> assertion that the values returned by task manager for program size are
essentially
> meaningless, and cannot be trusted.
>
> It is worth pointing out that "minimizing" an app as he desires to do
actually doesn't
> minimize its memory footprint; it merely pessimizes its performance,
because those pages
> have to be paged back in anyway. The OS is quite capable of removing the
pages itself if
> they haven't been used in a while, so why waste any effort?
>
> Or, this shows that people always want to optimize the wrong thing.
Creating a minimum
> memory footprint at the expense of significantly increased paging effort
is certainly a
> very losing idea. A page fault costs approximately six orders of magnitude
performance
> penalty on an access over accessing the value in memory.
>
> Bottom line: don't waste time solving problems that don't exist, while
creating whole new
> problems you are not aware of.
> joe
>
> On Thu, 24 Jun 2004 21:35:50 -0700, "Alexander Grigoriev"
<alegr@earthlink.net> wrote:
>
> >http://support.microsoft.com/default.aspx?scid=kb;en-us;Q293215
> >
> >"Nobody" <nobody@cox.net> wrote in message
> >news:gQNCc.1014$_I3.412@lakeread03...
> >> I have an MFC application that upon startup uses about 20MB of memory
> >> according to task manager. I noticed that if I minimize the app, memory
> >goes
> >> down to about 1MB to 2MB and never returns to 20MB even if I restore
the
> >> app.
> >>
> >> I noticed every other app does this as well. VStudio from 50MB to about
> >3MB,
> >> Outlook from 57MB to 5MB, etc.
> >>
> >> Seems like some garbage collection is getting called or something?
> >>
> >> How can I trigger this behavior without programatically minimizing my
app
> >> which looks ugly on the screen.
> >>
> >>
> >
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Rick Lee: "Re: Scroll Bar not showing in view"
- Previous message: Scott McPhillips [MVP]: "Re: Question of worker thread"
- In reply to: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Next in thread: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Reply: Joseph M. Newcomer: "Re: why does minimizing my app cut mem usage by 90%?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|