It is currently April 19th, 2024, 3:12 pm

[D2D][Resolved] Doubled memory consumption w/ no acceleration

Backwards compatibility issues related to the conversion of Rainmeter to D2D.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

[D2D][Resolved] Doubled memory consumption w/ no acceleration

Post by Active Colors »

UPD: fixed used wrong term D2D instead of acceleration.

The memory consumption is doubled in 4.3 r3237 comparing to the latest 4.2 r3111 with no acceleration turned on using a) the same setup of skins b) the empty setup with no skins and clean Rainmeter.ini
Comparison:

4.2 r3111
Some setup of skins:
set42.PNG
Empty setup and clean Rainmeter.ini:
mem42.PNG
4.3 r3237
The same setup of skins:
set43.PNG
Empty setup and clean Rainmeter.ini:
mem43.PNG
However, I do not see any performance issue with D2D turned on.

Code: Select all

Rainmeter 4.3.0.3237 beta (64-bit)
Language: English (1033)
Build time: 2018-08-23 16:00:46
Commit Hash: e1040980
Windows 7 Professional 64-bit (build 7601) Service Pack 1 - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: D:\#Profiles\Active Colors\Rainmeter\Skins\
SettingsPath: C:\Users\User\AppData\Roaming\Rainmeter\
IniFile: C:\Users\User\AppData\Roaming\Rainmeter\Rainmeter.ini
You do not have the required permissions to view the files attached to this post.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Doubled memory consumption w/ no D2D

Post by Active Colors »

Additionally, either mouse over action or changing alpha channels of image and/or text meter or combination of everything makes CPU cry. Take a look how the CPU changes on hovering icons:
cpu.gif
(click to animate)
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Doubled memory consumption w/ no D2D

Post by jsmorley »

A few observations...

1) There is no such thing as turning D2D on or off in 4.3. There is only D2D. What can be turned on and off is hardware acceleration.

2) D2D does indeed use more memory than GDI+. That is just a given, and although we are going to be putting in a lot of work on "performance" after we get rid of all the actual "bugs" that we can, I have no doubt that more memory is going to be used going forward. Only my personal opinion, but first, who cares, we are talking about a few meg in a sea of RAM that is 8-16 gig in size, and second, it can be argued that in a system like Windows 10, which aggressively manages memory to be as efficient as possible, any "unused" RAM is more or less pointless.

3) With hardware acceleration on (which will be the default) the difference in main RAM should be negligible. Some of the extra resources needed by D2D will be pushed over to your GPU RAM.

4) It is important that you view the RAM usage in the right way. Be careful not to confuse "Working Set", which is based on shared virtual memory, and "Working Set Private", which is the actual amount of physical RAM memory that is being used by, and is exclusive to, Rainmeter. I think you will find that "Working Set Private" won't be all that much bigger in 4.3 than it is in 4.2.

Memory usage of "Private Bytes" and "Working Set" are treated sort of as a big "slush fund", where Windows is keeping virtual memory that Rainmeter isn't using anymore "available" just in case it needs it again. Much of this is "shared" with other applications that might ask for memory, and isn't locked up with Rainmeter.

The important metric, the once that really counts, is "Working Set Private". That you should keep an eye on.

5) With hardware acceleration turned off, I don't doubt that more memory will be used. Twice as much? Hard to say, we aren't done tuning yet, but maybe... Of course 20meg of 16gig is something like 0.00125%. I'm not losing much sleep...
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Doubled memory consumption w/ no acceleration

Post by Active Colors »

jsmorley,
/1/ My bad for confusing the terms as I only got my hands on checking the alpha during late night. You are definitely right, I was talking about the acceleration, and not D2D,

/2/ I had no clear idea on D2D that it consumes more memory. I see now that it is not some leak or flaw but an intended and expected behavior.

/3/ Indeed I have noticed that with the acceleration turned on the memory consumption is same or less comparing to 4.2.

/5/ My intention was to report the unusual at that moment behavior. I had no intentions to argue that you broke it or changed it for worse. I clearly see the amount of work you are investing into this update and Rainmeter in general, I have no complains on this manner.

I marked it solved as it is not an issue, however, the lag problem is still open.