Handles/Private Bytes/Working Set

C

Chris Marsh

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!
 
C

Chris Marsh

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top