public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] swap usage creeping up
@ 2010-10-26  5:49 Iain Buchanan
  2010-10-26  6:16 ` Adam Carter
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-10-26  5:49 UTC (permalink / raw
  To: gentoo-user

Hi,

over the last week or so I've noticed unusually large swap usage.  I
usually hibernate this laptop and have uptimes up to 12 days so apps can
run for a long time.  I don't usually use any swap space (except for a
few k).

If I swapoff and swapon, the usage falls back to zero but then creeps up
again over a few days.

$ free -m
             total       used       free     shared    buffers     cached
Mem:          3040        859       2181          0         38        415
-/+ buffers/cache:        406       2634
Swap:          494        431         62

nothing unusual there, except for the swap usage itself.  'top' doesn't
show any large apps.  sorted by mem the top 4 are:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 8318 iain      20   0  494m 150m  21m S    0  5.0   1:20.67 evolution          
20424 iain      20   0  342m  77m  30m S    0  2.5   0:01.84 firefox            
 8009 root      20   0 83364  37m 6260 S    7  1.2  38:34.31 X                  
 8090 iain      20   0  159m  32m 1600 S    1  1.1   3:48.08 skype              

Hm, I just noticed Mem is in %.  % of what?  % total or % used?  Even if
it was % of total RAM that could be as much as 152Mb for evo and 76Mb
for firefox.  Not that much really.

any ideas?

thanks :)
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Chuck Norris once skewered a man with the Eiffel tower. 




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  5:49 [gentoo-user] swap usage creeping up Iain Buchanan
@ 2010-10-26  6:16 ` Adam Carter
  2010-10-26  6:57   ` Iain Buchanan
  2010-10-26  6:30 ` Fatih Tümen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 25+ messages in thread
From: Adam Carter @ 2010-10-26  6:16 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

> nothing unusual there, except for the swap usage itself.  'top' doesn't
> show any large apps.  sorted by mem the top 4 are:
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  8318 iain      20   0  494m 150m  21m S    0  5.0   1:20.67 evolution
> 20424 iain      20   0  342m  77m  30m S    0  2.5   0:01.84 firefox
>  8009 root      20   0 83364  37m 6260 S    7  1.2  38:34.31 X
>  8090 iain      20   0  159m  32m 1600 S    1  1.1   3:48.08 skype
>
> Hm, I just noticed Mem is in %.  % of what?  % total or % used?  Even if
> it was % of total RAM that could be as much as 152Mb for evo and 76Mb
> for firefox.  Not that much really.
>

Divide VIRT by its percentage, then divide RES by its percentage, when the
numbers match you know which one it is.

So it looks like its RES to me by just looking at it. Did you RTFMan page?

