Memory Leak - Memory Usage - Bootchart [Solved]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
hpmc13
Level 3
Level 3
Posts: 149
Joined: Tue Jun 04, 2013 4:26 pm

Memory Leak - Memory Usage - Bootchart [Solved]

Post by hpmc13 »

I recently upgraded to LM 18 Cinnamon. I did the update in-place from 17.3. So far, everything has gone smoothly.

I have noticed that in both Conky and Top that my memory usage is reported as really high - at the moment, Top reports that 13.1GiB of 16 are in use; only 4.6GiB are available (roughly, that's sort of a moving target.) Conky reports roughly the same. When the computer first boots it uses only around 500 megs. It doesn't appear to be a memory leak as it isn't climbing any higher. The system monitor is showing roughly the same thing. In neither Top nor the system monitor can I find a particular process that is responsible. It not causing stability problems. It's just sort of odd. 17.3 rarely went over 1GiB.

Any help or insight is appreciated.

Code: Select all

inxi -Fzx
System:    Host: workpc Kernel: 4.4.0-31-generic x86_64 (64 bit gcc: 5.3.1)
           Desktop: Cinnamon 3.0.7 (Gtk 3.18.9-1ubuntu3.1) Distro: Linux Mint 18 Sarah
Machine:   System: Gigabyte product: N/A
           Mobo: Gigabyte model: 990FXA-UD3 R5 v: x.x Bios: American Megatrends v: F2 date: 04/01/2015
CPU:       Octa core AMD FX-8350 Eight-Core (-MCP-) cache: 16384 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 64294
           clock speeds: max: 4000 MHz 1: 1400 MHz 2: 1400 MHz 3: 1400 MHz 4: 1400 MHz 5: 2100 MHz 6: 2100 MHz
           7: 1400 MHz 8: 1400 MHz
Graphics:  Card: NVIDIA GM206 [GeForce GTX 960] bus-ID: 01:00.0
           Display Server: X.Org 1.18.3 driver: nvidia Resolution: 1280x1024@60.02hz, 1920x1080@60.00hz
           GLX Renderer: GeForce GTX 960/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 361.42 Direct Rendering: Yes
Audio:     Card-1 NVIDIA Device 0fba driver: snd_hda_intel bus-ID: 01:00.1 Sound: ALSA v: k4.4.0-31-generic
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel bus-ID: 00:14.2
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: c000 bus-ID: 05:00.0
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 1440.3GB (45.5% used) ID-1: /dev/sda model: ZOTAC_ZTSSD size: 120.0GB
           ID-2: /dev/sdb model: WDC_WD10EZEX size: 1000.2GB ID-3: /dev/sdc model: WDC_WD3200AAJS size: 320.1GB
Partition: ID-1: / size: 20G used: 8.5G (46%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 39G used: 3.6G (10%) fs: ext4 dev: /dev/sda2
           ID-3: swap-1 size: 2.14GB used: 0.00GB (0%) fs: swap dev: /dev/sda4
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 39.0C mobo: 26.9C gpu: 0.0:47C
           Fan Speeds (in rpm): cpu: 1350 fan-2: 0 fan-3: 0 fan-4: 1290 fan-5: 0
Info:      Processes: 249 Uptime: 10:34 Memory: 1504.6/16013.4MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.421) inxi: 2.2.35 

Code: Select all

top - 19:21:56 up 10:36,  1 user,  load average: 0.30, 0.29, 0.24
Tasks: 247 total,   3 running, 244 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.6 us,  1.6 sy,  0.0 ni, 93.4 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 16397684 total,  4648960 free,  1327016 used, 10421708 buff/cache
KiB Swap:  2088956 total,  2088956 free,        0 used.  6474536 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                 
14369 hpmc131   20   0 1777688 684032 122408 S  14.7  4.2   7:49.38 firefox                                                                 
 3609 root      20   0  349464 114396  65424 R  10.7  0.7  24:03.51 Xorg                                                                    
 4284 hpmc131   20   0 1539212  17216   9780 S   7.7  0.1  43:55.85 conky                                                                   
 9389 hpmc131   20   0  509000  50976  33644 S   5.7  0.3   0:12.66 gnome-system-mo                                                         
 4167 hpmc131   20   0 1729856 309888  76760 S   3.0  1.9  12:29.10 cinnamon                                                                
22230 root      20   0  495376   5360   1904 S   0.7  0.0   1:59.31 veracrypt                                                               
 3963 hpmc131   20   0  166540    576    316 S   0.3  0.0   0:00.85 gpg-agent                                                               
 4269 hpmc131   20   0  483188  39172  27480 S   0.3  0.2   0:02.07 gnome-terminal-                                                         
11965 hpmc131   20   0   41944   3868   3208 R   0.3  0.0   0:00.14 top                                                                     
21967 hpmc131   20   0  511788  37512  27528 S   0.3  0.2   0:53.02 veracrypt                                                               
    1 root      20   0  185560   6252   4028 S   0.0  0.0   0:02.21 systemd                                                                 
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.01 kthreadd                                                                
    3 root      20   0       0      0      0 S   0.0  0.0   0:02.80 ksoftirqd/0                                                             
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H                                                            
    7 root      20   0       0      0      0 S   0.0  0.0   1:02.64 rcu_sched                                                               
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh                                                                  
    9 root      rt   0       0      0      0 S   0.0  0.0   0:00.60 migration/0                                                             
   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.14 watchdog/0                                                              
   11 root      rt   0       0      0      0 S   0.0  0.0   0:00.14 watchdog/1                                                              
   12 root      rt   0       0      0      0 S   0.0  0.0   0:00.66 migration/1                                                             
   13 root      20   0       0      0      0 S   0.0  0.0   0:01.13 ksoftirqd/1                                                             
   15 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H                                                            
   16 root      rt   0       0      0      0 S   0.0  0.0   0:00.13 watchdog/2                                                              
   17 root      rt   0       0      0      0 S   0.0  0.0   0:00.88 migration/2                                                             
   18 root      20   0       0      0      0 S   0.0  0.0   0:02.74 ksoftirqd/2                                                             
   20 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/2:0H                                                            
   21 root      rt   0       0      0      0 S   0.0  0.0   0:00.12 watchdog/3                                                              
   22 root      rt   0       0      0      0 S   0.0  0.0   0:00.65 migration/3                                                             
   23 root      20   0       0      0      0 S   0.0  0.0   0:00.94 ksoftirqd/3                                                             
   25 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/3:0H                                                            
   26 root      rt   0       0      0      0 S   0.0  0.0   0:00.12 watchdog/4                                                              
   27 root      rt   0       0      0      0 S   0.0  0.0   0:00.65 migration/4                                                             
   28 root      20   0       0      0      0 S   0.0  0.0   0:02.68 ksoftirqd/4                                                             
   30 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/4:0H                                                            
   31 root      rt   0       0      0      0 S   0.0  0.0   0:00.11 watchdog/5                                                              
   32 root      rt   0       0      0      0 S   0.0  0.0   0:00.62 migration/5                                                             
   33 root      20   0       0      0      0 S   0.0  0.0   0:01.06 ksoftirqd/5 
Last edited by hpmc13 on Sun Aug 07, 2016 10:50 am, edited 2 times in total.
Running LM 19 Cinnamon

User avatar
Reorx
Level 11
Level 11
Posts: 3969
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: Memory Usage

Post by Reorx »

inxi shows 1.5 GB used.

Top shows 1.3 GB used (and ~10.4 GB cache/buffer)

Cache/buffer is a temporary holding place for data going to and from the HD. I'm not sure how Linux manages a cache but the memory devoted to it is likely dynamically allocated based on the amount of memory and the amount that is not directly in use by the OS and programs... Said another way, if you were to open programs that occupied 10 GB of memory, I believe the cache size would automatically decrease to free up memory for programs in use. I'm not sure about this though... try it to see what actually happens - open 50 brower tabs and check again... :mrgreen:
Full time Linux Mint user since 2011 - Currently running LM19 Cinnamon.

Image Image

hpmc13
Level 3
Level 3
Posts: 149
Joined: Tue Jun 04, 2013 4:26 pm

Re: Memory Usage

Post by hpmc13 »

Crap, you're right. I got my numbers in the wrong place on used memory. That makes complete sense, except for how it appears in both Conky and System Monitor.

Below are three screenshots: one of Conky, and two of System Monitor. I didn't add up all of the processes' memory usage, but I'm sure that they don't get anywhere near 9GiB. Before LM 18 both Conky and System Monitor showed total memory that was easily freed (or words to that effect) and therefore readily available. In 17.3, it would have show as something like 1GiB used and 15Gib free, even though that may not have been completely accurate.

This is probably essentially the same thing, but it's different from what I was used to. I think that my memory usage is pretty much the same as in 17.3, but it's getting reported differently. Or maybe I'm totally off-base?

Anyone else seeing similar results?
Running LM 19 Cinnamon

User avatar
Reorx
Level 11
Level 11
Posts: 3969
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: Memory Usage

Post by Reorx »

hpmc13 wrote:...I think that my memory usage is pretty much the same as in 17.3, but it's getting reported differently...
I think that is basically correct.

The Processes tab of System Monitor seems to show about 1 GB in use but the Resources tab shows ~9.3 GB in use. I can't explain the 9.3 GB number.

I'm not familiar with Conky.
Full time Linux Mint user since 2011 - Currently running LM19 Cinnamon.

Image Image

hpmc13
Level 3
Level 3
Posts: 149
Joined: Tue Jun 04, 2013 4:26 pm

Re: Memory Usage

Post by hpmc13 »

Thanks Reorx. I think that I'll assume that it's a reporting oddity.
Running LM 19 Cinnamon

hpmc13
Level 3
Level 3
Posts: 149
Joined: Tue Jun 04, 2013 4:26 pm

Re: Memory Leak - Memory Usage

Post by hpmc13 »

I may have spoken too soon. Today I booted and logged in, but walked away from the computer. I didn't open anything. When I came back, the screens were turned off (as they should be.) I moved the mouse and when I looked at memory used, it was around 8 GiB. Again, I did nothing with the computer up to that point.

I rebooted and watched the memory usage. It's slowly going up at a rate of about 300 megs+ every five minutes.

I did notice a process in top (and Conky) that I had never seen before: Collector. I found nothing on it through DDG or Google. Anyone know what that is, what it's collecting, and why it's there? I thought that Collector might be the culprit so I killed it, but that didn't help the memory problem. In the time that it took me write this my memory usage has gone up by nearly 500 megs (and counting.)

I have no idea where to go from here. Thanks in advance.
Running LM 19 Cinnamon

hpmc13
Level 3
Level 3
Posts: 149
Joined: Tue Jun 04, 2013 4:26 pm

Re: Memory Leak - Memory Usage

Post by hpmc13 »

I seem to have answered my own question. Collector is part of Bootchart. After I purged Bootchart, collector does not run, and memory usage is seemingly holding steady. I'll give it a couple days to make sure then update the subject to "Solved"

Thanks!
Running LM 19 Cinnamon

Post Reply

Return to “Newbie Questions”