Bookmark and Share

Author Topic: How to run cleanmem *ONLY* if memory usage is x %?  (Read 2259 times)

0 Members and 1 Guest are viewing this topic.

Offline Ma7

  • PcWinTech Member
  • *
  • Join Date: Dec 2010
  • Posts: 7
  • Karma: +0/-0
How to run cleanmem *ONLY* if memory usage is x %?
« on: May 22, 2011, 02:00:37 PM »
Hi there,

I wonder how I can use cleanmem clean memory function ONLY if memory usage is for example 75 %? - I tried to kill the task where it says it cleans after a certain amount of time. But unfortunately after booting memory usage drops from lets say 65 % to 45 % anyway even if I configured cleanmem - or so I thought? - to only do it's  thing if the value is reached (here 75 %).

Reason: Cleanmem IS swapping to pagefile (which is easily seen in resource monitor) and this I want to avoid on slow hdd if it isn't necessary, especially right after or even during the last boot steps.

Question: Is this possible to do with the pro version? How? - I want to use as much RAM as possible and only if that value is reached -> cleanmem to do it's thing.

I am sorry if this was topic here before, I just didn't find it. ;) - Looking forward to hear from you, dear Shane. ;)

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #1 on: May 22, 2011, 03:06:14 PM »
The memory isn't going to the page file. Windows does move a little of the memory to the page file as it does its job. Windows is cleaning the programs, CleanMem just triggers it. You can tell this by using the resource monitor and watching the actual amount of the page file being used.

On my system it is at 50 MB used (Out of a 4 GB page file), ran cleanmem, 300 MB of memory cleaned up, page file usage grew to only 70 MB. I don't want people thinking the memory is just being pushed the the page file which it isn't. The whole goal of CleanMem is to keep Windows from using the hard drive as much as possible. No matter what Windows uses the page file, but the less it does the better. This is why people with slow drives will notice a performance increase as windows will have more free memory to use and not rely on the page file as much.

The memory is moved to the standby list that stays in memory and is freed up after a certain amount of time. Again it is Windows controlling all of this :-)

To have cleanmem only run when a certain amount of memory being used is easy. And sounds like you did it right.
In the pro version of the mini monitor you can set the limit memory limit before it runs cleanmem. And just remove the task scheduler rule. That is the rule that auto runs.

As long as the task scheduler rule is gone you should be good. If your on XP make sure there is not a start up reg key for cleanmem after boot. That might be whats going on :wink:

Let me know if you have any trouble :-)

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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 Ma7

  • PcWinTech Member
  • *
  • Join Date: Dec 2010
  • Posts: 7
  • Karma: +0/-0
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #2 on: May 25, 2011, 03:57:31 PM »
I don't want to talk further about how using cleanmem is leading to pagefile usage. Everyone can test this and then come to own conclusions. - In my experience pagefile usage (swapping out) is bad for performance which is especially annoying if it isn't necessary. - So from now on I avoid using cleanmem regularly after a certain ammount of time (for example all 30 min.).

Earlier I wrote that there was an unexpected drop in memory usage after booting which I suspected cleanmem being accountable for. I have to say this seems to have nothing to do with cleanmem. For whatever reason after the system is booted there is this effect, memory usage is dropping let's say from 65 to 45 percent (Win7 32-bit with 2 GB RAM).

But while testing using cleanmem only when certain ammount of memory usage is reached (I had to start lots of programs for that on a hexacore 4 GB RAM machine) I experienced on 2 machines (the other was vista notebook with 2 GB RAM) heavy crashes doing harm to data on SSD. - I believe the Cleanmem GUI to be part of that because at some point it didn't suddenly react anymore when I wanted to use it's function "Show filecache info" or "Show memory info" with right mouse.

