Swap usage discussion

Ted Gould plug-devel@lists.PLUG.phoenix.az.us
Fri Jun 18 07:47:02 2004


--=-urU2mwH12HXt34IpAhPI
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2004-06-18 at 01:50, Jerry Davis wrote:
> Lets say for instance you had a heavily used system. And you had a binary=
=20
> being time-sliced in, and it needed memory that wasn't there at the time,=
 the=20
> least used (as far as time when used last) in theory would get swapped ou=
t to=20
> free up memory for the program needing it. If however, the code being swa=
pped=20
> out is never to be used again (i.e. it happened to be init code), what wo=
uld=20
> happen, would it stay there until the program needing it went away?

I understand what you're saying, but I think that there is an important
thing to note here.  I'm pretty sure that Linux won't swap code pages
into the swap partition, it 'swaps' them back to the local partition.=20
This because the program shouldn't have changed, so the one on disk is
just as good of a swap.  I'm not 100% sure on that one, but someone told
me that once ;)

> Just musing here

Me too.

Alan, I think probably the moral of the story here is that any model you
make of the filesystem is going to have to be amazingly complex.  You
might be better gathering some data on a live system, and then using
that.  I think that there are lots of people that can tell you what
various things do at different levels, but I'm not sure anyone really
understands: 'How does RedHat 7.3 running workload X use the swap?'  The
filesystem guys are going to say it's a daemon issue and the daemon guys
a kernel issue.

		--Ted


--=-urU2mwH12HXt34IpAhPI
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

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

iD8DBQBA0v+QLE335pRPGp0RAn48AKDkOUzT7Gt9+L1y4/ZHraQnhAhrawCfaNHW
O1k9y8yCzzVPR1RLxyEiqWY=
=hpkC
-----END PGP SIGNATURE-----

--=-urU2mwH12HXt34IpAhPI--