Re: More on O_STREAMING (goodby read pauses)

From: Mark Mielke (mark@mark.mielke.cc)
Date: Thu Oct 10 2002 - 21:04:49 EST


On Fri, Oct 11, 2002 at 12:50:52AM +0200, J.A. Magallon wrote:
> On 2002.10.10 Mark Mielke wrote:
> >I don't think this is right. Prove me wrong by explaining how kswapd works,
> >but if a page isn't dirty, there is no need to write it out to disk.
> You suppose it is a page of code ? What about data that programs malloc() ???
> You can also send data memory to swap. If you do not write it on disk,
> how do you recover it ???

Unless you are telling me that you have 1Gb of dirty pages in your
swap, it doesn't matter. The majority of the pages are not dirty, and
they are only in use because the 1Gb+ file was read from front to
back.

> >Clean read-only pages should *never* be written to swap. They can be re-read
> >from their source.
> That is your fault, <read-only>. Pages maped read-only are those from
> binary executables or shared libraries, but, again, what about data ?

I shouldn't have said read only. The real qualifier is the 'clean' adjective.

It doesn't matter if a page is read-write or read-only, if the page
came directly from disk, and no modifications have been made to the
page, the page can safely be turfed and should _never_ be written to
swap.

> >I _think_ what you are seeing is that kswapd is not cleaning pages out
> >fast enough, which means that *other* tasks executing need to have their
> >*swapped out* pages *read* from disk. I.e. the churning you hear is probably
> >mostly reads - not writes.
> I look at gnome system monitor graph for mem. I start with a tiny amount of
> used memory. Start the 1Gb read without O_STREAM, the blue area in monitor
> starts to grow linearly in time, stars (*) from the reader appear at a
> given rate, and as soon as it touches the top limit the stars stop, the disk
> begins to thrash, and swap space used grows. After a 2-4 seconds, the stars
> go again with the same rate. Tell me what is this but swapper writing pages,
> and reading the new pages for my giga.
> With O_STREAM, the 'blue bar' does not move from its place, and star rate
> (ie, read rate from disk), stays uniform.

It sounds like your kernel is broken.

mark

-- 
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...

http://mark.mielke.cc/

- 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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:40 EST