For that reason I uninstalled cleanmem on this 2 machines and wait for an possible update to address those kind of crashes. - On my own system I have now the approach to use cleanmem as less as possible (doing cleaning). - I am happy with showing me how much RAM is used in percentage (the more the better) and then I can decide if I want to clean memory again and if I want to accept the resulting pagefile usage (which I think is much heavier than what you suggest). - And I find that using the RAM (instead of constantly cleaning it!) finally makes things faster. But that's only a feeling maybe .. who knows. ;)

I would be happy if one day this new PRO function (cleaning only if certain percentage of RAM-use is reached) will work 100% without crashes of the GUI and then I will trust this program to do it automatically. - And I am definitely going away from cleaning memory all 30 minutes or even every hour. It just isn't necessary for my usage here. - If a certain amount of RAM is in use of course (let's say 75% or 80%) Cleanmem would be useful to me cleaning some percent free. But it has to work without crashes first and so I wait for next versions to come (if there are any).

I like the new feeling of my system where it seems to better "float in water" (=RAM) because simply more is "cached" and reacts faster when I use it again. - For that I had to stop Cleanmem from doing it's regular work (being time related, for example every hour) to an only-as-needed base (used when percentage is reached).

BTW: Those crashes - trying to reach 75 or 80 % RAM usage, triggering than cleanmem action - did pretty damage to data integrity of various programs/configs and I spent one whole night figuring out what works and what doesn't and with fixing. So you maybe understand why I hesitate to trust cleanmem the way I did before. ;) - Of course it could very well be that cleanmem wasn't the culprit and it's GUI wasn't anymore reacting because of some other program crashed. But however, I noticed Cleanmem twice to be crashed (frozen, with scattered GUI) and so I am careful now. ;)

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #3 on: May 25, 2011, 04:12:42 PM »
Windows does all the cleaning of the memory. It controls what it wants to move to the page file or not and what it keeps in cache.
CleanMem is asking windows to do its cleanup on a process, cleanmem isn't doing the cleaning itself.

Windows 7 memory management is far better than XP. After everything is started up in Windows 7, Windows cleans the memory up, that's why you see the drop.

CleanMem takes advantage of this by letting the user control when Windows does this.

Quote
I like the new feeling of my system where it seems to better "float in water" (=RAM) because simply more is "cached" and reacts faster when I use it again. - For that I had to stop Cleanmem from doing it's regular work (being time related, for example every hour) to an only-as-needed base (used when percentage is reached).

If you are talking the file system cache that can be turned off in the cleanmem settings.

CleanMem is running on a lot of machines. No one has had CleanMem cause any data integrity like you suggest.
In fact I just found out a bank has had cleanmem running on over 2000+ of their systems for the past 2 years on all flavors of windows. (I was happy to find that out)

If the gui is crashing in the mini monitor then all you need to do is change the manifest file.
The manifest file is telling windows to draw the buttons and controls with the windows default ones (To look match the persons system instead of the old square buttons). On some systems, if there is something wrong with those controls the mini monitor will crash or even cause a reboot.
http://forums.pcwintech.com/index.php/topic,1993.0.html

You can edit the manifest file and remove this

  <dependency>
    <dependentAssembly>
      <assemblyIdentity language="*" name="Microsoft.Windows.Common-Controls" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" type="win32" version="6.0.0.0" />
    </dependentAssembly>
  </dependency>

I have a very strong track record of how well cleanmem can help a system run. But every users system is different, so it may or may not be a benefit to you. Use it how ever you like, it is there if you need it. If not just get rid of it :wink:

I have had to many debates over CleanMem and how it works and don't want to get into it again either. :tongue:

If you don't trust cleanmem that's fine. There are some nice system monitors out there that can give you the memory monitoring that you are looking for :-)

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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 Ma7

  • PcWinTech Member
  • *
  • Join Date: Dec 2010
  • Posts: 7
  • Karma: +0/-0
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #4 on: May 25, 2011, 06:48:47 PM »
CleanMem is asking windows to do its cleanup on a process, cleanmem isn't doing the cleaning itself.

Yes, I know all that since I am using cleanmem for years and was always a big defender. ;) - But that doesn't change the fact that cleanmem gets this cleaning thing rolling.

