public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: cache limit
@ 2003-08-27 16:03 Joseph Malicki
  0 siblings, 0 replies; 37+ messages in thread
From: Joseph Malicki @ 2003-08-27 16:03 UTC (permalink / raw)
  To: William Lee Irwin III, Takao Indoh; +Cc: Mike Fedyk, linux-kernel

I was premature about the test case, but still, a process (or several) that
mmap several GB's of files and dont unmap what they don't need has caused
issues in the past.

-joe

----- Original Message ----- 
From: "Joseph Malicki" <jmalicki@starbak.net>
To: "William Lee Irwin III" <wli@holomorphy.com>; "Takao Indoh"
<indou.takao@soft.fujitsu.com>
Cc: "Mike Fedyk" <mfedyk@matchmail.com>; <linux-kernel@vger.kernel.org>
Sent: Wednesday, August 27, 2003 12:01 PM
Subject: Re: cache limit


> I've had experience with unneeded, *mapped* pages that would be ideally
> flushed oppressing needed mapped and unmapped pages.
> Test case: grep --mmap SOME_STRING_I_WONT_FIND some_multi-GB-file
>
> Sure, it's bad programming etc, but in that case, once those pages are
> mapped, they can't be forcibly unmapped even though
> in a utopian VM they would be discarded as unneeded.
>
> This could very well be the problem?
>
> -joe
>
> ----- Original Message ----- 
> From: "William Lee Irwin III" <wli@holomorphy.com>
> To: "Takao Indoh" <indou.takao@soft.fujitsu.com>
> Cc: "Mike Fedyk" <mfedyk@matchmail.com>; <linux-kernel@vger.kernel.org>
> Sent: Wednesday, August 27, 2003 5:45 AM
> Subject: Re: cache limit
>
>
> > On Wed, Aug 27, 2003 at 06:36:10PM +0900, Takao Indoh wrote:
> > > This problem happened a few month ago and the detailed data does not
> > > remain. Therefore it is difficult to know what is essential cause for
> > > this problem, but, I guessed that pagecache used as I/O cache grew
> > > gradually during system running, and finally it oppressed memory.
> >
> > But this doesn't make any sense; the only memory you could "oppress"
> > is pagecache.
> >
> >
> > On Wed, Aug 27, 2003 at 06:36:10PM +0900, Takao Indoh wrote:
> > > Besides this problem, there are many cases where increase of pagecache
> > > causes trouble, I think.
> > > For example, DBMS.
> > > DBMS caches index of DB in their process space.
> > > This index cache conflicts with the pagecache used by other
> applications,
> > > and index cache may be paged out. It cause uneven response of DBMS.
> > > In this case, limiting pagecache is effective.
> >
> > Why is it effective? You're describing pagecache vs. pagecache
> > competition and the DBMS outcompeting the cooperating applications for
> > memory to the detriment of the workload; this is a very different
> > scenario from what "limiting pagecache" sounds like.
> >
> > How do you know it would be effective? Have you written a patch to
> > limit it in some way and tried running it?
> >
> >
> > On Tue, 26 Aug 2003 02:46:34 -0700, William Lee Irwin III wrote:
> > >> One thing I thought of after the post was whether they actually had
in
> > >> mind tunable hard limits on _unmapped_ pagecache, which is, in fact,
> > >> useful. OTOH that's largely speculation and we really need them to
> > >> articulate the true nature of their problem.
> >
> > On Wed, Aug 27, 2003 at 06:36:10PM +0900, Takao Indoh wrote:
> > > I also think that is effective. Empirically, in the case where
pagecache
> > > causes memory shortage, most of pagecache is unmapped page. Of course
> > > real problem may not be pagecashe, as you or Mike said.
> >
> > How do you know most of it is unmapped?
> >
> > At any rate, the above assigns a meaningful definition to the words you
> > used; it does not necessarily have anything to do with the issue you're
> > trying to describe. If you could start from the very basics, reproduce
> > the problem, instrument the workload with top(1) and vmstat(1), and find
> > some way to describe how the performance is inadequate (e.g. performance
> > metrics for your running DBMS/whatever in MB/s or transactions/s etc.),
> > it would be much more helpful than proposing a solution up front.
> > Without any evidence, we can't know it is a solution at all, or that
> > it's the right solution.
> >
> >
> > -- wli
> > -
> > 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/
> >
>


