2001-11-19 00:47:09

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: swap?

What about a tux-only system?

should I disable swap?

--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.


2001-11-19 02:12:59

by Ivanovich

[permalink] [raw]
Subject: can max. cache size be selected?

I ask this because lowering the max. cache size could solve the problem that
some people have with too much memory going to swap and, in consequence,
making some apps unresponsive for a time

If max. cache size could be selected people who don't use much disk or just
need to work with a lot of apps at the same time (desktop?) could reduce it
to get better response when switching to inactive tasks who could have went
to swap to grow the cache...

am i wrong with my logic?
is this possible?

2001-11-19 09:14:29

by Eric W. Biederman

[permalink] [raw]
Subject: Re: can max. cache size be selected?

Ivanovich <[email protected]> writes:

> I ask this because lowering the max. cache size could solve the problem that
> some people have with too much memory going to swap and, in consequence,
> making some apps unresponsive for a time
>
> If max. cache size could be selected people who don't use much disk or just
> need to work with a lot of apps at the same time (desktop?) could reduce it
> to get better response when switching to inactive tasks who could have went
> to swap to grow the cache...
>
> am i wrong with my logic?

Linux is currently optimized for programs actually getting things done. So
idle processes are penalized. Getting fast responses from idle when the
system is under other kinds of load is an interesting problem. A simple
limit on cache size really does not address the problem, and truly penalizes
cases when things are getting done.

The only simple solution I can think of attacking swap clustering to make it
more efficient. In that case it may be possible to bring all data back from
swap in a single I/O transaction for a process. Which should be quiet
efficient both when the processes is swapped out and when it is being
swapped in.

> is this possible?

You have the source.

Eric

2001-11-19 13:43:26

by James A Sutherland

[permalink] [raw]
Subject: Re: swap?

On Monday 19 November 2001 12:46 am, Roy Sigurd Karlsbakk wrote:
> What about a tux-only system?
>
> should I disable swap?

No, probably not. Having some swapspace (or, to keep the .nl pedant happy,
"pagespace") available will allow the kernel to migrate unused pages to disk,
making more room available for caching of your WWW site's content. Being part
of the kernel, Tux's code will all be locked in memory anyway; the rest of
free RAM will be used for caching content.


James.

2001-11-19 13:58:17

by Remco Post

[permalink] [raw]
Subject: Re: swap?

> On Monday 19 November 2001 12:46 am, Roy Sigurd Karlsbakk wrote:
> > What about a tux-only system?
> >
> > should I disable swap?
>
> No, probably not. Having some swapspace (or, to keep the .nl pedant happy,
> "pagespace") available will allow the kernel to migrate unused pages to disk,
> making more room available for caching of your WWW site's content. Being part
> of the kernel, Tux's code will all be locked in memory anyway; the rest of
> free RAM will be used for caching content.
>
>
> James.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

On a tux only system, you'll have very little data that is not on a
filesystem. Since all other applications running (you'll wind up with at least
20 or so processes like syslogd...) are very small, and those will use very
little data-pages, you'll probably see no benefit from having a swappartition.
Having enough RAM to be used as a buffer-cache seems more usefull. Unused
code-pages of userland apps will be discarded anyway. Leaving you with more
memory to be used as a buffer-cache.

--
Met vriendelijke groeten,

Remco Post

SARA - Stichting Academisch Rekencentrum Amsterdam
High Performance Computing Tel. +31 20 592 8008 Fax. +31 20 668 3167

"I really didn't foresee the Internet. But then, neither did the computer
industry. Not that that tells us very much of course - the computer industry
didn't even foresee that the century was going to end." -- Douglas Adams


2001-11-19 14:23:22

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Re: swap?

> > > What about a tux-only system?
> > > should I disable swap?
>
> On a tux only system, you'll have very little data that is not on a
> filesystem. Since all other applications running (you'll wind up with at least
> 20 or so processes like syslogd...) are very small, and those will use very
> little data-pages, you'll probably see no benefit from having a swappartition.
> Having enough RAM to be used as a buffer-cache seems more usefull. Unused
> code-pages of userland apps will be discarded anyway. Leaving you with more
> memory to be used as a buffer-cache.

What could be the overhead of using swap?
--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.