Quote
Windows 7 memory management is far better than XP. After everything is started up in Windows 7, Windows cleans the memory up, that's why you see the drop.

Okay. - Sorry for thinking cleanmem was doing it (even if disabled). ;)

Quote
If you are talking the file system cache that can be turned off in the cleanmem settings.

No, I am not talking about the file cache as I told cleanmem to leave that alone. - The thing is I want to speed up my system as much as possible (who wouldn't?) and of course it has then to use RAM as much as possible. - Always "cleaning" things is giving you slightly bigger chunks of unused RAM but that's nothing you want if system should be snappy. ;)

Please don't misunderstand me. - I was for a very long time a great fan of cleanmem and installed it on every machine I came across (believer that I was *g*) and I even own 3 licenses of Pro version. - But testing systems and comparing them in terms of "felt speed" with and without regularly using cleanmem lead me recently to my conclusion that it is better to use Windows the built in RAM as much as possible. - I don't have any benefit if cleanmem keeps my RAM always only at 35-40 % usage. I want to use as much % RAM as possible for speed reasons. - Of course, if this would lead after a while to constant paging activity it would be a desaster. But the thing is with my usage pattern (I am not a gamer, not doing anything big like video cutting etc.) I am pretty fine with letting Win7 do it's thing. - As I said, it feels like now like a fish in water, my system. :)

And I really appreciate what cleanmem is doing for me. - Right now it is only telling me the RAM usage in different colours, but I plan to use the mentioned function to let cleanmem step in once a certain percentage of RAM use is reached.

Quote
CleanMem is running on a lot of machines. No one has had CleanMem cause any data integrity like you suggest.

Well, I did not tell you that to make you defend yourself. ;) - I am using cleanmem for many, many years and I also NEVER had an incident like that, nothing! - But my problem is/was with the new GUI (of pro version) and I think you should try to make that as reliable as possible. - Meaning that even stray conditions (you are obviously aware of) should be fixed or somehow avoided. I mean without user interaction (like changing manifest files). Maybe you will release a version that isn't freezing under certain conditions? :)

Quote
If the gui is crashing in the mini monitor then all you need to do is change the manifest file.

Well, thanks for this hint but I really think customers shouldn't have to to that on their own because most of them won't be able to do that and even more important: avoiding a (GUI) crash in the first place is better than doing it only after such consequences I had to go through. ;)

I deleted that part of the manifest file (Mini_Monitor.exe) but I am not sure if I saw any change of the GUI though after restarting mini-monitor. So I can't tell if it works and I won't for sure provoke any other crash. ;)

Quote
I have a very strong track record of how well cleanmem can help a system run. But every users system is different, so it may or may not be a benefit to you. Use it how ever you like, it is there if you need it. If not just get rid of it :wink:

Yes, I know. - And I once was a firm believer too.  :tongue: - And I really was sure that having cleanmem always running did very good things to my XP and later Win7 system. - But after feeling the difference of speed without having this cleanup every so and so minutes I had to change my mind about that. ;) - And of course, under different circumstances (for gamers maybe) cleanmem will make a huge difference and speeding things up, but on my everyday-use system it just kept my RAM "free" to often. - Doing it now ONLY when necessary is my solution and for that I am glad cleanmem exists! :-)

For now I stay with manually cleaning but I really hope that GUI crashing thing is in a version to come "fixed" (in a way that doesn't make us customers edit manifest files) and THEN I happily will use cleanmems automatic cleaning function built in the new pro version I bought. ;-)

Quote
I have had to many debates over CleanMem and how it works and don't want to get into it again either. :tongue:

I probably read all of them in the last years and so I understand.  :tongue: - But you should listen to your customers (that exist since pro version) and at least fix all you can about any crash you are aware of. ;-)

Quote
If you don't trust cleanmem that's fine.

No, I trust the "core engine" of cleanmem since I had it for years on many computers running without ANY (!) problem! - My distrust is only with the rather new and maybe not 100% stable GUI. ;)

