Xymon Mailing List Archive search

wrong memory report with free command from procps-ng

5 messages in this thread

list Dominique Frise · Thu, 23 Apr 2015 12:26:46 +0000 ·
Hi,


Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting wrong values.

These systems now use free from procps-ng 3.3.10 whose output has changed.


-- free output on RHEL 5/6 ---

[bb at prdexp ~]$ free

             total       used       free     shared    buffers     cached
Mem:      65916528   63391732    2524796    1376104    1484472   47773272
-/+ buffers/cache:   14133988   51782540
Swap:     16777212     180816   16596396


--- free output on RHEL 7 ---

[bb at hns ~]$ free
              total        used        free      shared  buff/cache   available
Mem:        8011888      318844     3365516       98788     4327528     7275020
Swap:       8388604           0     8388604


The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as total - free - buffers - cache, and there is an "available" column which is an "Estimation of how much memory is available for starting new applications, without swapping".

The man page details all that.


Dominique

University of Lausanne
list Japheth Cleaver · Sat, 2 May 2015 16:35:32 -0700 ·
quoted from Dominique Frise
On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:
Hi,


Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.

These systems now use free from procps-ng 3.3.10 whose output has changed.


-- free output on RHEL 5/6 ---

[bb at prdexp ~]$ free

             total       used       free     shared    buffers     cached
Mem:      65916528   63391732    2524796    1376104    1484472   47773272
-/+ buffers/cache:   14133988   51782540
Swap:     16777212     180816   16596396


--- free output on RHEL 7 ---

[bb at hns ~]$ free
              total        used        free      shared  buff/cache
available
Mem:        8011888      318844     3365516       98788     4327528
7275020
Swap:       8388604           0     8388604


The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".

The man page details all that.


Dominique

University of Lausanne

Thanks...

Mind if you could try the following patch? And let me know if it works (it
does for me on an EL7 and Fedora 21).

I went ahead and took the opportunity to begin using the "Available"
figure as the "Actual Used" (well, the Phys - Available figure), since
that's going to be a more realistic figure on kernel's new enough to
support it.


Regards,
-jc
Attachments (1)
list Dominique Frise · Mon, 4 May 2015 08:45:34 +0000 ·
Hi Japhet,

Thanks for the patch.
On clients with 3.10 kernels, we found wiered  that the  value for "Physical Used" is now less than the one for "Actual Used".
Have you an explanation for that ?

For compatibility with the <3.10 kernels  memory display, we have following suggestions for mapping the displayed values:
 - "Actual Used" should be mapped to "used"
 - "Physical Used" should be mapped to "buff/cache"

What do you think about this?

Dominique
quoted from Japheth Cleaver
 
De : J.C. Cleaver <user-87556346d4af@xymon.invalid>
Envoyé : dimanche 3 mai 2015 01:35
À : Dominique Frise
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with  free command from procps-ng

On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:
Hi,


Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.

These systems now use free from procps-ng 3.3.10 whose output has changed.


-- free output on RHEL 5/6 ---

[bb at prdexp ~]$ free

             total       used       free     shared    buffers     cached
Mem:      65916528   63391732    2524796    1376104    1484472   47773272
-/+ buffers/cache:   14133988   51782540
Swap:     16777212     180816   16596396


--- free output on RHEL 7 ---

[bb at hns ~]$ free
              total        used        free      shared  buff/cache
available
Mem:        8011888      318844     3365516       98788     4327528
7275020
Swap:       8388604           0     8388604


The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".

The man page details all that.


Dominique

University of Lausanne

Thanks...

Mind if you could try the following patch? And let me know if it works (it
does for me on an EL7 and Fedora 21).

I went ahead and took the opportunity to begin using the "Available"
figure as the "Actual Used" (well, the Phys - Available figure), since
that's going to be a more realistic figure on kernel's new enough to
support it.


Regards,
-jc
list Dominique Frise · Mon, 4 May 2015 13:04:07 +0000 ·
Hi again,

I made a mistake on the second line of suggestions in my previous mail.

One should read:
  - "Physical Used" should be mapped to "buff/cache" + "used"

Sorry for the inconvenience,
Dominique
quoted from Dominique Frise
De : Xymon <xymon-bounces at xymon.com> de la part de Dominique Frise <user-78ab6673b600@xymon.invalid>
Envoyé : lundi 4 mai 2015 10:45
À : J.C. Cleaver
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with  free command from procps-ng

Hi Japhet,

Thanks for the patch.
On clients with 3.10 kernels, we found wiered  that the  value for "Physical Used" is now less than the one for "Actual Used".
Have you an explanation for that ?

For compatibility with the <3.10 kernels  memory display, we have following suggestions for mapping the displayed values:
 - "Actual Used" should be mapped to "used"
 - "Physical Used" should be mapped to "buff/cache"

What do you think about this?

Dominique

De : J.C. Cleaver <user-87556346d4af@xymon.invalid>
Envoyé : dimanche 3 mai 2015 01:35
À : Dominique Frise
Cc : xymon at xymon.com
Objet : Re: [Xymon] wrong memory report with  free command from procps-ng

On Thu, April 23, 2015 5:26 am, Dominique Frise wrote:
Hi,


Using Xymon 4.3.19, we noticed that all our RHEL 7 systems are reporting
wrong values.

These systems now use free from procps-ng 3.3.10 whose output has changed.


-- free output on RHEL 5/6 ---

[bb at prdexp ~]$ free

             total       used       free     shared    buffers     cached
Mem:      65916528   63391732    2524796    1376104    1484472   47773272
-/+ buffers/cache:   14133988   51782540
Swap:     16777212     180816   16596396


--- free output on RHEL 7 ---

[bb at hns ~]$ free
              total        used        free      shared  buff/cache
available
Mem:        8011888      318844     3365516       98788     4327528
7275020
Swap:       8388604           0     8388604


The "-/+ buffers/cache:" has disappeared, the "used" is now calculated as
total - free - buffers - cache, and there is an "available" column which
is an "Estimation of how much memory is available for starting new
applications, without swapping".

The man page details all that.


Dominique

University of Lausanne

Thanks...

Mind if you could try the following patch? And let me know if it works (it
does for me on an EL7 and Fedora 21).

I went ahead and took the opportunity to begin using the "Available"
figure as the "Actual Used" (well, the Phys - Available figure), since
that's going to be a more realistic figure on kernel's new enough to
support it.


Regards,
-jc
list Japheth Cleaver · Wed, 6 May 2015 23:52:15 -0700 ·
quoted from Dominique Frise

On Mon, May 4, 2015 6:04 am, Dominique Frise wrote:
Hi again,

I made a mistake on the second line of suggestions in my previous mail.

One should read:
  - "Physical Used" should be mapped to "buff/cache" + "used"

Sorry for the inconvenience,
Dominique

Well, previously there had just been the physical measurement, but the
addition of the buffer/cache distinction allowed 'Actual Used' to be a
more meaningful reference point.


I think it definitely makes sense to have 'Actual Used' align with the
(inverse of the) Available memory metric when the kernel provides one.

Operating by the principle of least surprise, it's probably best to
continue with the original formula for Physical Used, however.
(Ironically.)

This patch should revert the Physical Used value to its previous composition.


Regards,

-jc
Attachments (1)