public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: My System doesn't use swap!
  2005-01-31 11:49 My System doesn't use swap! Matthias-Christian Ott
@ 2005-01-31 10:57 ` Michael Buesch
  2005-01-31 12:44   ` Matthias-Christian Ott
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2005-01-31 10:57 UTC (permalink / raw)
  To: Matthias-Christian Ott; +Cc: Linux Kernel Mailing List

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

Quoting Matthias-Christian Ott <matthias.christian@tiscali.de>:
> Hi!
> I have mysterious Problem:
> 90 % of my Ram are used (340 MB), but 0 Byte of my Swap (2GB) is used 
> and about about 150 MB are swappable.
> 
> [matthias-christian@iceowl ~]$ free
>              total       used       free     shared    buffers     cached
> Mem:        383868     362176      21692          0         12     208956
> -/+ buffers/cache:     153208     230660
                                    ^^^^^^
You have ~230M of 380M free.
Nothing mysterious here.

> Swap:      2097136          0    2097136
> 
> [matthias-christian@iceowl ~]$ cat /kernel-2.6.10-rc2-ott/config
> [..]
> CONFIG_SWAP=y
> [..]
> CONFIG_X86_BSWAP=y
> [..]
> 
> [matthias-christian@iceowl ~]$ dmesg
> [..]
> Adding 2097136k swap on /dev/discs/disc0/part2.  Priority:-1 extents:1
> [..]
> 
> Matthias-Christian Ott
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

-- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* My System doesn't use swap!
@ 2005-01-31 11:49 Matthias-Christian Ott
  2005-01-31 10:57 ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias-Christian Ott @ 2005-01-31 11:49 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi!
I have mysterious Problem:
90 % of my Ram are used (340 MB), but 0 Byte of my Swap (2GB) is used 
and about about 150 MB are swappable.

[matthias-christian@iceowl ~]$ free
             total       used       free     shared    buffers     cached
Mem:        383868     362176      21692          0         12     208956
-/+ buffers/cache:     153208     230660
Swap:      2097136          0    2097136

[matthias-christian@iceowl ~]$ cat /kernel-2.6.10-rc2-ott/config
[..]
CONFIG_SWAP=y
[..]
CONFIG_X86_BSWAP=y
[..]

[matthias-christian@iceowl ~]$ dmesg
[..]
Adding 2097136k swap on /dev/discs/disc0/part2.  Priority:-1 extents:1
[..]

Matthias-Christian Ott



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

* Re: My System doesn't use swap!
  2005-01-31 12:44   ` Matthias-Christian Ott
@ 2005-01-31 11:50     ` Benno
  2005-01-31 22:59       ` Rahul Karnik
  2005-01-31 12:32     ` Mark Watts
  2005-01-31 20:29     ` Kyle Moffett
  2 siblings, 1 reply; 9+ messages in thread
From: Benno @ 2005-01-31 11:50 UTC (permalink / raw)
  To: Matthias-Christian Ott; +Cc: Linux Kernel Mailing List

On Mon Jan 31, 2005 at 13:44:04 +0100, Matthias-Christian Ott wrote:
>Michael Buesch wrote:
>
>>Quoting Matthias-Christian Ott <matthias.christian@tiscali.de>:
>> 
>>
>>>Hi!
>>>I have mysterious Problem:
>>>90 % of my Ram are used (340 MB), but 0 Byte of my Swap (2GB) is used 
>>>and about about 150 MB are swappable.
>>>
>>>[matthias-christian@iceowl ~]$ free
>>>            total       used       free     shared    buffers     cached
>>>Mem:        383868     362176      21692          0         12     208956
>>>-/+ buffers/cache:     153208     230660
>>>   
>>>
>>                                   ^^^^^^
>>You have ~230M of 380M free.
>>Nothing mysterious here.
>>
>>
>Ok maybe I wasn't able to read the /free/ output correctly, but why is 
>no swap used (more than 60% ram are used)?

Why would you want to use swap when you still have free RAM? The kernel
isn't using swap because there is no need to.

Benno

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

* Re: My System doesn't use swap!
  2005-01-31 12:44   ` Matthias-Christian Ott
  2005-01-31 11:50     ` Benno
@ 2005-01-31 12:32     ` Mark Watts
  2005-01-31 20:29     ` Kyle Moffett
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Watts @ 2005-01-31 12:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthias-Christian Ott, Michael Buesch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Michael Buesch wrote:
> >Quoting Matthias-Christian Ott <matthias.christian@tiscali.de>:
> >>Hi!
> >>I have mysterious Problem:
> >>90 % of my Ram are used (340 MB), but 0 Byte of my Swap (2GB) is used
> >>and about about 150 MB are swappable.
> >>
> >>[matthias-christian@iceowl ~]$ free
> >>             total       used       free     shared    buffers     cached
> >>Mem:        383868     362176      21692          0         12     208956
> >>-/+ buffers/cache:     153208     230660

Note that ~200MB are being used for disk caching.
If your system need to allocate more ram, the disk cache will reduce before 
swap is used.

Mark.

- -- 
Mark Watts
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services group
GPG Public Key ID: 455420ED

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB/iVyBn4EFUVUIO0RAmRBAJ46Vk2Z69/i+bMrj1gbSF8obHgEkgCgw8iU
NgRDBYk+YoiRuWZZ2gFT8NE=
=R02H
-----END PGP SIGNATURE-----

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

* Re: My System doesn't use swap!
  2005-01-31 10:57 ` Michael Buesch
