[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Handles/Private Bytes/Working Set

Chris Marsh

7/29/2008 1:41:00 PM

All

I have produced a Windows service that performs monitoring tasks every 30
seconds. I left it to run over the weekend, and started a Perfmon log
including various counters for the Windows service process. When I viewed the
log after the weekend, everything had held pretty much steady with the
following exceptions:

Handles - these increased by four, in a linear fashion. The base number of
handles was about 215.

Private Bytes - these increased very, very slowly, by a small amount. The
increase was not constant - the value would hold for some time, then there
would be a small step up.

Working Set - these increased very, very slowly, by a small amount. The
increase was not constant - the value would hold for some time, then there
would be a small step up.


Questions:

1. Should I care about the Working Set? My understanding is that this is the
amount of memory available to the process, not what it is consuming. Does it
matter if it rises? What could cause it to rise?

2. My code was as follows:

var eventLog = new EventLog(log) { Source = source };
eventLog.WriteEntry(message, entryType);

I wondered if this could have caused the increase in Private Bytes, so I
changed it to:

var eventLog = new EventLog(log) { Source = source };
eventLog.WriteEntry(message, entryType);
eventLog.Close();

My PerfMon log shows a completely constant value for Private Bytes so far
today, but the Working Set has risen as before. Admittedly the time that the
log has been running is a less than a quarter of the first test run, though.
Can anyone comment on this?

3. Does anyone have any other comments, based on the information above? I
know I haven't given very much specific information, but perhaps there are
some "Gotchas" with .NET that I am unaware of.

Many thanks in advance for any assistance with this issue.

Cheers!

--
Regards

Chris Marsh
1 Answer

Chris Marsh

7/29/2008 1:44:00 PM

0

All

I've just noticed, the value for Working Set is lower than that for Private
Bytes. I woudl have expected this to be the other way around - am I
misunderstanding these values?

Cheers!

--
Regards

Chris Marsh

"Chris Marsh" wrote:

> All
>
> I have produced a Windows service that performs monitoring tasks every 30
> seconds. I left it to run over the weekend, and started a Perfmon log
> including various counters for the Windows service process. When I viewed the
> log after the weekend, everything had held pretty much steady with the
> following exceptions:
>
> Handles - these increased by four, in a linear fashion. The base number of
> handles was about 215.
>
> Private Bytes - these increased very, very slowly, by a small amount. The
> increase was not constant - the value would hold for some time, then there
> would be a small step up.
>
> Working Set - these increased very, very slowly, by a small amount. The
> increase was not constant - the value would hold for some time, then there
> would be a small step up.
>
>
> Questions:
>
> 1. Should I care about the Working Set? My understanding is that this is the
> amount of memory available to the process, not what it is consuming. Does it
> matter if it rises? What could cause it to rise?
>
> 2. My code was as follows:
>
> var eventLog = new EventLog(log) { Source = source };
> eventLog.WriteEntry(message, entryType);
>
> I wondered if this could have caused the increase in Private Bytes, so I
> changed it to:
>
> var eventLog = new EventLog(log) { Source = source };
> eventLog.WriteEntry(message, entryType);
> eventLog.Close();
>
> My PerfMon log shows a completely constant value for Private Bytes so far
> today, but the Working Set has risen as before. Admittedly the time that the
> log has been running is a less than a quarter of the first test run, though.
> Can anyone comment on this?
>
> 3. Does anyone have any other comments, based on the information above? I
> know I haven't given very much specific information, but perhaps there are
> some "Gotchas" with .NET that I am unaware of.
>
> Many thanks in advance for any assistance with this issue.
>
> Cheers!
>
> --
> Regards
>
> Chris Marsh