More page outs than page ins?

More page outs than page ins?

Post by Rive » Tue, 14 Jan 2003 19:54:39



Hi,

Would anyone be kind enough to explain to me why systems usually have
more page-outs than page-ins? It has got me stumped for quite some
time. I would think that if 100mb is paged out from memory to disk,
then similarly 100mb should be paged-in back from disk to physical
memory?

Or is my understand of paging-in and paging-out wrong? i.e Page-outs
occur when a page is pushed from main memory to the paging space due
to a variety of reasons (lack of physical memory being one of them)
while page-ins' occur when there is free physical memory and these
pages are pushed back from disk back to the physical memory.

TIA!

 
 
 

More page outs than page ins?

Post by Mark Taylo » Tue, 14 Jan 2003 22:01:18


If the kernel takes a page fault and the resulting page is on paging
space.. then you will get a page in....

lrud (on the mp kernel) scans pages and markes them as candidates to
page out (to filesystem or paging space depending on the page type
"working/computational or file/persistient") based on the LRUD (least
recently used) algorythm.  it starts to do this when the number of pages
on the free list drops below minfree until it reaches maxfree.

so, if lrud marks a page for a candidate and then pages it out it will
only be paged back in if the kernel requires it...

if the kernel does not need it back in, then it will stay on paging
space until the process that it belongs to exits/dies or is killed or
the system shuts down.

Hope this helps
Mark

--
Posted via http://dbforums.com

 
 
 

More page outs than page ins?

Post by theycallmet » Wed, 15 Jan 2003 11:47:01


Not the whole truth.

If using vmstat to look at the pi, po:

po:
Incremented for each page written out by the virtual memory manager.
The count is incremented for page outs to page space AND FOR PAGE OUTS
TO FILE SPACE. Along with the page in statistic, this represents the
total amount of real I/O initiated by the virtual memory manager.

You will only page in working storage NOT persistant storage as the
vmstat output shows.  So, you can 'page out' without ever 'paging in'.
 Look at your fr column.  Are you freeing a lot pers pages from your
memory?  You may want to look at the vmtune command.

 
 
 

More page outs than page ins?

Post by Rive » Wed, 15 Jan 2003 19:29:01


Sorry but I am taking this in only from a theorethical point of view
as I do not have a system on hand with me, but I would like to
understand, and hope someone can explain to me,

1) why is the norm to have more page-outs than page-ins?

2) if my definition of page-outs' and page-ins' is right?

3) when there is high page-ins and high page-outs, that equals to
swapping (of whole processes) which is normally a bad thing?

Thanks in Advance!

 
 
 

More page outs than page ins?

Post by Mark Taylo » Wed, 15 Jan 2003 19:56:37


Quote:>> Not the whole truth.
>> You will only page in working storage NOT persistant
>>storage as the vmstat output shows.

But topas does... vmstat does not show persistient paging
unless you use vmstat -s

Quote:>>po:
>>Incremented for each page written out by the virtual >>memory manager.
>>The count is incremented for page outs >>to page space AND FOR PAGE
>>OUTS TO FILE SPACE. >>Along with the page in statistic, this
>>represents the total >>amount of real I/O initiated by the virtual
>>memory >>manager.

Not sure what docs you are looking at but "po" is pages out to paging
space.. the text you have cut and pasted above is for "page outs"
from the vmstat -s command.. and is not "po"... "po" is "paging space
page outs"

Cheers
Mark

--
Posted via http://dbforums.com

 
 
 

More page outs than page ins?

Post by Holger van Kol » Thu, 16 Jan 2003 01:16:55


in some cases a page has to be paged out to make room for a new page to
be CREATED. this will give a page-out but not a page-in
 
 
 

More page outs than page ins?

Post by Steve Johns » Thu, 16 Jan 2003 03:27:30



> Sorry but I am taking this in only from a theorethical point of view
> as I do not have a system on hand with me, but I would like to
> understand, and hope someone can explain to me,

> 1) why is the norm to have more page-outs than page-ins?

> 2) if my definition of page-outs' and page-ins' is right?

> 3) when there is high page-ins and high page-outs, that equals to
> swapping (of whole processes) which is normally a bad thing?

> Thanks in Advance!

It is true that the norm is for page-outs to always be greater than
page-in,
remember a page-out does not mean that the page is removed from
memory.
So you may page-in pages of memory and as work is done pages of memory
may get updated or changed. Every 60 secs. the syncd runs and flushes
all changed pages
of memory back to disk, but the page of memory is not removed. So now
you have a
page-out without a page-in. The second way to have a page-out without
a page-in is that a page of memory may be paged-out to paging space
and never again needed
so no page-in.

hope this helps

 
 
 

More page outs than page ins?

Post by Jose Pina Coelh » Sat, 18 Jan 2003 10:48:57



> Not sure what docs you are looking at but "po" is pages out to paging
> space.. the text you have cut and pasted above is for "page outs"
> from the vmstat -s command.. and is not "po"... "po" is "paging space
> page outs"

Can also be a dirty page of a memory mapped file being flushed to the disk.

--
Doing AIX support was the most monty-pythonesque
activity available at the time.
Eagerly awaiting my thin chocolat mint.

 
 
 

1. Q: Info about paging (count of page-in/page-out)?

Is there a way to get exact information on the number of pages swapped
out and/or swapped in (as part of paging behavior caused by the
application) at any given point in an application?

I have program that does repeated traversals over a
tree/directed-graph like structure, starting with a different root
every time (although there is probably some overlap in the nodes
visited). The data structure is larger than main memory size, and so
there is obviously paging as previously-unreferenced pages are swapped
in and others are swapped out to make room for the newly-loaded pages.
What I would like to do is measure the number of page-outs and
page-ins for each iteration of my traversal so that I have a measure
of the paging activity that goes on for that iteration. Is there
something I can get from the /proc filesystem or from the page daemons
or elsewhere? (I don't necessarily care about whether the pages
paged-out belong to this application or not, just that they were
necessary due to the allocationbehavior of this application.)

I know about major page faults from getrusage, but I am not sure if
that number is precise, and also whether it includes both page-outs
and page-ins. For example, if I fault on a page that is swapped in,
and say that another page had to be swapped out to make room for the
new page, does that count as one or two major page faults?

Also, where can I find more information about the page-out mechanisms
of Linux? I would guess that page-outs (writes) are cheaper than
page-ins (reads) because they can be grouped together (page-out
several pages at a time), and may take advantage of some write
buffering (on disk?) Any information, details, etc. about paging
mechanisms will be very much appreciated.

Thanks in advance,

Sheetal
--
----------------------------------------------------------------------
Sheetal V. Kakkad           Department of Computer Sciences, UT-Austin

2. What is a "Data Storage Interrupt"?

3. KWord: page 1 in footer shows page 1 on all pages

4. PCMCIA support on 2.6/x86

5. Removing banner pages from print outs

6. Comms package

7. not printing last page of long print outs.

8. fdisk can't read /dev/hdb... help

9. page outs in Solaris 7

10. Page outs with LOTSA memory: why?

11. Unix Libraries Ins/Outs

12. how change a page size for man' output and how insert FF after every pages

13. Page Up Page Down issues