@ 2005-01-31 12:44   ` Matthias-Christian Ott
  2005-01-31 11:50     ` Benno
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Matthias-Christian Ott @ 2005-01-31 12:44 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Linux Kernel Mailing List

Michael Buesch wrote:

>Quoting Matthias-Christian Ott <matthias.christian@tiscali.de>:
>  
>
>>Hi!
>>I have mysterious Problem:
>>90 % of my Ram are used (340 MB), but 0 Byte of my Swap (2GB) is used 
>>and about about 150 MB are swappable.
>>
>>[matthias-christian@iceowl ~]$ free
>>             total       used       free     shared    buffers     cached
>>Mem:        383868     362176      21692          0         12     208956
>>-/+ buffers/cache:     153208     230660
>>    
>>
>                                    ^^^^^^
>You have ~230M of 380M free.
>Nothing mysterious here.
>
>  
>
>>Swap:      2097136          0    2097136
>>
>>[matthias-christian@iceowl ~]$ cat /kernel-2.6.10-rc2-ott/config
>>[..]
>>CONFIG_SWAP=y
>>[..]
>>CONFIG_X86_BSWAP=y
>>[..]
>>
>>[matthias-christian@iceowl ~]$ dmesg
>>[..]
>>Adding 2097136k swap on /dev/discs/disc0/part2.  Priority:-1 extents:1
>>[..]
>>
>>Matthias-Christian Ott
>>
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>Please read the FAQ at  http://www.tux.org/lkml/
>>
>>
>>    
>>
>
>  
>
Ok maybe I wasn't able to read the /free/ output correctly, but why is 
no swap used (more than 60% ram are used)?

Matthias-Christian Ott

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

* Re: My System doesn't use swap!
  2005-01-31 12:44   ` Matthias-Christian Ott
  2005-01-31 11:50     ` Benno
  2005-01-31 12:32     ` Mark Watts
@ 2005-01-31 20:29     ` Kyle Moffett
  2005-02-01 15:50       ` Bill Davidsen
  2 siblings, 1 reply; 9+ messages in thread
From: Kyle Moffett @ 2005-01-31 20:29 UTC (permalink / raw)
  To: Matthias-Christian Ott; +Cc: Michael Buesch, Linux Kernel Mailing List

On Jan 31, 2005, at 07:44, Matthias-Christian Ott wrote:
> Ok maybe I wasn't able to read the /free/ output correctly, but why is 
> no
> swap used (more than 60% ram are used)?

Swap is orders of magnitude slower than RAM. Why put things there if you
still have RAM left?  The kernel only puts things in swap when it has no
more RAM _and_ has already deleted big chunks of its disk cache.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r  
!y?(-)
------END GEEK CODE BLOCK------



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

* Re: My System doesn't use swap!
  2005-01-31 11:50     ` Benno
@ 2005-01-31 22:59       ` Rahul Karnik
  0 siblings, 0 replies; 9+ messages in thread
From: Rahul Karnik @ 2005-01-31 22:59 UTC (permalink / raw)
  To: Benno; +Cc: Matthias-Christian Ott, Linux Kernel Mailing List

On Mon, 31 Jan 2005 22:50:35 +1100, Benno <benjl@cse.unsw.edu.au> wrote:
> On Mon Jan 31, 2005 at 13:44:04 +0100, Matthias-Christian Ott wrote:
> >Ok maybe I wasn't able to read the /free/ output correctly, but why is
> >no swap used (more than 60% ram are used)?
> 
> Why would you want to use swap when you still have free RAM? The kernel
> isn't using swap because there is no need to.

2004 common VM thread: Why is my swap being used, I still have free RAM?
2005 common VM thread: Why is my swap not being used, I only have some free RAM?

Guess Linux is getting something right -- we can't please anyone!!!

-Rahul

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

* Re: My System doesn't use swap!
  2005-01-31 20:29     ` Kyle Moffett
