Conky showing incorrect info?

Moderator: Forum moderators

Post Reply
stevie pup
Posts: 266
Joined: Mon May 10, 2021 7:40 pm
Location: Derbyshire, UK
Has thanked: 18 times
Been thanked: 70 times

Conky showing incorrect info?

Post by stevie pup »

Where does the on screen Conky get it's info from? When I first boot Bookworm and it's sitting idle, no software running, the on screen Conky tells me it's using about 1.2Gb of RAM. I didn't think Puppy had become that heavyweight, and didn't believe it.

As a comparison I checked in task manager, which showed it was using around 300Mb of RAM. Which in an idle state seems far more accurate to me.

So what's the issue with Conky?

Thanks

User avatar
rockedge
Site Admin
Posts: 6551
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2754 times
Been thanked: 2627 times
Contact:

Re: Conky showing incorrect info?

Post by rockedge »

Possibly displaying cache and buffers combined with RAM system usage.

User avatar
pp4mnklinux
Posts: 1139
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 637 times
Been thanked: 284 times
Contact:

Re: Conky showing incorrect info?

Post by pp4mnklinux »

Hi:

Usually, this information displayed by Conky is sourced from system files, system commands, and other sources defined in its configuration file.

The accuracy of the displayed information depends on how Conky is configured and what data sources it is accessing and in this case, I think the "problem" could be the Cached Data because Conky may include this cached data in its calculations, which could lead to higher reported RAM usage.

As you know, cached data includes information stored in memory that can be quickly accessed if needed. This cached data is not actively used by running processes and is typically excluded from the RAM usage reported by task managers so there could be the difference.

Have a nice day. CHEERS

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 375 times
Been thanked: 1314 times
Contact:

Re: Conky showing incorrect info?

Post by fredx181 »

stevie pup wrote: Sun Jun 25, 2023 1:09 pm

Where does the on screen Conky get it's info from? When I first boot Bookworm and it's sitting idle, no software running, the on screen Conky tells me it's using about 1.2Gb of RAM. I didn't think Puppy had become that heavyweight, and didn't believe it.

As a comparison I checked in task manager, which showed it was using around 300Mb of RAM. Which in an idle state seems far more accurate to me.

So what's the issue with Conky?

Thanks

It's because of the newest procps package in Bookworm, earlier discussed here: viewtopic.php?p=88648#p88648
Solution can be (use at your own risk) to install older procps (and libprocps8) , see: viewtopic.php?p=88540#p88540

stevie pup
Posts: 266
Joined: Mon May 10, 2021 7:40 pm
Location: Derbyshire, UK
Has thanked: 18 times
Been thanked: 70 times

Re: Conky showing incorrect info?

Post by stevie pup »

@rockedge @pp4mnklinux @fredx181

Thank you all for your replies, and they make sense. I may have a play with the procps at some time in the future, but for now I will just ignore what Conky's telling me. It's not that important after all (well not to me at any rate). :lol:

User avatar
lizardidi
Posts: 72
Joined: Sat Jul 18, 2020 9:42 am
Has thanked: 20 times
Been thanked: 12 times

Re: Conky showing incorrect info?

Post by lizardidi »

Hi @stevie pup , I experienced the same issue with conky reporting ram usage as much as 1.2G at desktop startup.

My BookwormPup64 is frugally installed with frugalpup in a 32Gb pendrive.

Using the default fresh installed packages without applying fix with the older procps as suggested by @fredx181 , my conky showed ram usage of 1.21gb of total 5.69gb in one of my Dell i7 box. In Task Manager, the ram usage is around 300mb.

Out of curiosity, i disabled all swap by using command 'swapoff -a' in terminal.

Then I open up the default Firefox browser, opened Youtube, pick one of the HD video and played the video in 1080p, I then duplicate the tab as many as I can and played all videos in 1080p. During the process, the ram usage kept rising, ram usage in Task Manager always lower than conky, with a consistent difference of ~1Gb.

HOWEVER, at the 5.60gb ram usage mark (in conky), my desktop is freezed and unusable, forcing me to kill x. Before X was killed, I noticed the ram usage in Task Manager is:

4026MB

Despite there should be some extra ram left (as in Task Manager), the desktop freeze, no swap file or partition is used.