[-- Attachment #2: Type: text/html, Size: 1093 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  5:49 [gentoo-user] swap usage creeping up Iain Buchanan
  2010-10-26  6:16 ` Adam Carter
@ 2010-10-26  6:30 ` Fatih Tümen
  2010-10-26  7:02   ` Iain Buchanan
  2010-10-26  7:10 ` Dale
  2010-10-28 16:13 ` [gentoo-user] " James
  3 siblings, 1 reply; 25+ messages in thread
From: Fatih Tümen @ 2010-10-26  6:30 UTC (permalink / raw
  To: gentoo-user

On Tue, Oct 26, 2010 at 8:49 AM, Iain Buchanan <iaindb@netspace.net.au> wrote:
> Hi,
>
> over the last week or so I've noticed unusually large swap usage.  I
> usually hibernate this laptop and have uptimes up to 12 days so apps can
> run for a long time.  I don't usually use any swap space (except for a
> few k).
>
> If I swapoff and swapon, the usage falls back to zero but then creeps up
> again over a few days.
>
> $ free -m
>             total       used       free     shared    buffers     cached
> Mem:          3040        859       2181          0         38        415
> -/+ buffers/cache:        406       2634
> Swap:          494        431         62
>

Looking at above values 494MB does not seem to be enough for
hibernation. Do you add extra swap or close some apps before
hibernation?

If your system trying to fill up your swap while you have more than
2GB of main memory available, only thing I can think of is your
swapiness is set very high. You check and alter is as follows

$ cat /proc/sys/vm/swappiness
and
# echo N > /proc/sys/vm/swappiness

where N is a value between 0 and 100. Higher number means more
swapping. If I had 3GB of ram I would set it to something closer to 0
or even 0 if I am just gonna use it for hibernation.

> nothing unusual there, except for the swap usage itself.  'top' doesn't
> show any large apps.  sorted by mem the top 4 are:
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  8318 iain      20   0  494m 150m  21m S    0  5.0   1:20.67 evolution
> 20424 iain      20   0  342m  77m  30m S    0  2.5   0:01.84 firefox
>  8009 root      20   0 83364  37m 6260 S    7  1.2  38:34.31 X
>  8090 iain      20   0  159m  32m 1600 S    1  1.1   3:48.08 skype
>
> Hm, I just noticed Mem is in %.  % of what?  % total or % used?  Even if
> it was % of total RAM that could be as much as 152Mb for evo and 76Mb
> for firefox.  Not that much really.
>

% of total main memory excluding swap because its rather difficult to
take it into account.
3040*0.05 = 152 evolution


> any ideas?
>

You can try to view swap usage on top by pressing f then p and enter
and sort by it by F then P and enter. The values wont be very
realistic though. Alternatively you could try is to compare resident
memory usages  before and after swapoff.

Given the mem usage of your apps, total mem usage looks normal.  What
does not seem normal is that swap inclined mem usage. Seriously take a
look at your swapiness value. The default value cannot be right every
particular case.


> thanks :)
> --
> Iain Buchanan <iaindb at netspace dot net dot au>
>
> Chuck Norris once skewered a man with the Eiffel tower.
>
>
>


--
   Fatih



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  6:16 ` Adam Carter
@ 2010-10-26  6:57   ` Iain Buchanan
  0 siblings, 0 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-10-26  6:57 UTC (permalink / raw
  To: gentoo-user

On Tue, 2010-10-26 at 17:16 +1100, Adam Carter wrote:
> 
> So it looks like its RES to me by just looking at it. Did you RTFMan
> page? 

for top? no.  I should add I wasn't sorting by the RES field, even
though that's in the top listing.
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Snake: Adios-s-s, dos amigos-s-s!




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  6:30 ` Fatih Tümen
@ 2010-10-26  7:02   ` Iain Buchanan
  2010-10-26  7:18     ` Fatih Tümen
  2010-10-27 22:47     ` Iain Buchanan
  0 siblings, 2 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-10-26  7:02 UTC (permalink / raw
  To: gentoo-user

Hi,

On Tue, 2010-10-26 at 09:30 +0300, Fatih Tümen wrote:

> Looking at above values 494MB does not seem to be enough for
> hibernation. Do you add extra swap or close some apps before
> hibernation?

Tuxonice filewriter :)

$ ls -alh /suspend_file 
-rw------- 1 root root 1001M May 17 12:02 /suspend_file

> If your system trying to fill up your swap while you have more than
> 2GB of main memory available, only thing I can think of is your
> swapiness is set very high. You check and alter is as follows

has it changed in recent kernels?  I'm looking for the reason for the
change in behaviour... useful though, thanks :)

>  Seriously take a
> look at your swapiness value. The default value cannot be right every
> particular case.

it's 60.  That seems a little high based on what you told me, but I have
no reference value to compare it to from 2-3 weeks ago.

I'll set it lower and watch...

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

   Calculon: I was all of history's great acting robots: Acting Unit 0.8, 
   Thespo-mat, David Duchovny!




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  5:49 [gentoo-user] swap usage creeping up Iain Buchanan
  2010-10-26  6:16 ` Adam Carter
  2010-10-26  6:30 ` Fatih Tümen
@ 2010-10-26  7:10 ` Dale
  2010-10-28 16:13 ` [gentoo-user] " James
  3 siblings, 0 replies; 25+ messages in thread
From: Dale @ 2010-10-26  7:10 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan wrote:
> Hi,
>
> over the last week or so I've noticed unusually large swap usage.  I
> usually hibernate this laptop and have uptimes up to 12 days so apps can
> run for a long time.  I don't usually use any swap space (except for a
> few k).
>
> If I swapoff and swapon, the usage falls back to zero but then creeps up
> again over a few days.
>
> $ free -m
>               total       used       free     shared    buffers     cached
> Mem:          3040        859       2181          0         38        415
> -/+ buffers/cache:        406       2634
> Swap:          494        431         62
>
> nothing unusual there, except for the swap usage itself.  'top' doesn't
> show any large apps.  sorted by mem the top 4 are:
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>   8318 iain      20   0  494m 150m  21m S    0  5.0   1:20.67 evolution
> 20424 iain      20   0  342m  77m  30m S    0  2.5   0:01.84 firefox
>   8009 root      20   0 83364  37m 6260 S    7  1.2  38:34.31 X
>   8090 iain      20   0  159m  32m 1600 S    1  1.1   3:48.08 skype
>
> Hm, I just noticed Mem is in %.  % of what?  % total or % used?  Even if
> it was % of total RAM that could be as much as 152Mb for evo and 76Mb
> for firefox.  Not that much really.
>
> any ideas?
>
> thanks :)
>    


I ran into this a while back and noticed that a setting got changed and 
I didn't know about it.   Still no idea what changed it but you can 
check the setting with this:

root@smoker / # cat /proc/sys/vm/swappiness
20
root@smoker / #

The lower the number, the less often it will use swap.  I have swap on 
some slow drives and 2Gbs of ram so I don't want swap used unless it 
will keep me from crashing.  You can use echo to change the setting and 
I actually added this to rc.conf to set it at bootup:

echo 20 > /proc/sys/vm/swappiness

May not be the problem but worth checking into at least.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  7:02   ` Iain Buchanan
@ 2010-10-26  7:18     ` Fatih Tümen
  2010-10-27 22:47     ` Iain Buchanan
  1 sibling, 0 replies; 25+ messages in thread
From: Fatih Tümen @ 2010-10-26  7:18 UTC (permalink / raw
  To: gentoo-user

On Tue, Oct 26, 2010 at 10:02 AM, Iain Buchanan <iaindb@netspace.net.au> wrote:
> On Tue, 2010-10-26 at 09:30 +0300, Fatih Tümen wrote:
>
>> Looking at above values 494MB does not seem to be enough for
>> hibernation. Do you add extra swap or close some apps before
>> hibernation?
>
> Tuxonice filewriter :)
>
> $ ls -alh /suspend_file
> -rw------- 1 root root 1001M May 17 12:02 /suspend_file

Ah, hadn't thought of that, thanks.

--
   Fatih



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-26  7:02   ` Iain Buchanan
  2010-10-26  7:18     ` Fatih Tümen
@ 2010-10-27 22:47     ` Iain Buchanan
  2010-10-27 23:44       ` Neil Bothwick
  1 sibling, 1 reply; 25+ messages in thread
From: Iain Buchanan @ 2010-10-27 22:47 UTC (permalink / raw
  To: gentoo-user

On Tue, 2010-10-26 at 16:32 +0930, Iain Buchanan wrote:

> >  Seriously take a
> > look at your swapiness value. The default value cannot be right every
> > particular case.
> 
> it's 60.  That seems a little high based on what you told me, but I have
> no reference value to compare it to from 2-3 weeks ago.

well, in the last few days I haven't seen any swap usage at all, which
is how the system used to run!

Strange how the swappiness changed so dramatically in recent kernels.

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

I can't die until the government finds a safe place to bury my liver.
		-- Phil Harris




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-27 22:47     ` Iain Buchanan
@ 2010-10-27 23:44       ` Neil Bothwick
  2010-10-27 23:59         ` Dale
  0 siblings, 1 reply; 25+ messages in thread
From: Neil Bothwick @ 2010-10-27 23:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

On Thu, 28 Oct 2010 08:17:30 +0930, Iain Buchanan wrote:

> > it's 60.  That seems a little high based on what you told me, but I
> > have no reference value to compare it to from 2-3 weeks ago.  
> 
> well, in the last few days I haven't seen any swap usage at all, which
> is how the system used to run!
> 
> Strange how the swappiness changed so dramatically in recent kernels.

I wondered the same when I checked and saw that my computers were using
60 too. But when I googled about it I found references to a default of 60
from over a year ago.


-- 
Neil Bothwick

Despite the cost of living it remains popular.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-27 23:44       ` Neil Bothwick
@ 2010-10-27 23:59         ` Dale
  2010-10-28  1:12           ` Adam Carter
  0 siblings, 1 reply; 25+ messages in thread
From: Dale @ 2010-10-27 23:59 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> On Thu, 28 Oct 2010 08:17:30 +0930, Iain Buchanan wrote:
>
>    
>>> it's 60.  That seems a little high based on what you told me, but I
>>> have no reference value to compare it to from 2-3 weeks ago.
>>>        
>> well, in the last few days I haven't seen any swap usage at all, which
>> is how the system used to run!
>>
>> Strange how the swappiness changed so dramatically in recent kernels.
>>      
> I wondered the same when I checked and saw that my computers were using
> 60 too. But when I googled about it I found references to a default of 60
> from over a year ago.
>
>    

That was about the time mine got changed.  I always wondered how that 
got changed.  Since I added it to rc.conf, that should keep it from 
getting changed again.  May want to do the same on yours too.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-27 23:59         ` Dale
@ 2010-10-28  1:12           ` Adam Carter
  2010-10-28  3:56             ` Dale
  0 siblings, 1 reply; 25+ messages in thread
From: Adam Carter @ 2010-10-28  1:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

On Thu, Oct 28, 2010 at 10:59 AM, Dale <rdalek1967@gmail.com> wrote:

>
> That was about the time mine got changed.  I always wondered how that got
> changed.  Since I added it to rc.conf, that should keep it from getting
> changed again.  May want to do the same on yours too.
>
>
Usually you put stuff like that in /etc/sysctl.conf. IIRC the key is
vm.swappiness.

[-- Attachment #2: Type: text/html, Size: 717 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-28  1:12           ` Adam Carter
@ 2010-10-28  3:56             ` Dale
  2010-10-28  4:34               ` Adam Carter
  0 siblings, 1 reply; 25+ messages in thread
From: Dale @ 2010-10-28  3:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Adam Carter wrote:
>
> On Thu, Oct 28, 2010 at 10:59 AM, Dale <rdalek1967@gmail.com 
> <mailto:rdalek1967@gmail.com>> wrote:
>
>
>     That was about the time mine got changed.  I always wondered how
>     that got changed.  Since I added it to rc.conf, that should keep
>     it from getting changed again.  May want to do the same on yours too.
>
>
> Usually you put stuff like that in /etc/sysctl.conf. IIRC the key is 
> vm.swappiness.


Looking at the man page, I would think you are correct but I don't see a 
example on that setting.  I'll have to google for it I guess.

Putting it in rc.conf does work tho.  I also used to have to adjust my 
fan divisor settings and I did that in rc.conf as well.

Dale

:-)  :-)

