It is currently September 15th, 2019, 10:59 pm

[SOLVED] Rainmeter Memory Leak and CPU usage raising!

Report bugs with the Rainmeter application and suggest features.
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

[SOLVED] Rainmeter Memory Leak and CPU usage raising!

rkkoszewski » May 3rd, 2015, 11:59 am

Hello, I've made a simple skin to display some info from HwInfo. For a time it was working perfectly (0.1% of CPU usage and below 50MB RAM) no matter how much time it was running.

But now, after 30 minutes the CPU usage is between a constant 9 to 15%..
After one hour or two it gets up to 25% to 30% and raising!!!! (I'm on a i7 PC!!)

The same happens to the RAM usage, after some hours it raises till 300MB and even +500MB!!

What is going on there? Why is it doing this now? And why before not? Is there any way to know what is causing that? In the debug console it's not saying anything useful (No errors, no warnings, nothing, seems all OK).










When did this start to happen?
I first noticed it happening when I was trying out some other 3rd party skins for rainmeter. I removed them inmediately from "My Documents" folder and removed all it's plugins from "%appdata%/Rainmeter/plugins" directory leaving only "HWiNFO.dll" there. But it was still happening. Uninstalling completely Rainmeter. Trying out Rainmeter 3.1,3.2 and 3.3, but it kept happening. I don't know what else to do..







EDIT:
[SOLUTION]
At the end it turned out I had Windows 7 compatibility mode enabled. Disabling any compatibility mode fixed the issue instantly. Hope this will be useful for somebody having the same issue.
You do not have the required permissions to view the files attached to this post.
Last edited by rkkoszewski on May 26th, 2015, 10:11 pm, edited 2 times in total.
User avatar
jsmorley
Developer
Posts: 19440
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

jsmorley » May 3rd, 2015, 12:40 pm

I have not been able to replicate this issue on my system, not now or when you posted about it before.

About that only advice I can give is to be sure you are using absolutely the latest beta version of HWiNFO and the HWiNFO plugin for Rainmeter.

http://rainmeter.net/forum/viewtopic.php?p=105365#p105365
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

rkkoszewski » May 26th, 2015, 11:56 am

Hi, I rechecked and cleaned the whole skin again, but it still keeps happening.

Memory is rising slowly.. and worst of all the every 2 to 5 minutes, it requires about 0.1% of more CPU.

When I start Rainmater it takes about 0.2-0.4% of CPU, after like 15 minutes it's already about 9% of CPU usage and still growing..

Memory leak is not really the problem here, the CPU rising is the great problem here, as I'm using it on a notebook, where the high CPU usage makes the CPU stay at high clocks, killing the battery.

I hope somebody with enough technological knowledge about Rainmeter could have a look at the widgets. It's a total of 9 widgets, where 5 of them are accessing HWiNFO plugin. The plugin is updated to the latest version. But it still keeps happening.

Here is a link to download the skin:
https://mega.co.nz/#!MYkC0SID!e7kutviTWfV-R0rU6Zrh3JB4GbaEGFHhpNNhNKnGvXY


Hope somebody could have a look at the widgets in case the coding is causing this.
Somebody could install the skin and test if the same effect is happening on other PCs too?
Greetings and Thanks.
User avatar
jsmorley
Developer
Posts: 19440
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

jsmorley » May 26th, 2015, 12:23 pm

This is hard. I'm not getting the problem you have, but then I can't really run that skin in a way that is an accurate test, as I don't have nVidia hardware or the same sensor setup you have.

The best advice I can give is to spend some time trying to isolate the issue. By that I man load just one of your skins, restart Rainmeter, watch the CPU / Memory usage over time, and see if it "creeps" on you. Assuming it doesn't, then add another of the skins and repeat. If it starts to creep up after loading a particular skin or skins, then remove those and see if the problem goes away.

The point is to see if you can find out which skin or skins is causing the problem for you.

Rainmeter in and of itself just doesn't have a problem with "leaks" of any kind, so it just has to be either something about the skins you are running, or perhaps, although less likely in my view, something particular about your setup. Some conflict with hardware of some software you are running.

I'd start by eliminating HWiNFO, that nVidiaInspector software, and that 3rd-party font as well from the mix. You want to run your skins in as "vanilla" a way as possible, so we can ensure that Rainmeter itself, and skins just written using the built-in Rainmeter functionality, work ok. Then start adding back in extra things until you hopefully find out what your system doesn't like.

I'm afraid there is no magic bullet here. You just have to spend the time to figure out what in the skins your are running "doesn't" cause Rainmeter problems on your system, check those off the list, and when you are all done, whatever is left is what "does" cause the issue.

The increasing CPU usage is particularly concerning to me. That doesn't really make sense. What that tells me is that something being run by Rainmeter, almost certainly some plugin or addon, is being executed and then never "finishing" or "stopping". Then when it is executed again, another "instance" of it is running. There is nothing in Rainmeter proper that can possibly do that as far as I am aware, so I am very suspicious of something 3rd-party. My very first step would be to eliminate nVidiaInspector and see what happens.

One other thing to watch out for is the RecycleBin plugin in Rainmeter. Due to how it has to watch the "count" and "size" of the items in it, it can use quite a bit more memory and maybe even CPU if you leave the bin "full" with a lot of files and folders all the time. I recommend emptying the bin reasonably regularly.

This might be handy to run while you are testing:

RainmeterProcess
RainmeterProcess_2.0.rmskin
1.png
Working Set Private is probably the best indication of memory usage. That is the amount of actual physical RAM being used by the process, eliminating any "swap" or "shared" considerations. It is what TaskManager displays for "Memory".

Couple of notes on this: There are some parts of Rainmeter that don't use any memory until they are "used", but then once they do, they don't give the memory back. This is a one-time thing, the next time they are used they don't use any additional memory.

1) The Manage Dialog
2) The About Dialog
3) The InputText plugin
4) Perhaps some other "run on demand" plugins like RunCommand.