radky
Posts: 355
Joined: Fri May 28, 2021 2:14 am
Has thanked: 41 times
Been thanked: 320 times

Re: Conky showing incorrect info?

Post by radky »

@stevie pup and @lizardidi

A few thoughts...

The Linux kernel manages the allocation of system memory and simultaneously records the corresponding memory statistics in /proc/meminfo. This information is parsed by memory monitors and presented in numerical or graphical format.

Legacy memory monitors often calculate used system memory as follows:

MemUsed = MemTotal - MemFree

However, with the introduction of the MemAvailable parameter in kernel 3.14 the calculation of used memory is more accurately defined as follows:

MemUsed = MemTotal - MemAvailable (many current memory monitors use this calculation -- such as recent releases of free, Conky, Top and Btop)

Importantly, some popular memory monitors acknowledge the capacity of the Linux kernel to dynamically reallocate other (non-fixed) resources such as buffers, cached and reclaimable memory. Consequently, to more accurately define actual used system memory, these monitors deduct various recoverable resources when reporting used memory. Unfortunately, when comparing different monitors, the reported memory statistics may vary because the memory calculations are different.

For example, recent iterations of Htop, LxTask and PupSysInfo calculate used memory as follows:

MemUsed (actual) = MemTotal - MemFree - (Buffers + Cached + Reclaimable)

However, other monitors common to legacy releases of Puppy Linux (such as older versions of Conky, LxTask and Htop) may use different calculations for used memory. For example, modern LxTask has an option to include (or exclude) buffers and cached resources in the calculation of used memory, but older releases are hard-coded to specifically exclude kernel-designated sReclaimable memory. Also, for many years Htop included shared resources (Shmem) in the used memory calculation but in 2021 (v3.1.0+) the Htop developers changed the MemUsed calculation and the report of used memory now correlates with recent releases of LxTask and PupSysInfo.

To add to the current confusion, the Conky version (1.18.3) in Bookworm Pup64 calculates used memory simply and directly as: MemUsed = MemTotal - MemAvailable (defined by the kernel in /proc/meminfo and also reported by the free command, Top and Btop).

Consequently, the memory reports of the popular Conky, Lxtask (Task Manager), Top, Btop and Htop monitors may seem disparate and confusing at times, and this observation may be further complicated by possible differences in the debian "procps" package as explained by fredx181 above.

User avatar
bigpup
Moderator
Posts: 6999
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: Conky showing incorrect info?

Post by bigpup »

According to Conky help.

It is configured for reporting memory in two ways, using these commands in conkyrc the Conky config file.

mem
Reports the total amount of memory being used including the memory buffers and cache
This does not report just what the operating system is using or the programs that may be running.
It includes the set aside memory for buffering and cache witch does change.

memmax
The total amount of memory in the computer.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

radky
Posts: 355
Joined: Fri May 28, 2021 2:14 am
Has thanked: 41 times
Been thanked: 320 times

Re: Conky showing incorrect info?

Post by radky »

@bigpup

Conky versions prior to 1.11.6 included buffers and cache in the calculation of free memory as follows:

memeasyfree = free memory including the memory that is assigned but very easily freed (buffers/cache)

With the advent of version 1.11.6 (Jul 27, 2020), Conky integrated the kernel MemAvailable parameter in the calculation of MemUsed as follows:

MemUsed = MemTotal - MemAvailable

For our use, the definition of MemAvailable is relatively complex:

MemAvailable = MemFree - Low watermarks + capped cached memory + capped slab reclaimable part + capped currently unreclaimable part of reclaimable area

https://sitano.github.io/memory/kernel/ ... available/

stevie pup
Posts: 266
Joined: Mon May 10, 2021 7:40 pm
Location: Derbyshire, UK
Has thanked: 18 times
Been thanked: 70 times

Re: Conky showing incorrect info?

Post by stevie pup »

@radky

Thank you for your explanation. I notice you used the words "complex" and "confusing" which I think pretty much sums it up, particularly as there appears to be so many different ways of calculating RAM usage.

I only asked the question in the first place out of curiosity, and not because I have any specific problems with RAM. All of my machines have sufficient RAM for my uses, and it's very rare that I see any Swap being used.

So just my observation, which led to my curiosity, and so on. I do that a lot I'm afraid. :roll:

Post Reply

Return to “BookwormPup”