[Autogenerated] let's look at memory counters.
In task manager and process Explorer.
So let's start with task manager by clicking control,
shift escape to quickly launch it when you launch task manager,
this is what you'll find.
The only memory counter that he's shown is called memo And in parentheses
you see this thing called active private working set.
So the default counter that is shown by task measure in fact
is not a very good counter to look at because it's only
looking at the private working set.
The private memory that is currently in Iran The fact that it's
private memory is actually a good thing but the fact that it's
looking only at the working set, that's not very good.
And that's because you may have a process that commits lots of memory.
And so as it happens at that point in time,
only a small fraction of that could be in physical memory because the
prop might not be doing a lot of work at this time.
But still those memory that memory that is committed is going to be
moving towards the commit limit of the system which means that other
processes will have less memory to work with or less memory to be able
to utilize the correct counter.
The best counter to look at is called commit size
as mentioned the previous video.
So if I go to select columns and look for commit size here it goes.
So here's commit size.
Commit size is the private committed memory in the process if I just sort
this just for fun we can see that in some cases the differences are very
big in some cases the differences are small,
the differences might be big if the process is not very active and
most of its private memory has been paged out but the difference
could be small if the process is very active so it's not really easy
to kind of know that up front, let's for example,
launch Visual Studio here.
Visual Studio is one of those processes that consumes quite a bit of memory.
So if I just look at Visual Studio it becomes the
most consuming memory at this point.
Notice 560 something megabytes is the private committed memory in the process,
only 390 or something megabyte is currently in physical memory and if I
minimize Visual Studio don't use that for a while,
we'll see that the working set will start to decrease because there's less and
less activity and so the member manager may decide to start paging out certain
pages that haven't been used in a while and we'll dig into that into that in
more detail later on in this module.
And so the commit science is the private committed memory and this is
the thing you want to look at in order to figure out whether for
example you have a memory leak on your hands.
The active part here just adds one tiny detail.
In fact there's another column that has exactly the same name,
just without the word active.
Just going to be the private working set and this
has to do with UWP applications.
So if around something like calculator for instance will
get the calculator in Windows 11 here,
so he calculator app here and you'll notice that it consumes some memory,
has some private committed memory and some of that is in physical memory,
but once I minimize it it will turn to zero,
so it will turn to zero in the active private working set,
indicating that no RAM is used by the process.
So this is actually incorrect,
the memory or at least some of that memory is still being used.
However,
the zero here is indication that it is possible from the operating system
perspective to take all that RAM and repurpose it to be used by other
processes because currently the process is minimized and UDP processes have
these special management on top of them,
they behave just like in the mobile world when the
application it goes to the background, then it loses all CPU abilities in fact,
so all the threats are suspended.
And so technically it doesn't really need any memory if I restore that,
it will be going back to what it was or something similar
because now the process is sort of active.
So this only happens for UWP processes and we discussed
that in the first course in this series,
you can see here that also search host is one of those,
it is suspended.
So suspended is the way to kind of tell that this particular
process is currently minimized or in the background and here
goes the same for calculator app.
When they're suspended, you have zero here,
it doesn't mean they consume zero, they're not consuming zero memory,
but it does indicate that this memory can be repurposed without
any issues to other processes as required.
If we go to select columns, there are other counters here related to memory,
such as the private working set normally without the active part.
And you can see there's also the shared memory here and some other stuff related
to kernel memory which we'll discuss in in the next module.
So you can add all of these and you can see here that with the
private working set even for an application that is minimized like
your api application that is suspended.
Still, it actually does consume memory in physical memory at this point.
However, when we restore it,
this might grow a little bit because now the process is more active.
Some threads have executed code there so you can use that as well