Author Topic: question about cleanmem and commit memory  (Read 15523 times)

0 Members and 1 Guest are viewing this topic.

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
question about cleanmem and commit memory
« on: September 09, 2012, 07:12:05 PM »
Hi,

I have a basic question I'm wondering about.  I have XP SP3, with 2 Gigs of memory.  As I use IE8, I notice the commit memory going up in Task Manager.  I have assumed that once the commit charge gets higher than 2 Gigs, I'm starting to use my swap file.  Is that correct?

But I just installed cleanmem, and it shows I'm using 745 Meg, about 35%, even though my commit charge is 2.5 Gig.

If my commit charge is 2.5 Gig, doesn't that mean all my memory is used?  Then why does cleanmem say 35%?

Thanks for any thoughts!

PcWinTech.com Forums

question about cleanmem and commit memory
« on: September 09, 2012, 07:12:05 PM »

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: question about cleanmem and commit memory
« Reply #1 on: September 10, 2012, 11:32:05 AM »
The Windows Task Manager utility for Windows XP and Server 2003, in its Performance tab, shows three counters related to commit charge:

Total is the amount of pagefile-backed virtual address space in use, i.e., the current commit charge. This is composed of main memory (RAM) and disk (pagefiles). The corresponding performance counter is called "Committed Bytes".

Limit is the maximum possible value for Total; it is the sum of the current pagefile size plus the physical memory available for pageable contents (this excludes RAM that is assigned to non-pageable areas). The corresponding performance counter is called "Commit Limit".

Peak is the highest amount that the total commit charge has reached since the operating system was last started.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
Re: question about cleanmem and commit memory
« Reply #2 on: September 10, 2012, 03:19:57 PM »
hi and thanks.

The total is what I was asking about.  It currently says 2.4 Gigs is committed.

But cleanmem says I'm using 37%, 750 MB, of my memory.  How can that be? 

If my commit charge is 2.4 Gigs, that means I'm using 100% of my memory, and I've started to use my swap file.  Is that correct?

I don't understand.  Is cleanmem measuring something different?

Thanks.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: question about cleanmem and commit memory
« Reply #3 on: September 11, 2012, 10:54:24 AM »
Commit total is composed of main memory (RAM) and disk (pagefiles). And the page file is simply what Windows has allotted, not what it is using.

Cleanmem is only showing the Memory (Ram) :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
Re: question about cleanmem and commit memory
« Reply #4 on: September 11, 2012, 04:11:15 PM »
Hi,

Thanks, but I guess my question is not clear enough.  I'll try again.

My commit memory is currently at 2.5G.  That means the computer has used all (100%) of my ram, and is using .5G of my swap file.  Is that correct?

If that is correct, then why does cleanmem report I'm only using 37% of my ram.

Which one is correct - commit memory showing I've used 100% of ram, or cleanmem showing I've used 37% of ram?

Sorry to be insistent, but it doesn't make sense.

Thanks.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: question about cleanmem and commit memory
« Reply #5 on: September 11, 2012, 11:04:34 PM »
Quote
My commit memory is currently at 2.5G.  That means the computer has used all (100%) of my ram, and is using .5G of my swap file.  Is that correct?

No that is not what commit means :wink:

http://en.wikipedia.org/wiki/Commit_charge

"These do not show how much has actually been written to the pagefile, but only the maximum potential pagefile usage: The amount of pagefile that would be used if all current contents of RAM had to be remove"

It means the potential max amount of all memory and page file.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
Re: question about cleanmem and commit memory
« Reply #6 on: September 13, 2012, 08:47:35 AM »
Ok, so since I have 2G of memory, when my commit charge says 1.1G, what does that mean in practical terms?

How much of my main memory have I used?

When my commit charge says 2.1G, how much of my main memory have I used?

I gues what I'm trying to understand is, how do I know when I'm starting to use my swapfile.  It seemed to me, that as soon as my commit memory goes over 2G, my system starts to get slower, so I thought it means I'm starting to use the swap file.

Thanks for any insights.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: question about cleanmem and commit memory
« Reply #7 on: September 13, 2012, 09:43:52 AM »
Windows is always using the swap file. It just uses it more as you get lower on free memory.