@ 2005-02-01 15:50       ` Bill Davidsen
  2005-02-01 16:36         ` DervishD
  0 siblings, 1 reply; 9+ messages in thread
From: Bill Davidsen @ 2005-02-01 15:50 UTC (permalink / raw)
  To: Kyle Moffett
  Cc: Matthias-Christian Ott, Michael Buesch, Linux Kernel Mailing List

Kyle Moffett wrote:
> On Jan 31, 2005, at 07:44, Matthias-Christian Ott wrote:
> 
>> Ok maybe I wasn't able to read the /free/ output correctly, but why is no
>> swap used (more than 60% ram are used)?
> 
> 
> Swap is orders of magnitude slower than RAM. Why put things there if you
> still have RAM left?  The kernel only puts things in swap when it has no
> more RAM _and_ has already deleted big chunks of its disk cache.

Unless he just booted, I would expect at least a little use of the swap, 
something like this, on a machine with 1GB RAM and not much happening. 
It's burning in with setiathome, and I played a few mp3s, and it seemed 
to feel the need for swap. I see similar on a box with 4GB, it never 
comes close to low memory, but still uses a few MB swap.

pixels:davidsen> free
              total       used       free     shared    buffers    cached
Mem:       1035228     996712      38516          0     175100    67932
-/+ buffers/cache:     553680     481548
Swap:      2048248      11292    2036956
pixels:davidsen> uname -rn
pixels.tmr.com 2.6.10-ac2


Not that this is a bad thing, but I'm surprised at no swap used at all.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

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

* Re: My System doesn't use swap!
  2005-02-01 15:50       ` Bill Davidsen
@ 2005-02-01 16:36         ` DervishD
  0 siblings, 0 replies; 9+ messages in thread
From: DervishD @ 2005-02-01 16:36 UTC (permalink / raw)
  To: Bill Davidsen
  Cc: Kyle Moffett, Matthias-Christian Ott, Michael Buesch,
	Linux Kernel Mailing List

    Hi Bill :)

 * Bill Davidsen <davidsen@tmr.com> dixit:
> >Swap is orders of magnitude slower than RAM. Why put things there if you
> >still have RAM left?  The kernel only puts things in swap when it has no
> >more RAM _and_ has already deleted big chunks of its disk cache.
> Unless he just booted, I would expect at least a little use of the swap, 
> something like this, on a machine with 1GB RAM and not much happening. 

    I have 2.4.29 running and uptime is about 24 hours now, and with
1Gig of RAM and a loadavg in the last 15 minutes has been 4, more or
less, and I have 130 megs of free memory and none of my 512 megs swap
is used. And this is very common for me. The only way of using swap
is starting X, mozilla (some pre-firefox version will do) and one of
the many memory leaking apps available for the X Window System. On
console, with the apps I run usually (that includes setiathome too,
and heavy use of the C compiler) I don't hit swap. This is my memory
status right now:

         total:     used:     free:  shared: buffers:   cached:
Mem:  927006720 796491776 130514944        0  5517312 738082816
Swap: 536862720         0 536862720
MemTotal:       905280 kB
MemFree:        127456 kB
MemShared:           0 kB
Buffers:          5388 kB
Cached:         720784 kB
SwapCached:          0 kB
Active:           7096 kB
Inactive:       719092 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       905280 kB
LowFree:        127456 kB
SwapTotal:      524280 kB
SwapFree:       524280 kB

    Pretty low usage, and still more than 700MB of cached memory
available to avoid using swap.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...

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

end of thread, other threads:[~2005-02-01 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 11:49 My System doesn't use swap! Matthias-Christian Ott
2005-01-31 10:57 ` Michael Buesch
2005-01-31 12:44   ` Matthias-Christian Ott
2005-01-31 11:50     ` Benno
2005-01-31 22:59       ` Rahul Karnik
2005-01-31 12:32     ` Mark Watts
2005-01-31 20:29     ` Kyle Moffett
2005-02-01 15:50       ` Bill Davidsen
2005-02-01 16:36         ` DervishD

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