Re: working set and console applications
- From: "Matt" <none@xxxxxxxx>
- Date: Thu, 18 Oct 2007 09:32:54 -0500
Thank you for your detailed response Jeffery!
I created a windows application and then I created a child console process
that I started from the parent process using CreateProcess(). After
creating the child console, I attached the parent application to it using
AttachConsole().
If I minimize the windows application, I see no change in the working set as
long as I override the default SC_MINIMIZE sys command handler. However, if
I minimize the child console window it also causes the working set of the
parent application to be trimmed.
The only thing that gives me the behavior that I desire is if I create an
IPC connection between the parent and child process instead of using
AttachConsole(). Is it by design that minimizing a console window always
trims the working set of all processes attached to that console window?
""Jeffrey Tan[MSFT]"" <jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:t0lQhATEIHA.4664@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Matt,
I have consulted this issue with another kernel developer. Below is his
comment:
"This behavior is removed in Vista/Win2008. There's not a way to change it
in previous OS versions though you could work around it by splitting the
main process off of the console.
The process is not forced to disk at the point it's minimized though. The
pages are placed on the standby and, if a modified page, the modified
list.
The pages can be soft faulted back in as long as they remain in memory.
The pages on the modified list will be written to disk and then placed on
the standby list. Of course, pages on the standby list are subject to
re-use so if something on the system is are allocating other pages (and
not
freeing them at the same rate; for example reading in a large file in a
random fashion) then the pages on the standby list can be repurposed
forcing the contents to subsequently be read from disk. Thus more memory
may help their performance in the short term."
So, I think the best solution currently is splitting the main process code
into a separate process, such as a Windows Service. Then, it will not be
affected by the console window minimize. Also, you may try a large
physical
memory machine to see if the performance will improve.(This will help to
prevent the standby list from re-used by other purpose, which improves the
performance)
Hope it helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: working set and console applications
- From: "Jeffrey Tan[MSFT]"
- Re: working set and console applications
- References:
- working set and console applications
- From: Matt
- Re: working set and console applications
- From: Pavel Lebedinsky [MSFT]
- Re: working set and console applications
- From: Matt
- Re: working set and console applications
- From: "Jeffrey Tan[MSFT]"
- working set and console applications
- Prev by Date: debug symbols for .net 3.0
- Next by Date: Re: Which part of the system is stopped during the kernell debugging?
- Previous by thread: Re: working set and console applications
- Next by thread: Re: working set and console applications
- Index(es):
Relevant Pages
|