[-- Attachment #2: Type: text/html, Size: 1487 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-28  3:56             ` Dale
@ 2010-10-28  4:34               ` Adam Carter
  2010-10-28  6:32                 ` Dale
  0 siblings, 1 reply; 25+ messages in thread
From: Adam Carter @ 2010-10-28  4:34 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

> Usually you put stuff like that in /etc/sysctl.conf. IIRC the key is
> vm.swappiness.
>
>
>
> Looking at the man page, I would think you are correct but I don't see a
> example on that setting.  I'll have to google for it I guess.
>
> Putting it in rc.conf does work tho.  I also used to have to adjust my fan
> divisor settings and I did that in rc.conf as well.
>
>

IIRC you're using "echo 10 > /proc/sys/vm/swappiness". If it were me if
would use vm.swappiness=10 in sysctl since in this case the control option
is available, then fall back to /etc/conf.d/local.start for "echo 10 >" type
stuff if there was no sysctl option.

[-- Attachment #2: Type: text/html, Size: 1180 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-28  4:34               ` Adam Carter
@ 2010-10-28  6:32                 ` Dale
  2010-11-05  6:45                   ` Iain Buchanan
  0 siblings, 1 reply; 25+ messages in thread
From: Dale @ 2010-10-28  6:32 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

Adam Carter wrote:
>
>>     Usually you put stuff like that in /etc/sysctl.conf. IIRC the key
>>     is vm.swappiness.
>
>
>     Looking at the man page, I would think you are correct but I don't
>     see a example on that setting.  I'll have to google for it I guess.
>
>     Putting it in rc.conf does work tho.  I also used to have to
>     adjust my fan divisor settings and I did that in rc.conf as well.
>
>
> IIRC you're using "echo 10 > /proc/sys/vm/swappiness". If it were me 
> if would use vm.swappiness=10 in sysctl since in this case the control 
> option is available, then fall back to /etc/conf.d/local.start for 
> "echo 10 >" type stuff if there was no sysctl option.
>
>
>

I googled and found this:

http://www.brunolinux.com/06-Fine_Tuning_Your_System/Swappiness.html

Then I added "vm.swappiness=20" to the sysctl.conf file.  I'll check to 
make sure it holds that setting when I reboot, whenever that is.  I see 
no reason why it shouldn't tho since that is the proper place to set it.

So you recall correctly.  :-)

Dale

:-)  :-)

