Guest User!

You are not Sophos Staff.

[9.191] Increasing swap usage

I noticed a rapidly increasing use of swap memory on my hardware appliance.
See screenshots for an overview of the memory usage last month and the active modules.

Installation date of the UTM is around 12.8.2013 so this is the complete overview since then. Did a restart twice because of a Up2Date release, which lowered the memory usage to raise again.

Details:
Firmware version: 9.191-2
Pattern version: 55186
System:  Hardware UTM120 (2GB)
Updated: Through Up2Date from 9.165 till latest version

Below I inserted the process list from the Support -> Advanced section.
Could this swap problem because by the postgres process? There are several sessions which have a high VSZ.

When there is more info needed, let me know!
(I'm going to reboot tomorrow night, to prevent overload)

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         2  0.0  0.0      0     0 ?        S     2013   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S     2013   1:33  \_ [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S
root      3156  0.0  0.0   1896     0 ?        Ss    2013   0:00 /usr/local/bin/confd-queuer
root      3170  0.0  0.1   8064  2332 ?        Ss    2013   2:28 confd-qrunner.pl
root      3209  0.0  0.1   7804  2644 ?        S     2013  19:06 /usr/local/bin/sysmond
root      3296  0.0  0.0  16108    20 ?        S     2013   0:00 /var/aua/aua.bin
root      3297  0.0  0.0   1896     0 ?        S     2013   0:00  \_ logger -p daemon.debug -t aua[3296]
root       933  0.0  0.0      0     0 ?        Z    20:37   0:00  \_ [aua.bin] 
root      3466  0.0  0.0  14544    32 ?        S     2013   0:00 /usr/local/bin/notifier.plx -d
rrdcache  3490  0.0  0.0 118068   240 ?        Ssl   2013  12:38 /usr/bin/rrdcached -l unix:/var/run/rrdcached/socket -m 777 -b /var
at        3524  0.0  0.0   2340    12 ?        Ss    2013   0:00 /usr/sbin/atd
postgres  3602  0.0  0.0 573632   368 ?        S     2013   1:47 /usr/pgsql92/bin/postgres -D /var/storage/pgsql92/data
postgres  3609  0.0  0.7 574000 14344 ?        Ss    2013   5:55  \_ postgres: checkpointer process                        
postgres  3610  0.0  0.0 573892    44 ?        Ss    2013   0:26  \_ postgres: writer process                              
postgres  3611  0.0  0.7 573892 14544 ?        Ss    2013  13:48  \_ postgres: wal writer process                          
postgres  3612  0.0  0.0 574648   964 ?        Ss    2013   3:07  \_ postgres: autovacuum launcher process                 
postgres  3613  0.0  0.0   7936   136 ?        Ss    2013   0:11  \_ postgres: archiver process   last was 00000001000000060000003F
postgres  3614  0.0  0.0   8216   408 ?        Ss    2013   9:18  \_ postgres: stats collector process                     
postgres  4290  0.0  0.1 576388  2480 ?        Ss    2013   3:17  \_ postgres: hotspot hotspot 127.0.0.1(37336) idle       
postgres  4467  0.7  1.0 576964 21376 ?        Ss    2013 160:19  \_ postgres: reporting reporting [local] idle            
postgres  4728  0.0  0.0 576384   636 ?        Ss    2013   0:01  \_ postgres: smtp smtp 127.0.0.1(37356) idle             
postgres 14671  0.5  1.2 578236 26396 ?        Ss   00:00   6:48  \_ postgres: reporting reporting [local] idle            
postgres 14672  0.0  0.0 576296    20 ?        Ss   00:00   0:00  \_ postgres: reporting reporting [local] idle            
postgres 14763  0.0  0.0 576172     8 ?        Ss   00:00   0:00  \_ postgres: reporting reporting [local] idle            
postgres   991  0.4  0.1 576408  3544 ?        Ss   20:38   0:16  \_ postgres: smtp smtp 127.0.0.1(34674) idle             
root      3700  0.0  0.0  40420    36 ?        S     2013   1:46 /var/mdw/mdw.plx
root      3749  0.0  0.0   1896     0 ?        S     2013   0:00  \_ logger -p daemon.debug -t middleware[3700]
root      3738  0.0  0.0   1920    20 ?        Ss    2013   0:25 runsvdir -P /etc/service log: .....................................
root      3744  0.0  0.0   1776    16 ?        Ss    2013   0:00  \_ runsv selfmonng
root      3745  1.5  0.1  11768  3024 ?        S     2013 328:29      \_ /usr/local/bin/selfmonng.plx
root      3751  0.0  0.0  11360   296 ?        S     2013   0:10          \_ [timewarp check]
root      3739  0.0  0.0   2420     8 tty1     Ss+   2013   0:00 /sbin/mingetty --noclear --no-hostname tty1
root      3740  0.0  0.0   2420     8 tty2     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty2
root      3741  0.0  0.0   2420     8 tty3     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty3
root      3742  0.0  0.0   2420     8 tty4     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty4
root      3743  0.0  0.0   2140     8 ttyS0    Ss+   2013   0:00 /sbin/mingetty ttyS0
root      4193  0.0  0.0   2360   156 ?        Ss    2013   0:09 /usr/sbin/cron
root      4205  0.0  0.4  20652  9648 ?        Ss    2013  17:19 /usr/sbin/named -4
root      4244  0.0  0.0   5016     4 ?        Ss    2013   0:00 /usr/sbin/sshd -f /etc/ssh/sshd_config
root      4253  0.0  0.2  12592  5440 ?        Ss    2013   7:08 dns-resolver.plx
root      4270  0.0  0.3  34724  6180 ?        Ss    2013   7:27 awed [master]
root      4288  0.0  0.0   9580   368 ?        S     2013   0:38 /usr/local/bin/hotspotd
root      4398  0.0  0.0   5116   312 ?        Ss    2013   0:15 /usr/sbin/openvpn --config /etc/openvpn/openvpn.conf --writepid /va
root      4404  0.0  0.0  10876   288 ?        Ss    2013   1:24 /bin/httpd -f /etc/httpd/httpd.conf
root      4406  0.0  0.0   1896   164 ?        S     2013   0:01  \_ /bin/logger -t httpd -p local6.notice
wwwrun    4411  0.0  0.0  10788   136 ?        S     2013   0:03  \_ /bin/httpd -f /etc/httpd/httpd.conf
wwwrun     916  2.7  1.3  81580 28160 ?        S    20:37   1:43  |   \_ /var/webadmin/webadmin.plx
wwwrun     967  2.4  1.6  77456 34548 ?        S    20:38   1:32  |   \_ /var/webadmin/webadmin.plx
wwwrun   10454  0.0  0.1  11260  2464 ?        S    21:35   0:00  \_ /bin/httpd -f /etc/httpd/httpd.conf
wwwrun   10486  0.0  0.1  11196  2400 ?        S    21:35   0:00  \_ /bin/httpd -f /etc/httpd/httpd.conf
root      4461  0.5  0.0 104728  2032 ?        S
  • Hi, before you reboot, it might be helpful if you could run the script at
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/52/t/28867

    and post the output HERE.

    Thanks,
    Barry
  • uptime
    22:32pm  up 14 days 22:57,  1 user,  load average: 1.62, 1.80, 3.62


    free -m
                 total       used       free     shared    buffers     cached
    
    Mem:          2000       1931         69          0          2        341
    -/+ buffers/cache:       1587        412
    Swap:         1023        595        428


    version
    Current software version...: 9.191002
    
    Hardware type..............: 120r5
    Serial number..............: A170654EA34CA3D
    Installation image.........: 9.105-9.1
    Installation type..........: msi
    Installed pattern version..: 55186
    Downloaded pattern version.: 55186
    Up2Dates applied...........: 6 (see below)
                                 sys-9.105-9.106-9.17.1.tgz (Dec  5 20:55)
                                 sys-9.106-9.180-17.21.2.tgz (Dec  5 14:41)
                                 sys-9.180-9.185-21.3.1.tgz (Dec  5 18:09)
                                 sys-9.185-9.186-3.1.2.tgz (Dec 12 21:45)
                                 sys-9.186-9.190-1.7.3.tgz (Dec 24 23:33)
                                 sys-9.190-9.191-7.2.2.tgz (Dec 24 23:34)
    Up2Dates available.........: 0
    Factory resets.............: 0
    Timewarps detected.........: 1


    ./swap-usage.pl
    SwapTotal: 1024.0 MB
    
    SwapUsed:   487.7 MB
    ========================================
    MB % PID process
    71.8 7.0 4461 ulogd
    52.4 5.1 12615 httpproxy
    39.7 3.9 3552 confd.plx
    33.1 3.2 13715 webadmin.plx
    29.4 2.9 3139 confd.plx
    25.8 2.5 14403 confd.plx
    25.5 2.5 14282 confd.plx
    25.0 2.4 4270 awed
    21.1 2.1 4654 smtpd.bin
    20.8 2.0 4679 smtpd.bin
    16.1 1.6 3700 mdw.plx
    15.2 1.5 14632 admin-reporter.
    7.6 0.7 3296 aua.bin
    6.8 0.7 14086 webadmin.plx
    6.7 0.7 5168 afcd
    6.7 0.7 14649 pfilter-reporte
    6.6 0.6 3751 selfmonng.plx
    6.5 0.6 3466 notifier.plx
    6.2 0.6 14652 ips-reporter.pl
    5.8 0.6 4288 hotspotd
    5.8 0.6 14655 waf-reporter.pl
    5.3 0.5 14651 mailsec-reporte
    5.3 0.5 4205 named
    5.2 0.5 3745 selfmonng.plx
    4.1 0.4 3095 haveged
    3.8 0.4 4253 dns-resolver.pl
    2.6 0.3 18139 dhcpd
    2.4 0.2 3170 confd-qrunner.p
    1.9 0.2 3209 sysmond
    1.4 0.1 4404 httpd
    1.4 0.1 4411 httpd
    1.3 0.1 6044 irqd
    1.2 0.1 14671 postgres
    1.1 0.1 4467 postgres
    1.0 0.1 4473 syslog-ng
    1.0 0.1 14508 httpd
    0.9 0.1 14519 httpd
    0.9 0.1 14763 postgres
    0.9 0.1 14672 postgres
    0.6 0.1 4290 postgres
    0.6 0.1 6259 pluto
    0.5 0.0 2313 udevd
    0.5 0.0 4728 postgres
    0.4 0.0 3596 udevd
    0.4 0.0 3597 udevd
    0.4 0.0 3612 postgres
    0.3 0.0 3490 rrdcached
    0.3 0.0 5623 argos
    0.3 0.0 5382 master
    0.3 0.0 6855 qmgr
    0.3 0.0 4733 spx-auth
    0.3 0.0 3610 postgres
    0.3 0.0 5609 service_monitor
    0.3 0.0 4398 openvpn
    0.3 0.0 3609 postgres
    0.3 0.0 3611 postgres
    0.3 0.0 10332 pickup
    0.3 0.0 3012 hald
    0.3 0.0 14653 websec-reporter
    0.3 0.0 3614 postgres
    0.2 0.0 2785 dbus-daemon
    0.2 0.0 14654 websec-reporter
    0.2 0.0 3602 postgres
    0.2 0.0 3050 hald-addon-acpi
    0.2 0.0 14650 vpn-reporter.pl
    0.2 0.0 6251 starter
    0.2 0.0 3034 hald-addon-inpu
    0.2 0.0 4470 syslog-ng
    0.2 0.0 3613 postgres
    0.2 0.0 3013 hald-runner
    0.2 0.0 3049 hald-addon-cpuf
    0.1 0.0 4193 cron
    0.1 0.0 3743 mingetty
    0.1 0.0 3740 mingetty
    0.1 0.0 3741 mingetty
    0.1 0.0 2770 acpid
    0.1 0.0 3739 mingetty
    0.1 0.0 3140 logger
    0.1 0.0 3524 atd
    0.1 0.0 15215 postgres
    0.1 0.0 6525 _pluto_adns
    0.1 0.0 3156 confd-queuer
    0.1 0.0 3742 mingetty
    0.1 0.0 6210 openl2tpd
  • I noticed a rapidly increasing use of swap memory on my hardware appliance.
    See screenshots for an overview of the memory usage last month and the active modules.

    Installation date of the UTM is around 12.8.2013 so this is the complete overview since then. Did a restart twice because of a Up2Date release, which lowered the memory usage to raise again.

    Details:
    Firmware version: 9.191-2
    Pattern version: 55186
    System:  Hardware UTM120 (2GB)
    Updated: Through Up2Date from 9.165 till latest version

    Below I inserted the process list from the Support -> Advanced section.
    Could this swap problem because by the postgres process? There are several sessions which have a high VSZ.

    When there is more info needed, let me know!
    (I'm going to reboot tomorrow night, to prevent overload)

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    
    root         2  0.0  0.0      0     0 ?        S     2013   0:00 [kthreadd]
    root         3  0.0  0.0      0     0 ?        S     2013   1:33  \_ [ksoftirqd/0]
    root         5  0.0  0.0      0     0 ?        S
    root      3156  0.0  0.0   1896     0 ?        Ss    2013   0:00 /usr/local/bin/confd-queuer
    root      3170  0.0  0.1   8064  2332 ?        Ss    2013   2:28 confd-qrunner.pl
    root      3209  0.0  0.1   7804  2644 ?        S     2013  19:06 /usr/local/bin/sysmond
    root      3296  0.0  0.0  16108    20 ?        S     2013   0:00 /var/aua/aua.bin
    root      3297  0.0  0.0   1896     0 ?        S     2013   0:00  \_ logger -p daemon.debug -t aua[3296]
    root       933  0.0  0.0      0     0 ?        Z    20:37   0:00  \_ [aua.bin] 
    root      3466  0.0  0.0  14544    32 ?        S     2013   0:00 /usr/local/bin/notifier.plx -d
    rrdcache  3490  0.0  0.0 118068   240 ?        Ssl   2013  12:38 /usr/bin/rrdcached -l unix:/var/run/rrdcached/socket -m 777 -b /var
    at        3524  0.0  0.0   2340    12 ?        Ss    2013   0:00 /usr/sbin/atd
    postgres  3602  0.0  0.0 573632   368 ?        S     2013   1:47 /usr/pgsql92/bin/postgres -D /var/storage/pgsql92/data
    postgres  3609  0.0  0.7 574000 14344 ?        Ss    2013   5:55  \_ postgres: checkpointer process                        
    postgres  3610  0.0  0.0 573892    44 ?        Ss    2013   0:26  \_ postgres: writer process                              
    postgres  3611  0.0  0.7 573892 14544 ?        Ss    2013  13:48  \_ postgres: wal writer process                          
    postgres  3612  0.0  0.0 574648   964 ?        Ss    2013   3:07  \_ postgres: autovacuum launcher process                 
    postgres  3613  0.0  0.0   7936   136 ?        Ss    2013   0:11  \_ postgres: archiver process   last was 00000001000000060000003F
    postgres  3614  0.0  0.0   8216   408 ?        Ss    2013   9:18  \_ postgres: stats collector process                     
    postgres  4290  0.0  0.1 576388  2480 ?        Ss    2013   3:17  \_ postgres: hotspot hotspot 127.0.0.1(37336) idle       
    postgres  4467  0.7  1.0 576964 21376 ?        Ss    2013 160:19  \_ postgres: reporting reporting [local] idle            
    postgres  4728  0.0  0.0 576384   636 ?        Ss    2013   0:01  \_ postgres: smtp smtp 127.0.0.1(37356) idle             
    postgres 14671  0.5  1.2 578236 26396 ?        Ss   00:00   6:48  \_ postgres: reporting reporting [local] idle            
    postgres 14672  0.0  0.0 576296    20 ?        Ss   00:00   0:00  \_ postgres: reporting reporting [local] idle            
    postgres 14763  0.0  0.0 576172     8 ?        Ss   00:00   0:00  \_ postgres: reporting reporting [local] idle            
    postgres   991  0.4  0.1 576408  3544 ?        Ss   20:38   0:16  \_ postgres: smtp smtp 127.0.0.1(34674) idle             
    root      3700  0.0  0.0  40420    36 ?        S     2013   1:46 /var/mdw/mdw.plx
    root      3749  0.0  0.0   1896     0 ?        S     2013   0:00  \_ logger -p daemon.debug -t middleware[3700]
    root      3738  0.0  0.0   1920    20 ?        Ss    2013   0:25 runsvdir -P /etc/service log: .....................................
    root      3744  0.0  0.0   1776    16 ?        Ss    2013   0:00  \_ runsv selfmonng
    root      3745  1.5  0.1  11768  3024 ?        S     2013 328:29      \_ /usr/local/bin/selfmonng.plx
    root      3751  0.0  0.0  11360   296 ?        S     2013   0:10          \_ [timewarp check]
    root      3739  0.0  0.0   2420     8 tty1     Ss+   2013   0:00 /sbin/mingetty --noclear --no-hostname tty1
    root      3740  0.0  0.0   2420     8 tty2     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty2
    root      3741  0.0  0.0   2420     8 tty3     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty3
    root      3742  0.0  0.0   2420     8 tty4     Ss+   2013   0:00 /sbin/mingetty --no-hostname tty4
    root      3743  0.0  0.0   2140     8 ttyS0    Ss+   2013   0:00 /sbin/mingetty ttyS0
    root      4193  0.0  0.0   2360   156 ?        Ss    2013   0:09 /usr/sbin/cron
    root      4205  0.0  0.4  20652  9648 ?        Ss    2013  17:19 /usr/sbin/named -4
    root      4244  0.0  0.0   5016     4 ?        Ss    2013   0:00 /usr/sbin/sshd -f /etc/ssh/sshd_config
    root      4253  0.0  0.2  12592  5440 ?        Ss    2013   7:08 dns-resolver.plx
    root      4270  0.0  0.3  34724  6180 ?        Ss    2013   7:27 awed [master]
    root      4288  0.0  0.0   9580   368 ?        S     2013   0:38 /usr/local/bin/hotspotd
    root      4398  0.0  0.0   5116   312 ?        Ss    2013   0:15 /usr/sbin/openvpn --config /etc/openvpn/openvpn.conf --writepid /va
    root      4404  0.0  0.0  10876   288 ?        Ss    2013   1:24 /bin/httpd -f /etc/httpd/httpd.conf
    root      4406  0.0  0.0   1896   164 ?        S     2013   0:01  \_ /bin/logger -t httpd -p local6.notice
    wwwrun    4411  0.0  0.0  10788   136 ?        S     2013   0:03  \_ /bin/httpd -f /etc/httpd/httpd.conf
    wwwrun     916  2.7  1.3  81580 28160 ?        S    20:37   1:43  |   \_ /var/webadmin/webadmin.plx
    wwwrun     967  2.4  1.6  77456 34548 ?        S    20:38   1:32  |   \_ /var/webadmin/webadmin.plx
    wwwrun   10454  0.0  0.1  11260  2464 ?        S    21:35   0:00  \_ /bin/httpd -f /etc/httpd/httpd.conf
    wwwrun   10486  0.0  0.1  11196  2400 ?        S    21:35   0:00  \_ /bin/httpd -f /etc/httpd/httpd.conf
    root      4461  0.5  0.0 104728  2032 ?        S


    Are you experiencing any performance problems?  The utm is set to cache aggressively which leads to high swap usage in most installations below 4 gigs.  If you aren't having performance or logging issues contact support but there's no need to reboot.  Linux can handle things fine...these aren't winders..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Hi William,

    Thanks for your information. Haven't rebooted yet.

    As far as I know there are no performance issues to the end users. Tomorrow I will be at the site. Do you have any advise on what to test regarding this issue?

    I've also noticed that the default uplink has been down and up again several times the last day. This hasn't occurred earlier and might also be an external influence.
    - 7 jan 2014 18:14 / System Load        : 0.31
    - 8 jan 2014 20:15 / System Load        : 0.59
    - 8 jan 2014 20:31 / System Load        : 0.32
    - 8 jan 2014 20:35 / System Load        : 0.76
    - 8 jan 2014 20:35 / System Load        : 0.53
    - 8 jan 2014 21:49 / System Load        : 1.77
    - 8 jan 2014 21:51 / System Load        : 2.21
    (Only 1 WAN port active)
  • I've looked into this issue again and now i noticed that when I turned off the Web Protection module, the memory increase was stopped.

    See attached screenshot for monthly overview of memory / swap usage.
    After every peak of swap usage I had to do physical reboot on the device.