16

utility atop shows:

ATOP - MyServer         2013/01/07  00:03:57               10 seconds elapsed
PRC | sys   2.18s | user   8.33s | #proc    141 | #zombie    0 | #exit      0 |
CPU | sys     21% | user    139% | irq       0% | idle    228% | wait     11% |
cpu | sys      5% | user     40% | irq       0% | idle     51% | cpu002 w  3% |
cpu | sys      5% | user     35% | irq       0% | idle     56% | cpu001 w  3% |
cpu | sys      7% | user     30% | irq       0% | idle     61% | cpu000 w  2% |
cpu | sys      4% | user     34% | irq       0% | idle     61% | cpu003 w  1% |
CPL | avg1   1.00 | avg5    1.12 | avg15   1.25 | csw   389208 | intr  223367 |
MEM | tot   23.6G | free  136.3M | cache   6.7G | buff   66.5M | slab  205.1M |
SWP | tot    0.0M | free    0.0M |              | vmcom  21.8G | vmlim  11.8G |
DSK |         sdc | busy     12% | read      70 | write    109 | avio    6 ms |
DSK |         sde | busy      4% | read      37 | write    131 | avio    2 ms |
DSK |         sdd | busy      3% | read      38 | write    144 | avio    1 ms |
NET | transport   | tcpi     160 | tcpo     171 | udpi       0 | udpo       0 |
NET | network     | ipi      188 | ipo      172 | ipfrw      0 | deliv    160 |
NET | vnet1    0% | pcki     510 | pcko     442 | si   60 Kbps | so   26 Kbps |
NET | eth0     0% | pcki     449 | pcko     527 | si   27 Kbps | so   65 Kbps |
NET | vnet0    0% | pcki       0 | pcko      44 | si    0 Kbps | so    3 Kbps |
NET | vnet7    0% | pcki       1 | pcko      44 | si    0 Kbps | so    3 Kbps |
NET | vnet2    0% | pcki       0 | pcko      43 | si    0 Kbps | so    3 Kbps |
NET | vnet3    0% | pcki       0 | pcko      43 | si    0 Kbps | so    3 Kbps |
NET | vnet6    0% | pcki       0 | pcko      43 | si    0 Kbps | so    3 Kbps |
NET | vnet5    0% | pcki       0 | pcko       5 | si    0 Kbps | so    0 Kbps |
NET | vnet4    0% | pcki       0 | pcko       5 | si    0 Kbps | so    0 Kbps |
NET | vnet8    0% | pcki       0 | pcko       5 | si    0 Kbps | so    0 Kbps |
NET | bond0  ---- | pcki     449 | pcko     527 | si   27 Kbps | so   65 Kbps |
NET | br0    ---- | pcki     157 | pcko     126 | si   12 Kbps | so   17 Kbps |
NET | lo     ---- | pcki      46 | pcko      46 | si    3 Kbps | so    3 Kbps |

My questions are following: 1)All is white, only line with SWP is RED. I have 24GB RAM and I don't use swap. How may I fix this? Is it big problem? I'm working on without problems, but who knows if is it bad or not?

2)What does vmcom and vmlim means?

CPU is Quad core. 3HDDs in RAID5. I have Debian Squeeze x64 and using KVM and MySQL.

Thank you for answer

3 Answers 3

6

Answer to main query is further below - but first a warning regarding Mirra's suggestion:

Be careful with this:

In : /proc/sys/vm/overcommit_memory I try put there 2.

In that case, even when physical memory is available, all processes requesting memory from OS when vmcom greater than vmlim will receive errors (I`ve got a lot of errors and fails with basic system applications like compiz). And because of:

vmlim = SWAP_size + 0.5 * RAM_size.

where 0.5 (50%) is the default value for /proc/sys/vm/overcommit_ratio parameter you can easily get a lot of errors like me.


Answer to main question: it is better to revert changes in overcommit_memory parameter back to the default value (0 for me (Ubuntu 12.04 LTS), but can be 1 for other OS`es). According to the great article we can calculate memory actually used by processes:

MemoryUsed ~ tot - (cache + buff + free) ~ 23.6G - ( 6.7G + 0.067G + 0.136G) ~ 16.7G

So only 16.7G is actually used by processes (from 23.6G installed RAM) and red line in atop output may be ignored.

1
  • So can this be considered a bug in atop, if the warning is not actually important? Jun 10, 2015 at 14:17
2

The atop man page helps explain what the numbers actually indicate.

Memory

If the committed virtual memory exceeds the limit ('vmcom' and 'vmlim' in the SWP-line), the SWP-line is colored due to overcommitting the system.

SWP

Swap occupation and overcommit info.

This line contains the total amount of swap space on disk ('tot') and the amount of free swap space ('free').

Furthermore the committed virtual memory space ('vmcom') and the maximum limit of the committed space ('vmlim', which is by default swap size plus 50% of memory size) is shown. The committed space is the reserved virtual space for all allocations of private memory space for processes. The kernel only verifies whether the committed space exceeds the limit if strict overcommit handling is configured (vm.overcommit_memory is 2).

https://linux.die.net/man/1/atop

1
  • 2
    atop and its manual are a wonderful resource to understand inner workings of Linux. :)
    – Nemo
    Jul 1, 2017 at 9:10
1

What atop is telling you is that your system is overcommitting memory, as described on the kernel:

The overcommit policy is set via the sysctl vm.overcommit_memory.

The overcommit amount can be set via vm.overcommit_ratio (percentage) or vm.overcommit_kbytes (absolute value).

The current overcommit limit and amount committed are viewable in /proc/meminfo as CommitLimit and Committed_AS respectively.

To prevent overcommitting, in /proc/sys/vm/overcommit_memory you can set 2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .