Jump to content

Help me understand Windows XP memory management


BigDaddy

Recommended Posts

I do not understand Windows XP memory management.

1.In TASK manager under the MEM USAGE if I were to sum it all up and then subtract it from 2GB of my RAM I should have much more RAM free than it says under the Available Physical memory.

2. What is the system cache also in the task manager?

3. what is the peak mem usage also in the task manager?

Link to comment
Share on other sites


1.In TASK manager under the MEM USAGE if I were to sum it all up and then subtract it from 2GB of my RAM I should have much more RAM free than it says under the Available Physical memory

That number minus the RAM your Hardware utilizes. Try the Performance tab and look at the Physical Memory block. That available number is probably a little more accurate. The 'Total' in that block already subtracts your peripherals.

Peak MEM USAGE= the max amount of RAM that application has allocated at any one time during the session?

System Cache= System Cache tells you how much memory is being used as disk cache (memory acting as the hard disk essentially, much faster access)

Link to comment
Share on other sites

Just a quick point: the mem usage column in task manager isn't actually what you'd think it is. Everything is named in weird misleading ways. What you want is actually called private bytes, and under XP's task manager, it's labelled as "VM Size" (not there by default). And you can't calculate this easy, due to shared pages, address ranges used by hardware (and also things like onboard video that may use a fair bit), limits of the x86 architecture and what not. We could discuss this for a hundred posts easily.

If you want to look at how much memory (virtual, physical, etc) as well as other resources some apps take, use Process Explorer, not the crappy and very misleading task manager.

Link to comment
Share on other sites

What you ask is so much deeper and far-reaching than I think you understand. Pick up the book "Windows Internals, 4th Edition" and read chapters 2, 4, 7, and 11 (well, read the whole book, of course, but these are the "memory" chapters). That's 262 pages of nothing but memory management and structures ;).

Basically, use process explorer and performance monitor, not task manager. What you see is not entirely accurate, and does not mean what you think it means.

If you really want to get deep, even though it's not entirely an accurate measurement, see this thread I posted awhile back.

Link to comment
Share on other sites

Hello cluberti,

In the Windows XP SP3, I followed the instructions mentioned in the above post, but I have 2 doubts:

1-) In the Performance Monitor, after I add the 4 counters, in the "System Monitor Properties", in the "Graph Tab", in the option "Vertical Scale", which should be the value to set (default is 100) since I have 512 MB of RAM?

2-) Now, in the "Data Tab", in the option "Value Scale" (default is "default"), which should be the correct value to set here based in the configuration above?

I have tried many values, but I never can see the 4 lines of the 4 counters at the same time in the graph displayed in the "performance monitor".

Thanks in advanced.

Anderton.

Link to comment
Share on other sites

Hello cluberti,

In the Windows XP SP3, I followed the instructions mentioned in the above post, but I have 2 doubts:

1-) In the Performance Monitor, after I add the 4 counters, in the "System Monitor Properties", in the "Graph Tab", in the option "Vertical Scale", which should be the value to set (default is 100) since I have 512 MB of RAM?

2-) Now, in the "Data Tab", in the option "Value Scale" (default is "default"), which should be the correct value to set here based in the configuration above?

I have tried many values, but I never can see the 4 lines of the 4 counters at the same time in the graph displayed in the "performance monitor".

Thanks in advanced.

Anderton.

It's just a graph - set it to whatever # will allow you to see the counters. Also note though, those counter numbers are available in the boxes under the graph when one of the values are highlighted.

Link to comment
Share on other sites

Hello cluberti,

Thank you very much for these fantastic instructions.

Now I can monitor many events that happen to my RAM. Great tip!

After some tests until my graph is working perfectly now.

Bye, bye "Task Manager"…

memorymonitorbw5.th.jpgthpix.gif

Best regards, :thumbup

Anderton.

Link to comment
Share on other sites

I did this:

http://www.msfn.org/board/index.php?s=&amp...st&p=729331

but the figures are strange on my Pentium 3 1Ghz 512MB ram with Windows 2003 Enterprise running DNS,DHCP,RRAS(for internet sharing 3 client PCs),FileZilla FTP server without any open programs. Look:

Available Bytes	361000000
Cache Bytes 42000000
Pool Nonpaged 15000000
Working Set 110000000
sum 528000000
512-sum -16000000

What am I doing wrong?

Edited by BigDaddy
Link to comment
Share on other sites

What am I doing wrong?

Your math. If you convert bytes to MB and then do the math, it's easier:

Available = 352.539MB

Cache = 41.015MB

Pool Nonpaged = 14.648MB

Working Set = 107.421MB

RAM = 524.288MB

sum = 515.623MB

You end up with approximately 8.665MB unaccounted for (which, knowing that the #s are not entirely accurate due to shared pages, paging, etc, means this is pretty close - within 8MB). There's nothing wrong here.

Link to comment
Share on other sites

cluberti

I see the error now.

But what I do not understand is what does this ~8MB mean? Does it mean that only 8MB of RAM is left for the machine or what?

ps. If I also launch Firefox, uTorrent, Excel than the number comes down to ~1MB.

Link to comment
Share on other sites

You had like 360mb available to the system in your last shot.

I believe the 8mb cluberti was referencing was the difference between the Total Ram and the Sum.

and if you are down to a 1MB variance you are getting far better readings than I.

Link to comment
Share on other sites

but what does this difference even tell me?

and what variance do you talk about?

this is how my latest attempt looks like.

in MB
Available 335,3359375
Cache 38,50390625
Pool Nonpaged 14,0546875
Working Set 122,3046875
sum 510,1992188
Ram-sum 1,80078125

Edited by BigDaddy
Link to comment
Share on other sites

but what does this difference even tell me?

and what variance do you talk about?

Using these counters and the math, you're determining how accurate your perfmon readings are (determining the RAM footprint, and how accurate your "Available Bytes" counter is). Since you're within about 8-10MB after adding these counters and subtracting from 512MB, you can be fairly certain that your do indeed have somewhere near 350MB of 512MB available, so your RAM footprint is approximately 162MB (when this data was captured, of course).

In your second set of data, opening applications made your working set total increase and caused a small cached bytes decrease - windows was likely lowering the amount of data in the cache so that more RAM was available for working set usage, and the working set increased because more apps were opened (thus more working set virtual address space to run program binaries and store process data). What you see is normal - I don't know how much clearer I can make this, this isn't Windows 101, and this is as basic as I can make it without it being totally useless.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...