was killed: out of swap space - HUH?

so I was typing along in geny working on a script, while I was running it in the term to check it, then went back to geany. It was gone! :eek:

I just reopened it and went on working on it again. then aftrer I finished my script I added it to the start up for xfce, logged out, to login again to run the script then I seen this in the terminal.

Code:
swap_pager_getswapspace(20): failed
swap_pager_getswapspace(32): failed
swap_pager_getswapspace(20): failed
swap_pager_getswapspace(32): failed
swap_pager_getswapspace(20): failed
swap_pager_getswapspace(32): failed
swap_pager_getswapspace(32): failed
pid 1776 (firefox), uid 1000, was killed: out of swap space
pid 88916 (firefox), uid 1000, was killed: out of swap space
pid 88293 (firefox), uid 1000, was killed: out of swap space
pid 88011 (firefox), uid 1000, was killed: out of swap space
pid 18752 (geany), uid 1000, was killed: out of swap space

I checked my swap I got 4GB's it is only using 24MB .
I got 8GB RAM.

I seen this
it says to add a swapfile? why I got plenty of swap partition, and I do not even know if that is a real fix. a strange fix that would be. I am perplexed as what else to put on this issue.
 
Something got out of control; probably those 4 Firefox processes. And the system started its killing spree. I'm not saying for sure Firefox is the culprit here but it's a very good candidate. It has become such a beast in the past couple of years, but I think 8GB should be sufficient. Do you have many extension? Perhaps Facebook constantly updating? Is it up to date (maybe it's got a memory leak)?

I checked my swap I got 4GB's it is only using 24MB .
That was after logging out of Xfce? Well then, after logging out a DE and after having killed all those processes, the system must have freed most of the swap as well as a lot of memory.
 
Firefox can be a bit of a pig.
Firefox only requests memory. It does not control how much it receives and if the operating system gives it too much that is not Firefox's fault. In addition, Firefox will request more available memory when it helps improve performance because...it's available memory...but it returns it quickly.
 
Firefox only requests memory. It does not control how much it receives and if the operating system gives it too much that is not Firefox's fault. In addition, Firefox will request more available memory when it helps improve performance because...it's available memory...but it returns it quickly.
Does this also mean FreeBSD sucks at memory management?
 
Firefox only requests memory. It does not control how much it receives and if the operating system gives it too much that is not Firefox's fault.
That's not how it works. If an application requests a certain amount of memory, the operating system will give it exactly that much memory, no more, no less (except for small pieces that may be required for alignment or management purposes).

I agree with qpw928 – Firefox doesn't exactly try hard not to waste memory. When I open the same number of tabs with the same websites in Firefox, Chrome and Opera (fresh installs without extensions), Firefox takes the largest amount of memory (looking at the RSS, not at the virtual size). Installing extensions makes things even worse.
 
olli@ Well, yes, that is what I'm saying. The application, Firefox, requests the memory and the operating system gives it but the operating system will not give it memory it does not have to give.
 
The first error is swap_pager_getswapspace(20): failed
The pager was requested to aquire 20 pages (should be 80kB), and that failed.
The question is not what firefox might do nor might not do. The question is: why did that fail?
I might suppose there could be something wrong with the swap device.
 
The first error is swap_pager_getswapspace(20): failed
The pager was requested to aquire 20 pages (should be 80kB), and that failed.
The question is not what firefox might do nor might not do. The question is: why did that fail?
Well, it failed because swap was full. 4 GB isn't really that much. If some dynamic website gets out of control, Firefox can grow to considerable size.

Apart from adding more swap space, the OP could try to configure process limits (see limits(1)) or resource limits (see rctl(8)).
Also, make sure that the sysctls vm.overcommit and vm.swap_idle_enabled are both set to 0 (should be the default).
 
Back
Top