If you load this skin with Rainmeter, the starting CPU usage will be 100%. That isn't very useful, as it reflects the work Rainmeter itself is doing to "stand up" and load all your skins.

The way I would use this to "watch" Rainmeter is to:

- Load the skin.
- Restart Rainmeter.
- Use the Manage and About dialog, and if you have a skin using InputText, use that skin one time.
- Wait about a minute or so, to ensure that all your skins do all their work at least "one time".
- Refresh the skin.

That should give you a pretty decent "starting point", and you can just leave this skin running to watch Rainmeter's behavior as you work on your computer over the course of time.

Obviously if you find some 3rd-party plugin that is using additional memory or CPU without releasing it every time it is executed, that is going to be a major problem. I have not seen that behavior yet.
You do not have the required permissions to view the files attached to this post.
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

rkkoszewski » May 26th, 2015, 4:29 pm

Thanks a lot @jsmorley,
Will try that out, if I find something new about the issue I'll let you know.
Greetings.

EDIT:
I didn't find any error in the About section.
Couldn't somehow make your skin work, I followed your steps but everything is showing 0 (See in the picture). Started Rainmeter even in Admin mode. Installing Rainmeter 3.3 Beta didn't change anything neider. I noticed though that while having enabled just all non-HWiNFO skins, it seems that RAM is stuck arround 22.5MB (Sometimes even jumps back to 21.9MB..) and CPU arround 0% to 0.1%.

So it's probably an HWiNFO plugin issue with my notebook. The weird thing is that this phenomenon is not happening on my desktop PC where I'm using the same skin.
You do not have the required permissions to view the files attached to this post.
Last edited by rkkoszewski on May 26th, 2015, 5:06 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 19440
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

jsmorley » May 26th, 2015, 4:49 pm

Yeah, do...

Just for grins, I left that RainmeterProcess skin running for a couple of hours, along with my usual complement of skins I use, and I saw no increase at all really.
2.png
I have 20 or so skins, which use HWiNFO, WebParser, Lua scripts, and a decent representation of most of the functionality in Rainmeter. Pretty much the usual suspects; clock, system, network, HWiNFO temperatures, weather, Gmail, recycle bin, a "dock / launcher" skin, and a few RSS feed skins.

