Page 1 of 1

Memory Leak? Solved

PostPosted: Wed Jun 22, 2016 6:20 pm
by Rustygh
I noticed what may be a memory leak; I installed in VirtualBox and allowed it to start and remain at idle. Watching conky I noticed my ram useage go from 16% to 65% steadily rising over 20 minutes. None of my other Ultimate Edition versions seem to do this. I'm watching it now and my uptime is now 45 minutes but no increase past 65% ram useage. I tried installing on a real harddrive partition and it did the same thing. I, as Chris 47, got an internal error message at startup that gave no details except that it made an error report and continued to run. This is a repeatable occurrence so should be easily investigated by someone who knows the internal workings much better than I. Other than these two things, it seems to run well and there is much that I am pleased with including bugs I've seen in previous versions are not in this one. Overall, I LIKE this distro, and will continue to tinker and test run it. Thank you Thee for another great OS and the last 10 years (approx.) of enjoying Ultimate Edition.

Re: Memory Leak?

PostPosted: Fri Jun 24, 2016 4:10 am
by pam
It could be a virtualbox related issue or Not. New kernels are compiled with flags for multithreaded optimizations.
Conky, I believe is single threaded. In no way is anything related, a fix, is not even a priority.
Anything that runs on the desktop or in real time like conky, taxes the CPU immensely, that's where you really notice the
difference between an Intel and AMD....IPC performance....in the process the RAM will get usurped.
Not making claims....just making my inference.

Re: Memory Leak?

PostPosted: Fri Jun 24, 2016 8:33 am
by Micro
To see what's using the memory, run top then shift F and i believe it's P for memory. Then you should see the offending process. But if you don't feel like waiting for the memory to get out of hand, here's a little trick I use ;) :

I call it, "top2file.sh" and all you have to do is place below script in /root

#/bin/sh
nice --10 top -n 1 -b >> /tmp/top-output.txt

and run crontab -e
*/1**** /root/top2file.sh

This will output top every minute and encase the system crashes, you will still be able to reboot and see what went on beforehand. <BREW>

If I had to guess this is related to the update-apt-xapian-index...

Re: Memory Leak?

PostPosted: Sat Jun 25, 2016 12:00 am
by OlDrunk
I'm noticing the same memory issue and I have 5.0 installed on my main laptop no virtualbox, when I boot conky shows mem useage at 9% builds up to 70% after an hour of uptime and floats around there , maybe just conky/system monitor reporting wrong, running top the highest memory usage comes from firefox when running next would be Xorg then compiz and gtk-window-deco and the MEM% is steady for those

Re: Memory Leak?

PostPosted: Mon Jun 27, 2016 10:08 pm
by Rustygh
Pam, in my post I said that I did a clean install to a physical drive partition and had the same problem, so I doubt very seriously that Vbox has anything to do with it. I did notice an internal error notice that at first did not mention cause, and then a second notice that mentioned xapian update failure. As you can see in my signature I also boot to Ultimate Edition 4.2.3 as well and that os runs at idle with 550 to 600 MB of ram and steady until I call on it to run some other program, which is normal. I'm not here to argue the point of which processor manufacturer makes the better processor. My processor is quite able to handle anything that Ultimate Edition can throw at it as long as it (the OS) is working properly. I merely intended to report an error that I ran across and since OL'Drunk noticed the same problem, as did Chris47, I don't think that one could off hand say the problem resides with my hardware or its configuration. And with that I let this rest. I'll let you guys fix it or NOT as you see fit. I have 4.2.3 that runs perfectly well and I can live with that.

Re: Memory Leak?

PostPosted: Tue Jun 28, 2016 1:44 pm
by Micro
So nobody can track the usage with top?
- run top, then type shift key plus F, goto %MEM and and spacebar, type s, then type q and top will sort by memory usage from top down in the %MEM column:

top - 13:38:59 up 19 days, 22:34, 4 users, load average: 0.02, 0.02, 0.05
Tasks: 759 total, 1 running, 758 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.2 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 65803136 total, 53202476 free, 2707236 used, 9893424 buff/cache
KiB Swap: 8388604 total, 8388604 free, 0 used. 62499368 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31455 root 20 0 1696984 1.024g 14688 S 0.0 1.6 8:26.74 goa-daemon
31407 root 20 0 1551424 243604 43696 S 0.0 0.4 7:59.92 gnome-shell
31873 root -98 0 231720 131540 114084 S 0.3 0.2 14:55.29 had
26136 root 20 0 71572 65180 3524 S 0.0 0.1 0:00.07 vxencryptd
33334 sapadm 20 0 533384 63428 42780 S 0.0 0.1 2:19.17 sapstartsrv

You should see a PID using a high percent of the memory on the system. Also if you think that conky is displaying incorrectly, to see your memory usage run the free cmd:

[root@xxxxxx02 ~]# free -g
total used free shared buff/cache available
Mem: 62 2 50 0 9 59
Swap: 7 0 7

This will be accurate 100%

Re: Memory Leak?

PostPosted: Tue Jun 28, 2016 2:48 pm
by OlDrunk
Figured it out, conky/system monitor is reporting buffer/cache memory(http://www.linuxatemyram.com) as used memory but really every thing is fine, in top or system monitor can't see any processes that are using up a lot of memory but conky/system monitor is reporting 5 of my 8 gigs of ram are used, in Top reported 1.5 gig of ram is used, 1.2 is free and 5 gigs are buff/cache. Been running UE5.0 on my main machine for a week now and been playing games on Steam like ETS2, XCOM:EU and Guns of Icarus(so hardware demanding games) have had no issues in performance or crashes, system is holding up great.
I also just noticed that conky is saying my cpu is 3.2ghz but it really is only 2.3ghz, it's just conky thats buggered up not any thing with UE5.0 it's self.

top - 14:49:03 up 3:15, 2 users, load average: 1.52, 1.46, 1.45
Tasks: 238 total, 2 running, 236 sleeping, 0 stopped, 0 zombie
%Cpu(s): 13.5 us, 4.2 sy, 0.0 ni, 81.6 id, 0.8 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8069588 total, 1182252 free, 1626064 used, 5261272 buff/cache
KiB Swap: 7999484 total, 7999484 free, 0 used. 1884104 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20263 flint 20 0 2097096 692552 122176 S 3.7 8.6 14:27.40 firefox
5640 flint 20 0 1102748 622356 38244 S 1.3 7.7 2:11.99 gtk-window+
1013 root 20 0 597560 91136 71852 S 9.3 1.1 15:56.83 Xorg
5281 flint 20 0 638732 87136 60524 S 5.0 1.1 8:42.99 compiz
5296 flint 20 0 817676 50472 28660 S 0.0 0.6 0:04.96 nm-applet

Re: Memory Leak?

PostPosted: Tue Jun 28, 2016 3:41 pm
by Micro
Well done Sir <BREW>

Re: Memory Leak? Solved

PostPosted: Wed Jun 29, 2016 7:45 am
by Rustygh
Thanks Ol Drunk, I noticed in Mate system monitor also that no processes were eating excessive ram. I'm glad to hear I can run it with no problems, Maybe conky will get a fix and be updated. My hat's off to you. I,m not a cli guru, but I do well with gui's and can find my way around fairly well. Thanks again!