^ permalink raw reply	[flat|nested] 37+ messages in thread
[parent not found: <000801c36cb1$454d4950$1001a8c0@etofmv650>]
[parent not found: <n7lV.2HA.19@gated-at.bofh.it>]
[parent not found: <m6Bv.3ys.1@gated-at.bofh.it>]
* cache limit
@ 2003-08-19  4:39 Anthony R.
  2003-08-19  4:57 ` Nuno Silva
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Anthony R. @ 2003-08-19  4:39 UTC (permalink / raw)
  To: linux-kernel

Hi,

I would like to tune my kernel not to use as much memory for cache
as it currently does. I have 2GB RAM, but when I am running one program
that accesses a lot of files on my disk (like rsync), that program uses
most of the cache, and other programs wind up swapping out. I'd prefer to
have just rsync run slower because less of its data is cached, rather
than have
all my other programs run more slowly. rsync is not allocating memory,
but the kernel is caching it at the expense of other programs.

With 2GB on a system, I should never page out, but I consistently do and I
need to tune the kernel to avoid that. Cache usage is around 1.4 GB!
I never had this problem with earlier kernels. I've read a lot of comments
where so-called experts poo-poo this problem, but it is real and
repeatable and I am
ready to take matters into my own hands to fix it. I am told the cache
is replaced when
another program needs more memory, so it shouldn't swap, but that is not
the
behaviour I am seeing.

Can anyone help point me in the right direction?
Do any kernel developers care about this?

My kernel is stock 2.4.21, I run Redhat 9 on a 3GHz P4. I'd give you MB
info but I've seen
this behaviour on other motherboards as well.

Thank you very much for your help.

-- tony
"Surrender to the Void." 
-- John Lennon



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

end of thread, other threads:[~2003-09-02 17:52 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <oJ5P.699.21@gated-at.bofh.it>
     [not found] ` <oJ5P.699.23@gated-at.bofh.it>
     [not found]   ` <oJ5P.699.25@gated-at.bofh.it>
     [not found]     ` <oJ5P.699.27@gated-at.bofh.it>
     [not found]       ` <oJ5P.699.19@gated-at.bofh.it>
     [not found]         ` <oQh2.4bQ.13@gated-at.bofh.it>
2003-08-26 19:08           ` cache limit Ihar 'Philips' Filipau
2003-08-26 19:23             ` Mike Fedyk
2003-08-27 10:21               ` Ihar 'Philips' Filipau
2003-08-27 11:07                 ` Nick Piggin
2003-08-27 16:03 Joseph Malicki
     [not found] <000801c36cb1$454d4950$1001a8c0@etofmv650>
2003-08-27 16:02 ` YoshiyaETO
     [not found] <n7lV.2HA.19@gated-at.bofh.it>
     [not found] ` <ofAJ.4dx.9@gated-at.bofh.it>
     [not found]   ` <ogZM.5KJ.1@gated-at.bofh.it>
     [not found]     ` <oyDw.5FP.33@gated-at.bofh.it>
2003-08-26 10:15       ` Ihar 'Philips' Filipau
2003-08-26 17:46         ` Mike Fedyk
     [not found] <m6Bv.3ys.1@gated-at.bofh.it>
     [not found] ` <mLY8.dO.5@gated-at.bofh.it>
2003-08-21  9:52   ` Ihar 'Philips' Filipau
2003-08-25  7:17     ` Takao Indoh
  -- strict thread matches above, loose matches on Subject: below --
2003-08-19  4:39 Anthony R.
2003-08-19  4:57 ` Nuno Silva
2003-08-19  5:33 ` Denis Vlasenko
2003-08-19  6:20   ` Andrew Morton
2003-08-19  9:05     ` J.A. Magallon
2003-08-19  9:16       ` Andrew Morton
2003-08-19  9:28         ` J.A. Magallon
2003-08-19  9:43           ` Andrew Morton
2003-08-19 13:32     ` Erik Andersen
2003-08-19 20:56       ` Andrew Morton
2003-08-19 14:28   ` Anthony R.
2003-08-19 18:26     ` Mike Fedyk
2003-08-19  5:42 ` Nick Piggin
2003-08-21  0:49 ` Takao Indoh
2003-08-21 23:47   ` Mike Fedyk
2003-08-25  2:45     ` Takao Indoh
2003-08-25  4:11       ` William Lee Irwin III
2003-08-25 22:58         ` Mike Fedyk
2003-08-26  9:46           ` William Lee Irwin III
2003-08-27  9:36             ` Takao Indoh
2003-08-27  9:45               ` William Lee Irwin III
2003-08-27 11:14                 ` Takao Indoh
2003-08-27 11:36                   ` William Lee Irwin III
2003-09-02 10:52                     ` Takao Indoh
2003-09-02 11:30                       ` William Lee Irwin III
2003-09-02 17:21                       ` Mike Fedyk
2003-08-27 16:01                 ` Joseph Malicki

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