Some programs have memory leaks that leak into the page file. And as the program runs for long periods the page file becomes full and Windows says it is out virtual memory. When you close these leaking programs all that is freed up again.

Cleanmem only cleans the working set, or actual memory the program is using. It asks Windows to do this. MS gave no API or calls to clear anything with the page file, so only Windows has total control over that.

When cleanmem calls windows to clean up the memory the memory is moved to the system cache in memory, after a small amount of time that memory is freed up. Only a very small portion may get pushed to the page file if Windows decided to. Otherwise the memory is free and the page file doesn't grow.

What causes the leak in the page file is the program causing Windows to keep reserving more virtual memory for the program

In the task manger see if you have a column of  Memory - Commit Size (Amount of virtual memory that is reserved for use by a process.)

Find the process that has the highest when your commit grows and try closing that program and see how much is freed up.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
Re: question about cleanmem and commit memory
« Reply #8 on: September 18, 2012, 12:33:04 PM »
Aaaahh... ok, now it starts to make sense... thank you very much.

Hope you don't mind if I pick your brain a bit more...

"Windows is always using the swap file"
Is there a good reason to use the swap file if there is still room in memory?  Why would they use the swapfile if my 2G was not used up?

"Some programs have memory leaks"
Yes, I noticed if I leave IE8 running for a few days, the commit charge keeps going up and up.  However, it doesn't always go down when I exit.   The first few days after a reboot it will go down to the starting point, but after a couple days, it will only go down a bit.

I have noticed, now since I started running cleanmem, that commit charge does not go up very much at all now.  It used to go up past 2G after a day or two, but now it stays around 1G, which means I don't need to exit the browser as often.

One "negative" result I noticed, if I leave the browser alone for some hours, and then come back to it and try to go to a web site, it seems to take forever, and in TaskMAnager I can see memory usage going back up to a usable amount.  I suppose cleanmem removed all extra memory while it was idle, but now it needs that memory again to fill my request.

If I change the schedule from the default 15 minutes to maybe 2 hours, would that solve this problem, or would that negate the whole benefits?

"In the task manger see if you have a column of  Memory - Commit Size"
I don't seem to have this column - I only have Mem Usage, Peak Mem usage, Mem delta, VM size.  Maybe VM size is what you're referring to?

Thanks again.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: question about cleanmem and commit memory
« Reply #9 on: September 18, 2012, 04:37:24 PM »
Quote
"Windows is always using the swap file"
Is there a good reason to use the swap file if there is still room in memory?  Why would they use the swapfile if my 2G was not used up?

This is totally up to Windows. I have 8gb of ram and have my page file turned off. Now there is pros and cons to this, but for me the speed increase is worth the cons as none of the cons affect me.

Quote
One "negative" result I noticed, if I leave the browser alone for some hours, and then come back to it and try to go to a web site, it seems to take forever, and in TaskMAnager I can see memory usage going back up to a usable amount.  I suppose cleanmem removed all extra memory while it was idle, but now it needs that memory again to fill my request.

The memory gets moved to the system cache, where after some time it gets freed up. If the process still needs the memory it gets it back right away. This is how you have have cleanmem running when running a heavy 3d game without any hits. But when you left IE alone for a while and the memory was moved to the system cache IE never asked for it back. So when you came back it simply needed to load the memory back.

Quote
I don't seem to have this column - I only have Mem Usage, Peak Mem usage, Mem delta, VM size.  Maybe VM size is what you're referring to?

Not sure, I know on my Windows 7 it was the Memory - Commit Size. I think it XP it was VM.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline fred999

  • PcWinTech Member
  • *
  • Join Date: Sep 2012
  • Posts: 6
  • Karma: 0
Re: question about cleanmem and commit memory
« Reply #10 on: September 23, 2012, 11:24:33 AM »
Ok, that explains a lot..

Thanks for taking the time!!

PcWinTech.com Forums

Re: question about cleanmem and commit memory
« Reply #10 on: September 23, 2012, 11:24:33 AM »