Quote
There are some nice system monitors out there that can give you the memory monitoring that you are looking for :-)

Well, I bought cleanmem and so I will using that if it's no problem.  :tongue:

And right now everything is fine: system is very smooth running, using the RAM I have bought for exactly this purpose (I did not buy it for cleaning it constantly *g*) and cleanmem shows me how much RAM is in use. - And if it turns RED I can do something about it and start "clean memory now". :)

So you see: happy customer! ;-)

best regards
Ma7

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #5 on: May 25, 2011, 07:10:44 PM »
Glad to hear all that :-)

When it comes to the gui crashing, I don't have that problem at all.

But here is the dilemma, the GUI rely on the windows controls. If those are not working correctly on a users system, it will cause my program to crash. It isn't the program it self causing the crash.

OK, so normally I would remove the program from using the windows controls. But then I have people complaining the program looks out of date and old.

I have attached 2 pics to show the looks of both.

So to me the best way to handle this is to find out why the windows controls is causing the crash and find a way to have it fixed on the users system.
Since I cant replicate the crash I cant fix it. I have to have a user who is willing to work with me to find a fix.

This is a fix I wanted a user to try and they never bothered.
http://forums.pcwintech.com/index.php/topic,1266.msg13257.html#msg13257

These are the 2 files on the system that draw the controls on the program
Comctl32.ocx     
Mscomctl.ocx

The program also uses the VB6 run times.
http://www.microsoft.com/downloads/en/details.aspx?familyid=7b9ba261-7a9c-43e7-9117-f673077ffb3c&displaylang=en

So if your willing to help, try this. Install the VB6 SP6 run times. Then the register the two files (put in a command window)
RegSvr32 C:\Windows\System32\Comctl32.ocx     
RegSvr32 C:\Windows\System32\Mscomctl.ocx

or if on 64 bit

RegSvr32 C:\Windows\SysWOW64\Comctl32.ocx     
RegSvr32 C:\Windows\SysWOW64\Mscomctl.ocx

If I can find what fixes it, then I can put that fix as part of the install to make sure it is fixed on every system.

Thats the part I don't like about programming the most. The more files you need from the system, the more chance those files are messed up on a users system and your program crashes.

This is also why so many programs out there have problems on some systems and others they are fine.

If I had made CleanMem in .Net and a persons .Net was screwed up the program would crash as well. So the only thing I can do is help each person who has trouble and try to find a way to fix it and keep it from happening  :wink:

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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 Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #6 on: May 27, 2011, 11:16:23 AM »
I have another user testing this possible fix now. They did a fresh reinstall of XP. Cleanmem worked fine before hand.
After a new reinstall when they start the mini monitor it crashes.

This is because the common control and/or the runtime files are a older version which has a bug that causes the crash.

This should fix it
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=25437d98-51d0-41c1-bb14-64662f5f62fe&displaylang=en
and
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=7B9BA261-7A9C-43E7-9117-F673077FFB3C&displaylang=en

Waiting to hear back if it worked. If so then I found the fix  :cheesy:

If you want to give it a try let me know how it goes for you.

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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 Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #7 on: May 31, 2011, 03:33:17 PM »
You willing to give the fix a try?

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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 Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 9,779
  • Location: USA
  • Karma: +327/-0
  • "Knowledge should be shared not hidden."
Re: How to run cleanmem *ONLY* if memory usage is x %?
« Reply #8 on: June 15, 2011, 09:39:28 AM »
You still around? I would really like to have someone test this fix for me.

Shane
(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 4 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


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
2029 Views
Last post February 06, 2010, 09:37:46 AM
by Shane
6 Replies
2602 Views
Last post February 15, 2010, 10:21:45 PM
by Gil
1 Replies
1913 Views
Last post April 15, 2010, 04:34:51 PM
by Shane
4 Replies
1718 Views
Last post June 13, 2010, 07:50:08 PM
by screeno
6 Replies
343 Views
Last post February 14, 2012, 06:09:20 PM
by Shane