Page scan daemon

Posted on 2005-04-21
Last Modified: 2013-12-27
On Solaris, what criteria needs to be met inorder for the page scan rate to increase. And when it does increase, if the the number of 'page outs' (from vmstat -s) does not rise, does this mean that the page scanner daemon is not finding any candidates (pages) to kick out.  
I have a box running with a pagescan rate of 2000 during the online day, yet the number of page outs does not even make double figures.
Question by:wasfg01
    LVL 5

    Accepted Solution

    Hi there,

    The scan rate is the 'sr' column in vmstat.  If the scan rate is consistently high it is an indication of a memory problem.  However, it is not definitive.

    Servers with large amounts of physical memory can have big scan rates even though there is little swapping going on.  The reason for this is that Solaris will assign physical memory to swap.  Why? Because the OS will reserve swap for all processes in case the memory is needed for a new process.  Now, seeing as physical memory is a lot faster than disk it makes sense to swap to physical memory if possible.

    The concept is a little strange I know but I got this from a Sun engineer.  You can tell yourself by looking at the swap usage when the scan rate is high by doing a 'swap -l'.

    Don't trust 'top' to tell you how much physical disk is being used as swap.  The difference between the level reported by 'top' and 'swap -l' is how much physical memory is used as swap.

    If you like, run something like this to force pages out of physical memory:

    mkfile 2g /tmp/test-io

    Hope this helps,

    Regards, Nisus
    LVL 10

    Assisted Solution

    Take a look here:

    and here:

    and here:

    This will give you some information on the kernel parameters the impact:

    - fsflush
    - Paging
    - Swap

    LVL 10

    Assisted Solution

    hey ninsus... don't you have 2 gig's of memory spare ? :-))

    Just fooling :)

    A quick note on the concept of "memory cached swap" (as I've seen quite some discussion on this in the sun-internal info-pages): The main idea is that if physical memory is getting a little short , then of course paging starts to happen. Now when this paging happens, there will be quite a few pages that are sent out to disk and just a short while later paged in again. A few pages however stay paged-out.

    By taking part of physical ram to "cache" those pages still in memory of course the paging-process starts earlier, but only then this is only "in-memory-paging". Those pages that are not used for quite a while are then sent to the disk while the others can still be kept in ram. Now it's a question of proability if it's faster to do this or don't do this, bust tests have proven, that most often it's worth doing it (especially on multiprocessor-machines, as the swapping-out can be handled by a differnet processor).

    Author Comment

    OK (head is starting to hurt now) In summary then, on my box, (8.3Gb of PM) with a low page out rate (vmstat -s) means there is very little that is moving from physical memory to virtual memory (disk) which is good.
    The fact that there is page scanning would suggest that there is memory pressure, and that pressure is being relieved by virtue of the fact that there is swap space in physical memory as part of every processes allocation, which is good.
    Does there come a point when I do want to worry about the page scanning rate?
    LVL 5

    Expert Comment

    Hi again,

    What I do is keep an eye on the scan rate 'sr' column of 'vmstat 5' and if it is high (over 500 for more than a few minutes) I look at 'swap -l' to see if physical disk space is being used.

    I have written a couple of simple scripts and installed MRTG to graph the scan rate and I/O performance.  Throughout the day I can tell if a machine is in trouble by looking at the pretty pictures.

    As an aside: I recommend that you mirror swap if you are not already doing it.

    Regards, Nisus

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. Please see for the updated article. It is avail…
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now