[opensuse] how to "clean" memory and swap without booting?
Hello, firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change. I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping. How can I get rid of all that memory that firefox has "eaten" without rebooting? Thanks for hints! Daniel (*) This happens when I open and close many windows. Concrete: I am looking thru an archive of a tumblr blog and click on the thumbs, which opens new windows. Then maybe I do something in that new window (for example reblog or like) or just close it again and go on in the archive. Sometimes I go thru that archive for many years, thus many scrolls down. I guess, firefox keeps all in memory what I've looked at, and so of course it fills up memory. I would have thought, that this gets freed when I close all firefox instances, but no. So then I thought it should get free at least when I log out and in again, but no. So, to get back may system to normal working speed I need to reboot. Like every two hours... I'd love to have a better solution... -- Daniel Bauer photographer Basel Barcelona https://www.patreon.com/danielbauer http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Daniel Bauer wrote:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I see this too, occasionally. Closing Firefox always releases whatever memory Firefox has used up. How do you determine that nothing changes? -- Per Jessen, Zürich (-6.2°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/27/2018 01:54 PM, Per Jessen wrote:
I see this too, occasionally. Closing Firefox always releases whatever memory Firefox has used up. How do you determine that nothing changes?
Indeed, if the memory wouldn't be released after a process terminates, then this would be a kernel bug. Of course a program can create some files in in-memory file systems like /dev/shm, but that's a different story. @the OP: When looking at the output of 'free', one also has to look at the "buff/cache" value - it may be that FF is closed, but the OS may have not dismissed e.g. the buffer for files it has used. This is not a problem; better: there's nothing wrong with that. You can find a lot of hits about that with your web search engine of choice. Linux does a very great job at memory management, unless you have processes which use much more memory as the system physically provides. In such a case: get more RAM to fit the programs' need, or try to limit the amount of memory that process can take. Another prominent example in the memory hog category is Java: it seems to think it is alone on a system; so if you have a couple of (unrestricted) java processes, you'll soon have a problem. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-02-27 at 23:57 +0100, Bernhard Voelker wrote:
Another prominent example in the memory hog category is Java: it seems to think it is alone on a system; so if you have a couple of (unrestricted) java processes, you'll soon have a problem.
I'm interested in this part. top - 13:41:54 up 2 days, 2:11, 1 user, load average: 1,21, 1,25, 0,97 Tasks: 500 total, 2 running, 497 sleeping, 0 stopped, 1 zombie %Cpu(s): 26,8 us, 2,4 sy, 0,3 ni, 70,1 id, 0,3 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 8174604 total, 7958232 used, 216372 free, 79976 buffers KiB Swap: 25165820 total, 2797636 used, 22368184 free. 3316092 cached Mem PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND 8001 cer 20 0 11,483g 2,659g 187872 646312 R 105,6 34,10 139:55.11 firefox 10291 cer 20 0 2411308 375620 41712 67564 S 1,980 4,595 12:42.27 firefox 7627 cer 20 0 3055932 367648 49656 59084 S 0,000 4,497 26:25.82 thunderbird-bin 5580 root 20 0 602648 222376 167228 47016 S 1,320 2,720 20:08.52 X 4137 vscan 20 0 1058820 222324 1928 329416 S 0,000 2,720 0:24.72 clamd 11501 cer 20 0 89180 75644 68280 0 S 0,000 0,925 0:01.47 imap 5797 cer 20 0 636168 54480 11116 36372 S 0,990 0,666 2:15.78 xfce4-terminal 11388 cer 20 0 5312028 48112 10764 104136 S 0,000 0,589 0:17.43 java ps: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cer 11388 0.0 0.6 5312028 52556 ? Sl Feb27 0:17 \_ java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView Is that java process Ok? It just displays a panel with buttons that control my TV set. Why should it require 5 GB virtual memory? - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqWpMUACgkQtTMYHG2NR9V7DACfa5jNdhf6NmB4V7f76iOyv40u 0/wAn1TFKzlMRjCKIvCCm5hy0vzn0b8F =wXpT -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/28/2018 01:47 PM, Carlos E. R. wrote:
top - 13:41:54 up 2 days, 2:11, 1 user, load average: 1,21, 1,25, 0,97 Tasks: 500 total, 2 running, 497 sleeping, 0 stopped, 1 zombie %Cpu(s): 26,8 us, 2,4 sy, 0,3 ni, 70,1 id, 0,3 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 8174604 total, 7958232 used, 216372 free, 79976 buffers KiB Swap: 25165820 total, 2797636 used, 22368184 free. 3316092 cached Mem
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND 8001 cer 20 0 11,483g 2,659g 187872 646312 R 105,6 34,10 139:55.11 firefox 10291 cer 20 0 2411308 375620 41712 67564 S 1,980 4,595 12:42.27 firefox 7627 cer 20 0 3055932 367648 49656 59084 S 0,000 4,497 26:25.82 thunderbird-bin 5580 root 20 0 602648 222376 167228 47016 S 1,320 2,720 20:08.52 X 4137 vscan 20 0 1058820 222324 1928 329416 S 0,000 2,720 0:24.72 clamd 11501 cer 20 0 89180 75644 68280 0 S 0,000 0,925 0:01.47 imap 5797 cer 20 0 636168 54480 11116 36372 S 0,990 0,666 2:15.78 xfce4-terminal 11388 cer 20 0 5312028 48112 10764 104136 S 0,000 0,589 0:17.43 java
ps:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cer 11388 0.0 0.6 5312028 52556 ? Sl Feb27 0:17 \_ java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
Is that java process Ok?
yes and no: java assumes that it could use about 2/3 of the RAM - that's why you see the 5G VSZ here; as long as this java process doesn't grow to this limit (and you don't need the memory for other processes), you're safe. But if it would grow, java wouldn't necessarily see a reason to do garbage collection. At work, we are dealing with more java processes per host, so at least since java-8 (we're using Oracle-JRE), we must limit the memory via the -Xmx option, e.g. java -Xmx1G ... (I'm not sure about openjdk though, but would assume the same.) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Bernhard Voelker <mail@bernhard-voelker.de> [02-28-18 08:46]: [...]
yes and no: java assumes that it could use about 2/3 of the RAM - that's why you see the 5G VSZ here; as long as this java process doesn't grow to this limit (and you don't need the memory for other processes), you're safe. But if it would grow, java wouldn't necessarily see a reason to do garbage collection.
At work, we are dealing with more java processes per host, so at least since java-8 (we're using Oracle-JRE), we must limit the memory via the -Xmx option, e.g. java -Xmx1G ...
(I'm not sure about openjdk though, but would assume the same.)
according to the man page from java-1_8_0-openjdk-headless-1.8.0.151-2.1.x86_64, it does. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-02-28 14:44, Bernhard Voelker wrote:
On 02/28/2018 01:47 PM, Carlos E. R. wrote:
top - 13:41:54 up 2 days, 2:11, 1 user, load average: 1,21, 1,25, 0,97 Tasks: 500 total, 2 running, 497 sleeping, 0 stopped, 1 zombie %Cpu(s): 26,8 us, 2,4 sy, 0,3 ni, 70,1 id, 0,3 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 8174604 total, 7958232 used, 216372 free, 79976 buffers KiB Swap: 25165820 total, 2797636 used, 22368184 free. 3316092 cached Mem
PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND 8001 cer 20 0 11,483g 2,659g 187872 646312 R 105,6 34,10 139:55.11 firefox 10291 cer 20 0 2411308 375620 41712 67564 S 1,980 4,595 12:42.27 firefox 7627 cer 20 0 3055932 367648 49656 59084 S 0,000 4,497 26:25.82 thunderbird-bin 5580 root 20 0 602648 222376 167228 47016 S 1,320 2,720 20:08.52 X 4137 vscan 20 0 1058820 222324 1928 329416 S 0,000 2,720 0:24.72 clamd 11501 cer 20 0 89180 75644 68280 0 S 0,000 0,925 0:01.47 imap 5797 cer 20 0 636168 54480 11116 36372 S 0,990 0,666 2:15.78 xfce4-terminal 11388 cer 20 0 5312028 48112 10764 104136 S 0,000 0,589 0:17.43 java
ps:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cer 11388 0.0 0.6 5312028 52556 ? Sl Feb27 0:17 \_ java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
Is that java process Ok?
yes and no: java assumes that it could use about 2/3 of the RAM - that's why you see the 5G VSZ here; as long as this java process doesn't grow to this limit (and you don't need the memory for other processes), you're safe. But if it would grow, java wouldn't necessarily see a reason to do garbage collection.
At work, we are dealing with more java processes per host, so at least since java-8 (we're using Oracle-JRE), we must limit the memory via the -Xmx option, e.g. java -Xmx1G ...
(I'm not sure about openjdk though, but would assume the same.)
Nice! I tried this command line: java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView Now top has: PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND 23199 cer 20 0 13144 2540 2308 0 S 0,000 0,031 0:00.00 gigacontrol 23200 cer 20 0 4213056 220656 114124 0 S 0,000 2,699 0:04.22 java What I wonder now is about that second process that has appeared. "ps afxu" clarifies: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cer 5764 0.0 0.0 395632 4716 ? Ssl Feb26 0:01 xfsettingsd --display :0.0 --sm-client-id 2452e7d15-5870-415b-96d6-8723974f1bae cer 11327 0.0 0.2 533760 20700 ? Sl Feb27 0:00 \_ xfce4-appfinder --collapsed cer 23199 0.0 0.0 13144 2540 ? S 15:09 0:00 \_ /bin/bash /home/cer/bin/gigacontrol cer 23200 1.0 2.6 4213056 220680 ? Sl 15:09 0:04 \_ java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView It seems that "-Xmx1G" has not much effect. cer@Telcontar:~> java -version openjdk version "1.8.0_151" Oh. I thought I was using the oracle version, it is installed :-( Yes, "jdk1.8-1.8.0_161-fcs.x86_64" is installed. Now, find why it is not used... ... Telcontar:~ # update-alternatives --install "/usr/bin/java" "java" "/usr/java/latest/bin/java" 1 Telcontar:~ # update-alternatives --set java /usr/java/latest/bin/java update-alternatives: using /usr/java/latest/bin/java to provide /usr/bin/java (java) in manual mode Telcontar:~ # l /etc/alternatives/java lrwxrwxrwx 1 root root 25 Feb 28 15:27 /etc/alternatives/java -> /usr/java/latest/bin/java* Telcontar:~ # java -version java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) Ok, that's better. But memory is the same: 27071 cer 20 0 13144 2528 2296 0 S 0,000 0,031 0:00.00 gigacontrol 27072 cer 20 0 4459956 267956 149936 0 S 0,000 3,278 0:04.70 java cer@Telcontar:~> l /usr/java/latest/bin/java -rwxr-xr-x 1 root root 7734 Dec 20 01:27 /usr/java/latest/bin/java* cer@Telcontar:~> rpm -qf /usr/java/latest/bin/java jdk1.8-1.8.0_161-fcs.x86_64 cer@Telcontar:~> That's the Oracle version, right? Telcontar:~ # rpm -qi jdk1.8-1.8.0_161-fcs.x86_64 Name : jdk1.8 Epoch : 2000 Version : 1.8.0_161 Release : fcs Architecture: x86_64 Install Date: Sat Feb 10 19:50:33 2018 Group : Development/Tools Size : 289899092 License : http://java.com/license Signature : (none) Source RPM : jdk1.8-1.8.0_161-fcs.src.rpm Build Date : Wed Dec 20 01:29:52 2017 Build Host : sc11137389.us.oracle.com Relocations : /usr/java Packager : Java Software <jre-comments@java.sun.com> Vendor : Oracle Corporation URL : URL_REF Summary : Java Platform Standard Edition Development Kit Telcontar:~ # update-alternatives --list java /usr/java/latest/bin/java /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java Telcontar:~ # Still does not list the oracle version. :-/ Why? Telcontar:~ # update-alternatives --config java There are 3 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 auto mode * 1 /usr/java/latest/bin/java 1 manual mode 2 /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java 1705 manual mode 3 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 manual mode Press <enter> to keep the current choice[*], or type selection number: ^C Telcontar:~ # -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [02-28-18 09:48]: [...]
I tried this command line:
java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
Now top has: PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND
23199 cer 20 0 13144 2540 2308 0 S 0,000 0,031 0:00.00 gigacontrol 23200 cer 20 0 4213056 220656 114124 0 S 0,000 2,699 0:04.22 java
What I wonder now is about that second process that has appeared. "ps afxu" clarifies:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
cer 5764 0.0 0.0 395632 4716 ? Ssl Feb26 0:01 xfsettingsd --display :0.0 --sm-client-id 2452e7d15-5870-415b-96d6-8723974f1bae cer 11327 0.0 0.2 533760 20700 ? Sl Feb27 0:00 \_ xfce4-appfinder --collapsed cer 23199 0.0 0.0 13144 2540 ? S 15:09 0:00 \_ /bin/bash /home/cer/bin/gigacontrol cer 23200 1.0 2.6 4213056 220680 ? Sl 15:09 0:04 \_ java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
It seems that "-Xmx1G" has not much effect.
but where is RES for firefox. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-02-28 15:57, Patrick Shanahan wrote:
* Carlos E. R. <> [02-28-18 09:48]: [...]
It seems that "-Xmx1G" has not much effect.
but where is RES for firefox.
See subject line - this subthread is about Java :-) -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 02/28/2018 03:46 PM, Carlos E. R. wrote:
java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
Now top has: PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND
23199 cer 20 0 13144 2540 2308 0 S 0,000 0,031 0:00.00 gigacontrol 23200 cer 20 0 4213056 220656 114124 0 S 0,000 2,699 0:04.22 java
What I wonder now is about that second process that has appeared. "ps afxu" clarifies:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
cer 5764 0.0 0.0 395632 4716 ? Ssl Feb26 0:01 xfsettingsd --display :0.0 --sm-client-id 2452e7d15-5870-415b-96d6-8723974f1bae cer 11327 0.0 0.2 533760 20700 ? Sl Feb27 0:00 \_ xfce4-appfinder --collapsed cer 23199 0.0 0.0 13144 2540 ? S 15:09 0:00 \_ /bin/bash /home/cer/bin/gigacontrol cer 23200 1.0 2.6 4213056 220680 ? Sl 15:09 0:04 \_ java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
you could avoid this shell process by using exec java ... inside.
Yes, "jdk1.8-1.8.0_161-fcs.x86_64" is installed.
Now, find why it is not used...
I usually install Oracle-JRE from '*tar.gz', and redirect a symlink from $HOME/bin/java to the install directory. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-02-28 16:05, Bernhard Voelker wrote:
On 02/28/2018 03:46 PM, Carlos E. R. wrote:
java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
Now top has: PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND
23199 cer 20 0 13144 2540 2308 0 S 0,000 0,031 0:00.00 gigacontrol 23200 cer 20 0 4213056 220656 114124 0 S 0,000 2,699 0:04.22 java
What I wonder now is about that second process that has appeared. "ps afxu" clarifies:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
cer 5764 0.0 0.0 395632 4716 ? Ssl Feb26 0:01 xfsettingsd --display :0.0 --sm-client-id 2452e7d15-5870-415b-96d6-8723974f1bae cer 11327 0.0 0.2 533760 20700 ? Sl Feb27 0:00 \_ xfce4-appfinder --collapsed cer 23199 0.0 0.0 13144 2540 ? S 15:09 0:00 \_ /bin/bash /home/cer/bin/gigacontrol cer 23200 1.0 2.6 4213056 220680 ? Sl 15:09 0:04 \_ java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView
you could avoid this shell process by using exec java ... inside.
Ah, yes, thanks. Done. Still, virtual memory is 4G, not 1.
Yes, "jdk1.8-1.8.0_161-fcs.x86_64" is installed.
Now, find why it is not used...
I usually install Oracle-JRE from '*tar.gz', and redirect a symlink from $HOME/bin/java to the install directory.
I found that the rpm is easier to handle. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 02/28/2018 04:11 PM, Carlos E. R. wrote:
On 2018-02-28 16:05, Bernhard Voelker wrote:
On 02/28/2018 03:46 PM, Carlos E. R. wrote:
java -Xmx1G -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView ... Still, virtual memory is 4G, not 1.
-Xmx is just type of memory the Java virtual machine is managing; you will fidn lots of information with a web search about that. Yet it's the most important one to limit. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Daniel Bauer wrote:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping.
How can I get rid of all that memory that firefox has "eaten" without rebooting?
A first thing to check is that firefox has really stopped. I'm not using it often, but have noticed several times that when closing it still does 'something' in the background before being really gone. 'ps aux|grep firefox' should tell you. Next, what is 'memory almost full'? Typical error is to look at 'free' output, but only at the 'used' part, which typically is to a big part consumed by cached data (that gets dumped when memory is needed). It could also be a real memory leak in FF. Then reboot is AFAIK the only way to free it again. Have you tried a different browser? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-02-27 13:59, Peter Suetterlin wrote:
It could also be a real memory leak in FF. Then reboot is AFAIK the only way to free it again.
It should go to swap soon, and stay there out of harm way. At least till swap fills. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2018-02-27 13:59, Peter Suetterlin wrote:
It could also be a real memory leak in FF. Then reboot is AFAIK the only way to free it again.
It should go to swap soon, and stay there out of harm way. At least till swap fills.
....and/or he does his swapoff/swapon trick :D -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-02-27 at 14:16 +0100, Peter Suetterlin wrote:
Carlos E. R. wrote:
On 2018-02-27 13:59, Peter Suetterlin wrote:
It could also be a real memory leak in FF. Then reboot is AFAIK the only way to free it again.
It should go to swap soon, and stay there out of harm way. At least till swap fills.
....and/or he does his swapoff/swapon trick :D
Well, then it goes to ram, making things worse... - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqVXEsACgkQtTMYHG2NR9WNeQCfREaXVijdr1fTbr+hi4aIn290 JfIAn1026kIPsI1rYOEn4WktnP5xhu3J =icSU -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/02/18 07:59 AM, Peter Suetterlin wrote:
It could also be a real memory leak in FF.
It could be, but if that is so then it is probably in an add-in. Other than turning them all off then on again one by one is there any way to find out? Because it is not as if this memfull/swap/lockup occurs instantly, and to loss of the plugins may be a serious inconvenience in the mean time. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-02-27 at 13:39 +0100, Daniel Bauer wrote:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping.
Swap memory is moved to RAM, so swapoff makes things worse.
How can I get rid of all that memory that firefox has "eaten" without rebooting?
Firefox eats memory like a hog, no way around that. Closing it (really closed) frees that memory. Restarting FF with the same windows will use a lot of memory, but not as much as before. Unless FF doesn't really close, you need more ram. If this is not possible, move swap to a faster disk - this is what I did, to an SSD. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqVW6QACgkQtTMYHG2NR9Vn3wCdF2hSZ+alLKfedv1yuZ6GQvHp iqMAnR8d9Ggb4boInmSUDgQsC7LY+ohG =H/Bj -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Daniel Bauer <linux@daniel-bauer.com> [01-01-70 12:34]:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping.
How can I get rid of all that memory that firefox has "eaten" without rebooting?
Thanks for hints!
Daniel
(*) This happens when I open and close many windows. Concrete: I am looking thru an archive of a tumblr blog and click on the thumbs, which opens new windows. Then maybe I do something in that new window (for example reblog or like) or just close it again and go on in the archive. Sometimes I go thru that archive for many years, thus many scrolls down.
I guess, firefox keeps all in memory what I've looked at, and so of course it fills up memory. I would have thought, that this gets freed when I close all firefox instances, but no. So then I thought it should get free at least when I log out and in again, but no.
So, to get back may system to normal working speed I need to reboot. Like every two hours... I'd love to have a better solution...
how do you know that ff is not releasing its memory? do before stopping ff: free -m and again after stopping ff. does it show more unused memory? what extensions and add-ons are you running while ff is running, open systemmonitor and see how much memory ff is using. I see 983.5 MB total for 10 instances and 66 pages on my box. or, use a different browser, qupzilla/vivaldi -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/02/18 08:54 AM, Patrick Shanahan wrote:
how do you know that ff is not releasing its memory? do before stopping ff: free -m and again after stopping ff. does it show more unused memory?
"I'm sorry Dave, I can't do that". When I hit this condition the disk light is on hard, not flickering. The mouse doesn't respond. I hot-key to VT f1 and after a couple of minutes - yes, I wait that long - it comes up and there is the login prompt. I enter "r" and wait a couple of seconds for that to echo back on the screen. Similarly with o-o-t I then wait and wait and wait for the password prompt. It doesn't come. After about 5 minutes there is a message saying that the prompt timed out after 60 seconds. Some days, about one in five or six occurrences, I can log in. The first thing I type is "w" and I see a load factor on the 30s or 40s. That comes up after three or four minutes. Running 'swapon -s' shows that the swap partition is about 60% full. I can go and make coffee between entering that response and coming back to wait for a response. Trying to run anything with a larger footprint like 'top' or 'htop' is impractical. Normal running, FF started but no extra open/close: # free -m total used free shared buffers cached Mem: 3807 3360 447 81 42 408 -/+ buffers/cache: 2908 898 Swap: 5720 352 5368 I *EXPECT* memory to be nearly completely used; this is late model virtual memory; it is going to try and completely use memory to maximise the working sets so as to minimise paging. It is DATA that is the issue. The top lines from 'top' read PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2420 anton 20 0 4785708 1.893g 59320 S 7.309 50.92 1:09.87 firefox 2326 anton 20 0 3589600 78276 23852 S 0.664 2.008 2:35.19 plasmashell 2346 anton 20 0 658728 31144 19600 S 0.664 0.799 0:59.08 konsole 2406 anton 20 0 3199192 658020 69748 S 0.332 16.88 26:09.83 thunderbird-bin 6132 root 20 0 22128 2788 2140 R 0.332 0.072 0:00.20 top 1 root 20 0 38128 3776 1820 S 0.000 0.097 0:10.78 systemd Of course once things get thrashing I can read none of this. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Anton Aylward <opensuse@antonaylward.com> [02-27-18 10:39]:
On 27/02/18 08:54 AM, Patrick Shanahan wrote:
how do you know that ff is not releasing its memory? do before stopping ff: free -m and again after stopping ff. does it show more unused memory?
"I'm sorry Dave, I can't do that".
When I hit this condition the disk light is on hard, not flickering. The mouse doesn't respond.
I hot-key to VT f1 and after a couple of minutes - yes, I wait that long - it comes up and there is the login prompt.
I enter "r" and wait a couple of seconds for that to echo back on the screen. Similarly with o-o-t I then wait and wait and wait for the password prompt. It doesn't come. After about 5 minutes there is a message saying that the prompt timed out after 60 seconds.
well, when you have control of your keyboard/system, look at "top" and check RES for ff. and do that every so many minutes until ff "hangs" your system, or just leave am xterm window open with top running and see what it displays for ff "RES" when it hangs.
Some days, about one in five or six occurrences, I can log in. The first thing I type is "w" and I see a load factor on the 30s or 40s. That comes up after three or four minutes. Running 'swapon -s' shows that the swap partition is about 60% full. I can go and make coffee between entering that response and coming back to wait for a response. Trying to run anything with a larger footprint like 'top' or 'htop' is impractical.
Normal running, FF started but no extra open/close: # free -m total used free shared buffers cached Mem: 3807 3360 447 81 42 408 -/+ buffers/cache: 2908 898 Swap: 5720 352 5368
I *EXPECT* memory to be nearly completely used; this is late model virtual memory; it is going to try and completely use memory to maximise the working sets so as to minimise paging.
It is DATA that is the issue.
The top lines from 'top' read
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2420 anton 20 0 4785708 1.893g 59320 S 7.309 50.92 1:09.87 firefox
2326 anton 20 0 3589600 78276 23852 S 0.664 2.008 2:35.19 plasmashell
2346 anton 20 0 658728 31144 19600 S 0.664 0.799 0:59.08 konsole
2406 anton 20 0 3199192 658020 69748 S 0.332 16.88 26:09.83 thunderbird-bin
6132 root 20 0 22128 2788 2140 R 0.332 0.072 0:00.20 top
1 root 20 0 38128 3776 1820 S 0.000 0.097 0:10.78 systemd
Of course once things get thrashing I can read none of this.
you can if you already have an xterm displaying top I have: top - 11:36:46 up 1 day, 20:52, 27 users, load average: 0.49, 0.42, 0.48 Tasks: 458 total, 5 running, 314 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.8 us, 1.2 sy, 0.1 ni, 94.9 id, 0.0 wa, 0.0 hi, 0.0 si, %0.0 st KiB Mem : 37057620 total, 2362784 free, 6402376 used, 28292460 %buff/cache KiB Swap: 0 total, 0 free, 0 used. 31167976 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 24485 paka 20 0 3655864 1.047g 298684 S 7.921 2.964 11:57.13 firefox 24152 paka 20 0 3314080 129984 90284 R 5.281 0.351 6:30.33 kwin_x11 24160 paka 20 0 4904060 456672 172956 S 3.960 1.232 5:21.43 plasmashell free -m total used free shared buff/cache available Mem: 36189 6640 1926 508 27622 30049 Swap: 0 0 0 no swap and a little more memory 10 ff windows with 66 tabs and the system was build 2010 -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/27/2018 04:37 PM, Anton Aylward wrote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2420 anton 20 0 4785708 1.893g 59320 S 7.309 50.92 1:09.87 firefox
That's quite huge. I also have a *lot* FF tabs open (maybe ~100?), and much less RSS memory used by FF, so I guess it depends on what pages you have open, and what addons are loaded. If the system only has 4G of memory, then I'd try limiting the memory FF can take, e.g. with ulimit or prlimit. Maybe FF then behaves a bit better ... or at least doesn't cause the system to thrashing. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2018-02-27 at 23:39 +0100, Bernhard Voelker wrote:
On 02/27/2018 04:37 PM, Anton Aylward wrote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2420 anton 20 0 4785708 1.893g 59320 S 7.309 50.92 1:09.87 firefox
That's quite huge. I also have a *lot* FF tabs open (maybe ~100?), and much less RSS memory used by FF, so I guess it depends on what pages you have open, and what addons are loaded.
That's not huge :-) . Mine is: top - 12:16:47 up 2 days, 46 min, 1 user, load average: 3,87, 3,47, 2,45 Tasks: 515 total, 1 running, 513 sleeping, 0 stopped, 1 zombie %Cpu(s): 16,1 us, 7,3 sy, 0,0 ni, 61,4 id, 14,5 wa, 0,0 hi, 0,7 si, 0,0 st KiB Mem: 8174604 total, 8045760 used, 128844 free, 603864 buffers KiB Swap: 25165820 total, 2799464 used, 22366356 free. 3603792 cached Mem PID USER PR NI VIRT RES SHR SWAP S %CPU %MEM TIME+ COMMAND 8001 cer 20 0 10,774g 1,737g 163896 633868 S 15,84 22,28 114:35.66 firefox 7627 cer 20 0 3030452 901812 69168 58108 S 6,601 11,03 24:35.09 thunderbird-bin 10291 cer 20 0 2412332 371104 41900 71052 S 2,310 4,540 10:53.39 firefox Notice that I added a column for "swap". The important figure is "RES": it is similar for both, but I have 8GB of ram, so the end result is better. And swap is in SSD, that does make a huge difference. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqWkOMACgkQtTMYHG2NR9VKBwCfbhEopgxr8WgkKh8C5Jn5Ghtc UwIAmwUOphXp05LrzklI9BgCAoxpUeJ7 =Jr1y -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op dinsdag 27 februari 2018 13:39:28 CET schreef Daniel Bauer:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping.
How can I get rid of all that memory that firefox has "eaten" without rebooting?
Thanks for hints!
Daniel
(*) This happens when I open and close many windows. Concrete: I am looking thru an archive of a tumblr blog and click on the thumbs, which opens new windows. Then maybe I do something in that new window (for example reblog or like) or just close it again and go on in the archive. Sometimes I go thru that archive for many years, thus many scrolls down.
I guess, firefox keeps all in memory what I've looked at, and so of course it fills up memory. I would have thought, that this gets freed when I close all firefox instances, but no. So then I thought it should get free at least when I log out and in again, but no.
So, to get back may system to normal working speed I need to reboot. Like every two hours... I'd love to have a better solution...
Any extensions involved? If so, all valid for your current FF version? Does this happen for a newly created user, same tabs open? -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team Linux user #548252 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2/27/18 6:39 AM, Daniel Bauer wrote:
Hello,
firefox sometimes fills my memory (*) and then the system begins to swap and slows down. So I closed all firefox windows - no change. I logged out and in again - no change.
I did swapoff -a, and then swapon -a and this freed swap, but still memory is almost full, so it would soon again start swapping.
How can I get rid of all that memory that firefox has "eaten" without rebooting?
Thanks for hints!
Daniel
(*) This happens when I open and close many windows. Concrete: I am looking thru an archive of a tumblr blog and click on the thumbs, which opens new windows. Then maybe I do something in that new window (for example reblog or like) or just close it again and go on in the archive. Sometimes I go thru that archive for many years, thus many scrolls down.
I guess, firefox keeps all in memory what I've looked at, and so of course it fills up memory. I would have thought, that this gets freed when I close all firefox instances, but no. So then I thought it should get free at least when I log out and in again, but no.
So, to get back may system to normal working speed I need to reboot. Like every two hours... I'd love to have a better solution...
Firefox Quantum (58.x.x) does a much better job with memory management, usage, and releasing it. And it is really fast. Maybe it will work its way into Leap soon. Jim F -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (9)
-
Anton Aylward
-
Bernhard Voelker
-
Carlos E. R.
-
Daniel Bauer
-
Jim Flanagan
-
Knurpht - Gertjan Lettink ten
-
Patrick Shanahan
-
Per Jessen
-
Peter Suetterlin