Xymon Mailing List Archive search

Redhat Memory Question

6 messages in this thread

list Wes Neal · Thu, 19 Mar 2015 11:14:39 -0400 ·
I have never monitored any Redhat systems before, all Solaris in the past for the most part.  Since top and free always show all the physical memory in use on Redhat, how do people monitor memory usage accurately with Xymon?  Currently the Memory tag shows as yellow under this new Redhat server, though in my mind it should be green.

Mem:  16435916k total, 16311612k used,   124304k free,  6255112k buffers
Swap: 18481144k total,        0k used, 18481144k free,  6391000k cached

             total       used       free     shared    buffers     cached
Mem:      16435916   16311588     124328          0    6255116    6391040
-/+ buffers/cache:    3665432   12770484
Swap:     18481144          0   18481144

Thanks in advance

Wes Neal
list Mark Felder · Thu, 19 Mar 2015 10:45:17 -0500 ·
Honestly, memory usage should never go red unless there is enough memory
pressure to generate a lot of swap paging I/O. Maximizing memory usage
is a feature of a modern OS. 

I'm surprised your swap is completely empty on that server. Swap is
meant to be used.
list Jeremy Laidman · Fri, 20 Mar 2015 00:19:55 +0000 ·
On Fri, Mar 20, 2015 at 2:25 AM Neal, Jonathan W via Xymon <xymon at xymon.com>
quoted from Wes Neal
wrote:
I have never monitored any Redhat systems before, all Solaris in the past
for the most part.  Since top and free always show all the physical memory
in use on Redhat, how do people monitor memory usage accurately with Xymon?

Xymon tracks swap usage, physical memory usage, and "actual" memory usage.
The last of these is what most people care about.  In analysis.cfg you can
set thresholds on any of these.  On my system the thresholds for physical
memory usage are 100% for yellow and 101% for red.

Under Linux, "actual memory" is obtained from the output of "free" which is
recorded in the [free] section of the client data, specifically from the
"buffers/cache" line.  The value for "actual used" comes from the first
number.  The "actual total" is the total physical memory and is the first
number in the "Mem:" line.
quoted from Wes Neal

  Currently the Memory tag shows as yellow under this new Redhat server,
though in my mind it should be green.
For actual memory usage, yes.
quoted from Wes Neal

Mem:  16435916k total, 16311612k used,   124304k free,  6255112k buffers
Swap: 18481144k total,        0k used, 18481144k free,  6391000k cached

             total       used       free     shared    buffers     cached
Mem:      16435916   16311588     124328          0    6255116    6391040
-/+ buffers/cache:    3665432   12770484
Swap:     18481144          0   18481144
In your case, on your "memory" status page you would see "Actual 3579M
16050M 22%" meaning 3.5GB non-cache/buffer RAM usage used out of 16GB total
physical RAM, which is 22%.

So actual usage is 22%.  If your yellow threshold for MEMACT is the default
of 90, then this 22% is well short of triggering a yellow condition.  And
it must be something else.

On your memory status page each line should have its own coloured dot.
Which of the lines has a yellow dot?  I'm guessing it's the "Physical", and
someone has modified the MEMPHYS threshold in analysis.cfg to go yellow at
99% instead of 100%.

J
list Paul Root · Fri, 20 Mar 2015 00:35:40 +0000 ·
I have a script that frees up those buffers that make memory look full
          sync
        echo 3 >/proc/sys/vm/drop_caches
        free -mt
quoted from Jeremy Laidman

-----Original Message-----
From: Neal, Jonathan W [mailto:user-9e31f92d698c@xymon.invalid]
Sent: Thursday, March 19, 2015 10:15 AM
To: Xymon MailingList
Subject: Redhat Memory Question

I have never monitored any Redhat systems before, all Solaris in the past for the most part.  Since top and free always show all the physical memory in use on Redhat, how do people monitor memory usage accurately with Xymon?  Currently the Memory tag shows as yellow under this new Redhat server, though in my mind it should be green.

Mem:  16435916k total, 16311612k used,   124304k free,  6255112k buffers
Swap: 18481144k total,        0k used, 18481144k free,  6391000k cached

             total       used       free     shared    buffers     cached
Mem:      16435916   16311588     124328          0    6255116    6391040
-/+ buffers/cache:    3665432   12770484
Swap:     18481144          0   18481144

Thanks in advance

Wes Neal

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Japheth Cleaver · Thu, 19 Mar 2015 17:47:50 -0700 ·
quoted from Jeremy Laidman

On Thu, March 19, 2015 5:19 pm, Jeremy Laidman wrote:
On Fri, Mar 20, 2015 at 2:25 AM Neal, Jonathan W via Xymon
<xymon at xymon.com>
wrote:
I have never monitored any Redhat systems before, all Solaris in the
past
for the most part.  Since top and free always show all the physical
memory
in use on Redhat, how do people monitor memory usage accurately with
Xymon?

Xymon tracks swap usage, physical memory usage, and "actual" memory usage.
The last of these is what most people care about.  In analysis.cfg you can
set thresholds on any of these.  On my system the thresholds for physical
memory usage are 100% for yellow and 101% for red.

Under Linux, "actual memory" is obtained from the output of "free" which
is
recorded in the [free] section of the client data, specifically from the
"buffers/cache" line.  The value for "actual used" comes from the first
number.  The "actual total" is the total physical memory and is the first
number in the "Mem:" line.

  Currently the Memory tag shows as yellow under this new Redhat server,
though in my mind it should be green.
For actual memory usage, yes.

Mem:  16435916k total, 16311612k used,   124304k free,  6255112k buffers
Swap: 18481144k total,        0k used, 18481144k free,  6391000k cached

             total       used       free     shared    buffers
cached
Mem:      16435916   16311588     124328          0    6255116
6391040
-/+ buffers/cache:    3665432   12770484
Swap:     18481144          0   18481144
In your case, on your "memory" status page you would see "Actual 3579M
16050M 22%" meaning 3.5GB non-cache/buffer RAM usage used out of 16GB
total
physical RAM, which is 22%.

So actual usage is 22%.  If your yellow threshold for MEMACT is the
default
of 90, then this 22% is well short of triggering a yellow condition.  And
it must be something else.

On your memory status page each line should have its own coloured dot.
Which of the lines has a yellow dot?  I'm guessing it's the "Physical",
and
someone has modified the MEMPHYS threshold in analysis.cfg to go yellow at
99% instead of 100%.

J

The whole concept of 'free memory' is really a bit tricky. Linux 3.14+ has
provided a solution in /proc/meminfo
(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773),
but it's not available everywhere. Furthermore, the 'free -a' output
depends on your specific version of procps(-ng) and possibly your sysctl
setting of meminfo_legacy_layout
(https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/6.6_Technical_Notes/index.html#ch-Important-Changes-to-External-Kernel-Parameters).


Regards,

-jc
list Mark Felder · Fri, 20 Mar 2015 08:12:21 -0500 ·
quoted from Paul Root

On Thu, Mar 19, 2015, at 19:35, Root, Paul T wrote:
I have a script that frees up those buffers that make memory look full
          sync
        echo 3 >/proc/sys/vm/drop_caches
        free -mt
Why would you do that? It is strongly recommended to not do that:

Use of this file can cause performance problems.  Since it discards cached
objects, it may cost a significant amount of I/O and CPU to recreate the
dropped objects, especially if they were under heavy use.  Because of this,
use outside of a testing or debugging environment is not recommended.

Page cache is not memory that is unavailable to other applications. If a
program requests more memory and there is not enough free, it will take
the page cache.