When I load Rainmeter and all the skins have a chance to get going, I get a Working Set Private of 23.5 meg or so. After about 10-15 minutes, when all the skins have had an opportunity to exercise, to load and cache all the various little images that are displayed for different states, and other things like that, it nudges up to something that fluctuates between 24.5 and 25.5 meg, depending on what it is doing at any given time.

It basically never grows above that 25.5 meg , no matter how long I leave it running or what I do in the skins.

As for the CPU, that is around 0.8% to 2.0% of CPU, depending on what Rainmeter is doing at any given time, and certainly never "accumulates".
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19440
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

jsmorley » May 26th, 2015, 5:25 pm

rkkoszewski wrote: EDIT:
I didn't find any error in the About section.
Couldn't somehow make your skin work, I followed your steps but everything is showing 0 (See in the picture). Started Rainmeter even in Admin mode. Installing Rainmeter 3.3 Beta didn't change anything neider. I noticed though that while having enabled just all non-HWiNFO skins, it seems that RAM is stuck arround 22.5MB (Sometimes even jumps back to 21.9MB..) and CPU arround 0% to 0.1%.

So it's probably an HWiNFO plugin issue with my notebook. The weird thing is that this phenomenon is not happening on my desktop PC where I'm using the same skin.
That issue with that RainmeterProcess skin is almost certainly this:

http://docs.rainmeter.net/manual/plugins/perfmon

See the Note: at the bottom of that page. That is very likely what is going on for you with that RainmeterProcess skin.

I would highly recommend fixing that, as not only will it keep you from using any PerfMon plugin skins in Rainmeter, but I can't be sure HWiNFO doesn't look at the Performance Monitor Counters when it is working as well. I don't know that, but I'd certainly fix that counter issue and try again. Who knows, we might get lucky and that is pissing off HWiNFO as well.

That aside, I tend to agree that there is just some issue with your notebook computer and the HWiNFO plugin. Not sure what to tell you there other than to make a post over on the HWiNFO forums about it.
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

rkkoszewski » May 26th, 2015, 7:32 pm

It worked. I could bring your skin to work, but no luck in fixing the issue. Here is a screenshot of almost one hour of usage..

Some stuff I noticed is that there is a heavy spike on just one CPU core (Seems to be Rainmeter cuz when I restarted Rainmeter it stopped).

On the other hand when Rainmeter is consuming so much CPU the whole skins get hell laggy, and while dragging them they stop and continue following the mouse intermittently every second till you release the left mouse button to stop dragging them, as if they would get frozen every second and unfrozen the next second, and so on.

I tried setting Update=1000 to Update=2000 but it seems to have the same effect, it just needs twice as much time to get to the same place.

I will write on the HWiNFO forum, maybe they will know some solution.

Greetings and thanks for all till now.
Hope it can be fixed somehow.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19440
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

jsmorley » May 26th, 2015, 9:06 pm

There are some settings in HWiNFO itself under "Settings / Safety" that you might want to play with, just to see if something there helps.
1.png
You do not have the required permissions to view the files attached to this post.
rkkoszewski
Posts: 13
Joined: November 18th, 2014, 12:48 am

Re: [BUG?] Rainmeter Memory Leak and CPU usage raising!!! HE

rkkoszewski » May 26th, 2015, 10:07 pm

Hi jsmorley,
Just found the solution.. !!!

It had nothing to do with the HWiNFO plugin, nor with Rainmeter per se. It seems that it goes all back to one post I made here when I was trying to enable Aero Blur in Rainmeter in Windows 8 (I have Glass8 mod installed [http://www.glass8.eu/] which enables Windows 7 aero blur on Windows 8).

So I set Rainmeter in Windows 7 compatibility mode in case Rainmeter was disabling Aero Blur by checking the Windows version. Seems that I forgot to disable it and this was causing the CPU and Memory leak. Disabling any compatibility mode fixed the whole problem. After some minutes right now, Rainmeter is taking a whopping 6.2MB of ram and a 0 to 0.2% of CPU (Max), which is why I chose Rainmeter for this task at the beginning.

Just want to apologise for this stupid incident and the time lost on this.
At least I hope this will be useful for somebody in the future tinkering with Compatibility modes.

Thanks a lot for the patience and for the awesome useful software.
Greetings.