[-- Attachment #2: Type: text/html, Size: 2045 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [gentoo-user] Re: swap usage creeping up
  2010-10-26  5:49 [gentoo-user] swap usage creeping up Iain Buchanan
                   ` (2 preceding siblings ...)
  2010-10-26  7:10 ` Dale
@ 2010-10-28 16:13 ` James
  2010-10-28 23:26   ` Iain Buchanan
  3 siblings, 1 reply; 25+ messages in thread
From: James @ 2010-10-28 16:13 UTC (permalink / raw
  To: gentoo-user

Iain Buchanan <iaindb <at> netspace.net.au> writes:

> over the last week or so I've noticed unusually large swap usage.  I
> usually hibernate this laptop and have uptimes up to 12 days so apps can
> run for a long time.  

Hello Iain,

From a hardware guy; If you really need hibernate, use it.
No laptop was designed to stay powered on continuously
despite the features in software and hardware. The system will
collect more dust internally than if powered up and down. Heat
is EVIL on electronics no matter what you do. Power consumption
minimization (at this point in time) is still quite young
and there are all kinds of non published issues with all
sorts of memory and chips. Fans do not have the mtbf rates
any where near what the published times are for processors.

I could go on and on, but you get the point....

If you need hibernate, use it. If you do not, your hardware
will last longer being powered down. Don't just hibernate or 
allow other users to do it, just because they are lazy. Several 
efforts are bearing fruit for fast (parallel) boot these days.....


hth,
James





^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] Re: swap usage creeping up
  2010-10-28 16:13 ` [gentoo-user] " James
@ 2010-10-28 23:26   ` Iain Buchanan
  0 siblings, 0 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-10-28 23:26 UTC (permalink / raw
  To: gentoo-user

On Thu, 2010-10-28 at 16:13 +0000, James wrote:

> Hello Iain,

hey :)

> >From a hardware guy; If you really need hibernate, use it.
> No laptop was designed to stay powered on continuously
> despite the features in software and hardware.
[snip]
> If you need hibernate, use it. If you do not, your hardware
> will last longer being powered down.
[snip]

er, hibernate IS powering down.  S3 powers off everything (Disks, CPU,
fans) but leaves a minimal amount of power to the solid-state
no-moveable-parts RAM.  S4 writes a bunch of stuff to disks and then
powers down just like a normal shut down (S5).  You can even take out
the battery (I even stripped an old laptop, removed the cpu, disks, heat
pipes, fans, and put it all back together on S4 and then resumed).  S4
can leave some bios function and power for WOL and other devices, but
it's not essential.

In fact S5 which every modern ATX computer does STILL leaves power to
USB, WOL, modems & keyboards, if required.

So when I say 12 day uptimes, this is calculated by the kernel since I
last rebooted, not since I last hibernated.  I'm not actually running
the laptop for 12 days continuously.  Although, IMHO, there's no
difference to a laptop or desktop in this regard.

Push it to the limits I say ;)
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

