All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bill J.Xu" <xujz@neusoft.com>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: chuck gelm net <chuck@gelm.net>, linux-admin@vger.kernel.org
Subject: Re: a swap partition utilization question
Date: Wed, 26 Nov 2003 21:02:45 +0800	[thread overview]
Message-ID: <002301c3b41d$960fb950$2a02010a@avwindows> (raw)
In-Reply-To: 16324.40312.496661.615314@cerise.nosuchdomain.co.uk

Hi, Clements:

Thank you for your detailed explains first.

I use the linux box as a firewall, so it is highly loaded at any time.At most time, it's available physical RAM is less 2M, but SWAP partition is never used. This 
make me confused.



Bill


----- Original Message ----- 
From: "Glynn Clements" <glynn.clements@virgin.net>
To: "Bill J.Xu" <xujz@neusoft.com>
Cc: "chuck gelm net" <chuck@gelm.net>; <linux-admin@vger.kernel.org>
Sent: Wednesday, November 26, 2003 8:32 PM
Subject: Re: a swap partition utilization question


> 
> Bill J.Xu wrote:
> 
> > > > After booting my linux box,I add a swap partition using "swapon
> > > > /dev/hda5".but I found that swap partition was nerver used even
> > > > 2M physics memory left.
> > > > 
> > > > why?
> > > 
> > >  Perhaps swap memory will not be used until
> > > all physical memory has been consumed.
> > 
> > But I found that other linux box had used swap partition when many
> > physical RAM left.
> > 
> > root@FW_knl:/home/shiy# free
> >              total       used       free     shared    buffers     cached
> > Mem:        255320     247564       7756          0      15652     197560
> > -/+ buffers/cache:      34352     220968
> > Swap:       996020       1484     994536
> > root@FW_knl:/home/shiy# 
> 
> How long has the first box been up? And how intensive is memory demand
> on that box?
> 
> Swap won't be used at all until physical memory becomes close to being
> exhausted. However, after that point, even if more memory becomes
> available, data won't be moved back into RAM unless it is actually
> used.
> 
> There is often some data which will never be used again (e.g. memory
> which is used by persistent daemons, but only during the
> initialisation; the 6 getty processes running on tty1-tty6 which
> typically never get used on a system which is running X, etc). Such
> data is a strong candidate for being swapped out; once that happens,
> it will typically never be swapped in again.
> 
> So, when a system is booted, there will always be a period when no
> swap is used. If memory demand is low, that period may last
> indefinitely. OTOH, once memory demand has been sufficiently high to
> have required the use of swap, swap usage will probably never drop
> back to zero.
> 
> -- 
> Glynn Clements <glynn.clements@virgin.net>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2003-11-26 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25  6:09 a swap partition utilization question Bill J.Xu
2003-11-25 20:51 ` chuck gelm net
2003-11-25 21:41   ` Darío Mariani
2003-11-25 21:46     ` Michael French
2003-11-27  4:31     ` rich+ml
2003-11-26  4:52   ` Bill J.Xu
2003-11-26 12:32     ` Glynn Clements
2003-11-26 13:02       ` Bill J.Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002301c3b41d$960fb950$2a02010a@avwindows' \
    --to=xujz@neusoft.com \
    --cc=chuck@gelm.net \
    --cc=glynn.clements@virgin.net \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.