serendipity, n.:
	The process by which human knowledge is advanced.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-10-28  6:32                 ` Dale
@ 2010-11-05  6:45                   ` Iain Buchanan
  2010-11-05 13:48                     ` [gentoo-user] " walt
  2010-11-09 21:24                     ` [gentoo-user] " Fatih Tümen
  0 siblings, 2 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-11-05  6:45 UTC (permalink / raw
  To: gentoo-user

OK so vm.swappiness seemed to help a bit but today I notice that swap
usage is up again.  It's firefox:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
14072 iain      20   0 1369m 897m  15m S    3 29.5 113:14.91 firefox            

I think that's 1.3Gb + 900Mb... sounds like a memory leak to me.

Anyone else run firefox for 113+ hours?  I'm using 3.6.9-r1.

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Politicians speak for their parties, and parties never are, never have
been, and never will be wrong.
		-- Walter Dwight




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [gentoo-user] Re: swap usage creeping up
  2010-11-05  6:45                   ` Iain Buchanan
@ 2010-11-05 13:48                     ` walt
  2010-11-09 21:24                     ` [gentoo-user] " Fatih Tümen
  1 sibling, 0 replies; 25+ messages in thread
From: walt @ 2010-11-05 13:48 UTC (permalink / raw
  To: gentoo-user

On 11/04/2010 11:45 PM, Iain Buchanan wrote:
> OK so vm.swappiness seemed to help a bit but today I notice that swap
> usage is up again.  It's firefox:
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 14072 iain      20   0 1369m 897m  15m S    3 29.5 113:14.91 firefox
>
> I think that's 1.3Gb + 900Mb... sounds like a memory leak to me.
>
> Anyone else run firefox for 113+ hours?  I'm using 3.6.9-r1.

firefox is up to 3.6.12 now, with several important bug fixes, so I'd
suggest updating it.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-05  6:45                   ` Iain Buchanan
  2010-11-05 13:48                     ` [gentoo-user] " walt
@ 2010-11-09 21:24                     ` Fatih Tümen
  2010-11-15  5:09                       ` Iain Buchanan
  1 sibling, 1 reply; 25+ messages in thread
From: Fatih Tümen @ 2010-11-09 21:24 UTC (permalink / raw
  To: gentoo-user

On Fri, Nov 5, 2010 at 08:45, Iain Buchanan <iaindb@netspace.net.au> wrote:
> OK so vm.swappiness seemed to help a bit but today I notice that swap
> usage is up again.  It's firefox:
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 14072 iain      20   0 1369m 897m  15m S    3 29.5 113:14.91 firefox
>
> I think that's 1.3Gb + 900Mb... sounds like a memory leak to me.
>
> Anyone else run firefox for 113+ hours?  I'm using 3.6.9-r1.
>

1.3G is the grant total of Res and Swap.  You need to read man top
before judging not-entirely-accurate values reported by top.

900M is resident on your main memory. '113+ hours' is not a decent
information to draw conclusion from. Running firefox for 113+ hours
with a single tab on a text-only website is not same as running dozens
of tabs with dozens of multimedia/embedded objects.

You say swap usage was up again but dont give data about it. 472M is
what top would report in the above case but it is an unrealictic
values as it is uncompressed size. output of cat /proc/swaps or free
is what one needs to see.

Also make sure that you put the swapiness value which you say worked
for you in /etc/sysctl.conf.

--
   Fatih



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-09 21:24                     ` [gentoo-user] " Fatih Tümen
@ 2010-11-15  5:09                       ` Iain Buchanan
  2010-11-15  8:41                         ` Fatih Tümen
  0 siblings, 1 reply; 25+ messages in thread
From: Iain Buchanan @ 2010-11-15  5:09 UTC (permalink / raw
  To: gentoo-user

On Tue, 2010-11-09 at 23:24 +0200, Fatih Tümen wrote: 
> On Fri, Nov 5, 2010 at 08:45, Iain Buchanan <iaindb@netspace.net.au> wrote:
> > OK so vm.swappiness seemed to help a bit but today I notice that swap
> > usage is up again.  It's firefox:
> >
> >  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> > 14072 iain      20   0 1369m 897m  15m S    3 29.5 113:14.91 firefox
> >
> > I think that's 1.3Gb + 900Mb... sounds like a memory leak to me.
> >
> > Anyone else run firefox for 113+ hours?  I'm using 3.6.9-r1.
> >
> 
> 1.3G is the grant total of Res and Swap.  You need to read man top
> before judging not-entirely-accurate values reported by top.

judging? I only said "I think"!

sure, top has it's quirks, but it's ok for comparing against itself.

> 900M is resident on your main memory. '113+ hours' is not a decent
> information to draw conclusion from. Running firefox for 113+ hours
> with a single tab on a text-only website is not same as running dozens
> of tabs with dozens of multimedia/embedded objects.

sure, but running it for 10 or 100 or 1000 hours should produce roughly
the same characteristics for the same browsing behaviour if all other
things are equal.  A few months ago this didn't cause any issues at all,
now I'm seeing high swap usage.  I usually never use my 3G of physical
RAM.

Again today I see it is using about 900Mb in total, which seems quite
large.  vm.swappiness is set to 0.  I've upgraded firefox to 3.6.12.

I had to reboot, but I'll check the usual statistics next time I see it.

-- 
Iain Buchanan <iaindb@netspace.net.au>





^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-15  5:09                       ` Iain Buchanan
@ 2010-11-15  8:41                         ` Fatih Tümen
  2010-11-15 14:14                           ` Iain Buchanan
  0 siblings, 1 reply; 25+ messages in thread
From: Fatih Tümen @ 2010-11-15  8:41 UTC (permalink / raw
  To: gentoo-user

On Mon, Nov 15, 2010 at 07:09, Iain Buchanan <iaindb@netspace.net.au> wrote:
> On Tue, 2010-11-09 at 23:24 +0200, Fatih Tümen wrote:
>> On Fri, Nov 5, 2010 at 08:45, Iain Buchanan <iaindb@netspace.net.au> wrote:
>> > OK so vm.swappiness seemed to help a bit but today I notice that swap
>> > usage is up again.  It's firefox:
>> >
>> >  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>> > 14072 iain      20   0 1369m 897m  15m S    3 29.5 113:14.91 firefox
>> >
>> > I think that's 1.3Gb + 900Mb... sounds like a memory leak to me.
>> >
>> > Anyone else run firefox for 113+ hours?  I'm using 3.6.9-r1.
>> >
>>
>> 1.3G is the grant total of Res and Swap.  You need to read man top
>> before judging not-entirely-accurate values reported by top.
>
> judging? I only said "I think"!
>
> sure, top has it's quirks, but it's ok for comparing against itself.
>
>> 900M is resident on your main memory. '113+ hours' is not a decent
>> information to draw conclusion from. Running firefox for 113+ hours
>> with a single tab on a text-only website is not same as running dozens
>> of tabs with dozens of multimedia/embedded objects.
>
> sure, but running it for 10 or 100 or 1000 hours should produce roughly
> the same characteristics for the same browsing behaviour if all other
> things are equal.  A few months ago this didn't cause any issues at all,
> now I'm seeing high swap usage.  I usually never use my 3G of physical
> RAM.
>

Can you recall what significant change have you made to the system?
For emerged packages you can try smth like genlop --list --date 1
month ago and then check against the versions upgraded from.

> Again today I see it is using about 900Mb in total, which seems quite
> large.  vm.swappiness is set to 0.  I've upgraded firefox to 3.6.12.
>
> I had to reboot, but I'll check the usual statistics next time I see it.
>

You say swappiness is set to 0 but dont give any swap usage info. If
there is any swap usage while swapiness is 0 then it would be weird
and we could blame it on the kernel.

I just googled mem usage firefox as I am running out of ideas. It seem
like you are not the only one complaining about this. Take a look at
these top results. There are some tweaking advice, see it they work
for you.
http://kb.mozillazine.org/Memory_Leak
http://support.mozilla.com/en-US/kb/high+memory+usage

Chromium, which I have been happily using for almost a year now, has a
task manager which shows mem usage of every extension and tab. If
firefox has switched to multiprocessing, which was a feature plan some
time ago, similar tool should likely be available for firefox as well.

--
   Fatih



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-15  8:41                         ` Fatih Tümen
@ 2010-11-15 14:14                           ` Iain Buchanan
  2010-11-15 15:26                             ` Fatih Tümen
  0 siblings, 1 reply; 25+ messages in thread
From: Iain Buchanan @ 2010-11-15 14:14 UTC (permalink / raw
  To: gentoo-user

On Mon, 2010-11-15 at 10:41 +0200, Fatih Tümen wrote:
> On Mon, Nov 15, 2010 at 07:09, Iain Buchanan <iaindb@netspace.net.au> wrote:

> > sure, but running it for 10 or 100 or 1000 hours should produce roughly
> > the same characteristics for the same browsing behaviour if all other
> > things are equal.  A few months ago this didn't cause any issues at all,
> > now I'm seeing high swap usage.  I usually never use my 3G of physical
> > RAM.
> >
> 
> Can you recall what significant change have you made to the system?
> For emerged packages you can try smth like genlop --list --date 1
> month ago and then check against the versions upgraded from.

sure, only EVERYthing has been updated... including firefox and the
kernel!

> > Again today I see it is using about 900Mb in total, which seems quite
> > large.  vm.swappiness is set to 0.  I've upgraded firefox to 3.6.12.
> >
> > I had to reboot, but I'll check the usual statistics next time I see it.
> >
> 
> You say swappiness is set to 0 but dont give any swap usage info.

that's cause I had to reboot and swap was back to 0.

>  If
> there is any swap usage while swapiness is 0 then it would be weird
> and we could blame it on the kernel.

_any_ swap usage?  right now I'm using 110Mb of swap with 1.8Gb free
physical RAM and vm.swapiness is 0!

$ free -m
             total       used       free     shared    buffers     cached
Mem:          3040       1206       1834          0         61        246
-/+ buffers/cache:        898       2142
Swap:          494        110        383


$ cat /proc/sys/vm/swappiness
0

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 3192 iain      20   0  554m 204m  27m S    9  6.7  26:31.94 firefox            


> I just googled mem usage firefox as I am running out of ideas.

but thanks for the suggestions anyway :)  I'll keep googling!

-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Allen's Axiom:
	When all else fails, read the instructions.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-15 14:14                           ` Iain Buchanan
@ 2010-11-15 15:26                             ` Fatih Tümen
  2010-11-15 23:43                               ` Dale
  0 siblings, 1 reply; 25+ messages in thread
From: Fatih Tümen @ 2010-11-15 15:26 UTC (permalink / raw
  To: gentoo-user

Okay I am getting suspicious of tuxonice. Setting swappiness to zero
does not mean kernel wont use any swap but it should not be prefering
swap over ram when 2G of ram is out there either.

Just out of curiosity, can you find out which app(s) being swapped ?

I would give a try to gentoo-sources and see if the issue can be reproduced.

On 15/11/2010, Iain Buchanan <iaindb@netspace.net.au> wrote:
> On Mon, 2010-11-15 at 10:41 +0200, Fatih Tümen wrote:
>> On Mon, Nov 15, 2010 at 07:09, Iain Buchanan <iaindb@netspace.net.au>
>> wrote:
>
>> > sure, but running it for 10 or 100 or 1000 hours should produce roughly
>> > the same characteristics for the same browsing behaviour if all other
>> > things are equal.  A few months ago this didn't cause any issues at all,
>> > now I'm seeing high swap usage.  I usually never use my 3G of physical
>> > RAM.
>> >
>>
>> Can you recall what significant change have you made to the system?
>> For emerged packages you can try smth like genlop --list --date 1
>> month ago and then check against the versions upgraded from.
>
> sure, only EVERYthing has been updated... including firefox and the
> kernel!
>
>> > Again today I see it is using about 900Mb in total, which seems quite
>> > large.  vm.swappiness is set to 0.  I've upgraded firefox to 3.6.12.
>> >
>> > I had to reboot, but I'll check the usual statistics next time I see it.
>> >
>>
>> You say swappiness is set to 0 but dont give any swap usage info.
>
> that's cause I had to reboot and swap was back to 0.
>
>>  If
>> there is any swap usage while swapiness is 0 then it would be weird
>> and we could blame it on the kernel.
>
> _any_ swap usage?  right now I'm using 110Mb of swap with 1.8Gb free
> physical RAM and vm.swapiness is 0!
>
> $ free -m
>              total       used       free     shared    buffers     cached
> Mem:          3040       1206       1834          0         61        246
> -/+ buffers/cache:        898       2142
> Swap:          494        110        383
>
>
> $ cat /proc/sys/vm/swappiness
> 0
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
>  3192 iain      20   0  554m 204m  27m S    9  6.7  26:31.94 firefox
>
>
>
>> I just googled mem usage firefox as I am running out of ideas.
>
> but thanks for the suggestions anyway :)  I'll keep googling!
>
> --
> Iain Buchanan <iaindb at netspace dot net dot au>
>
> Allen's Axiom:
> 	When all else fails, read the instructions.
>
>
>

-- 
Sent from my mobile device

--
  Fatih



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-15 15:26                             ` Fatih Tümen
@ 2010-11-15 23:43                               ` Dale
  2010-11-16  1:17                                 ` Iain Buchanan
  0 siblings, 1 reply; 25+ messages in thread
From: Dale @ 2010-11-15 23:43 UTC (permalink / raw
  To: gentoo-user

Fatih Tümen wrote:
> Okay I am getting suspicious of tuxonice. Setting swappiness to zero
> does not mean kernel wont use any swap but it should not be prefering
> swap over ram when 2G of ram is out there either.
>
> Just out of curiosity, can you find out which app(s) being swapped ?
>
> I would give a try to gentoo-sources and see if the issue can be reproduced.
>
>    

I agree.  If swappiness is set to 0, it should not use swap unless it is 
to prevent the system from crashing.  I set mine to 30 and I have 2Gbs 
of ram.  The only time it uses any swap at all is when I am compiling 
OOo or maybe, just maybe, gcc.  Other than that, it is using pretty much 
all the ram because I have a couple hundred picture files open or 
something.  It is rare that I use swap even with it set to 30.  I can't 
see much of any reason it should when set at 0 except to prevent crashing.

There seems to be something fishy on the OP's system.  I'm not sure what 
but it is not working as it should.  I use gentoo-sources here.  2.6.35 
at the moment.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [gentoo-user] swap usage creeping up
  2010-11-15 23:43                               ` Dale
@ 2010-11-16  1:17                                 ` Iain Buchanan
  0 siblings, 0 replies; 25+ messages in thread
From: Iain Buchanan @ 2010-11-16  1:17 UTC (permalink / raw
  To: gentoo-user

On Mon, 2010-11-15 at 17:43 -0600, Dale wrote:
> Fatih Tümen wrote:
> > Okay I am getting suspicious of tuxonice.

hm, maybe it was tuxonice, maybe it was 2.6.35, maybe it was the moon?

I've just upgraded to 2.6.36 tuxonice and hence had to unmask
nvidia-drivers 260.19.06.  Changing windows and virtual desktops is now
back to it's snappy old self...  Let's hope I see some change in swap
usage too.

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

If it's too good to be true, it's probably a rigged demo.




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-11-16  1:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26  5:49 [gentoo-user] swap usage creeping up Iain Buchanan
2010-10-26  6:16 ` Adam Carter
2010-10-26  6:57   ` Iain Buchanan
2010-10-26  6:30 ` Fatih Tümen
2010-10-26  7:02   ` Iain Buchanan
2010-10-26  7:18     ` Fatih Tümen
2010-10-27 22:47     ` Iain Buchanan
2010-10-27 23:44       ` Neil Bothwick
2010-10-27 23:59         ` Dale
2010-10-28  1:12           ` Adam Carter
2010-10-28  3:56             ` Dale
2010-10-28  4:34               ` Adam Carter
2010-10-28  6:32                 ` Dale
2010-11-05  6:45                   ` Iain Buchanan
2010-11-05 13:48                     ` [gentoo-user] " walt
2010-11-09 21:24                     ` [gentoo-user] " Fatih Tümen
2010-11-15  5:09                       ` Iain Buchanan
2010-11-15  8:41                         ` Fatih Tümen
2010-11-15 14:14                           ` Iain Buchanan
2010-11-15 15:26                             ` Fatih Tümen
2010-11-15 23:43                               ` Dale
2010-11-16  1:17                                 ` Iain Buchanan
2010-10-26  7:10 ` Dale
2010-10-28 16:13 ` [gentoo-user] " James
2010-10-28 23:26   ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox