- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What REALLY is PAGEOUT on vmstat command outpu...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 09:24 AM
тАО06-15-2009 09:24 AM
The po column should normally be 0. The pi column should have some numbers in it, but should not be high.
Ok. I can see numbers on the vmstat command. But I do NOT see the real meanings behind these terms. Supposedly when a process starts, disk data gets "paged into memory". When it is done, it gets "paged out" back to disk. This infers that "paging in" means reading disk, and "paging out" means writing to disk. But "page ins" do not equal "page outs". There are hardly any page outs. Does this mean the memory hardly ever writes back to disk? I find that hard to believe. But why did vmstat call it page out? Why does the term "page out" mean write back to disk?
So this leads me to ask......
What do these pi, po terms REALLY mean for the vmstat command?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 09:50 AM
тАО06-15-2009 09:50 AM
SolutionSo usually a program might request some data. It will check memory, it the data is there it will read it into the cpu registers and do it's thing. If not it will page fault and bring the pages it need into memory. It will then work with those pages. (That is a shortened version of what happens.)
When programs need more memory than what is actually physically available is when you will start paging out. You have to free up some memory in order to read new pages in. So the memory manager basically decides what can be paged to disk temporarily so that new pages can be read into memory. Later the pages will be read back into memory when they are needed again.
>> Does this mean the memory hardly ever writes back to disk?
I think you are confusing memory management with system writes to disk. They are not the same thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:04 AM
тАО06-15-2009 10:04 AM
Re: What REALLY is PAGEOUT on vmstat command output
Paging in is the anticipation or prefetching of address and does not count as a problem.
Paging out is unanticipated and counts as an error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:29 AM
тАО06-15-2009 10:29 AM
Re: What REALLY is PAGEOUT on vmstat command output
What do these pi, po terms REALLY mean for the vmstat command?
It means processes are being paged in or out of swap.
Higher numbers are bad and indicate a performance problem.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 10:39 AM
тАО06-15-2009 10:39 AM
Re: What REALLY is PAGEOUT on vmstat command output
http://docs.hp.com/en/5965-4641/ch01s10.html?btnNext=next%A0%BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 11:11 AM
тАО06-15-2009 11:11 AM
Re: What REALLY is PAGEOUT on vmstat command output
You have a restaurant with a slightly goofy head waiter. Everyone that is showing up for a seat is giving him a bribe. So he takes the money and seats them (no matter what). The groups of people are processes. The individual people are "pages" of memory. And the restaurant is the memory of the computer.
A party comes in. A Mr. Process, party of five. Mr Process asks for a table, the waiter finds a table with 5 chairs and lets him in.
A little later on, the restaurant is full. Now a Mr. VIP comes in with a request for just two. The waiter knows there are no free chairs but goes in search of some way to satisfy Mr. VIP.
He finds a young couple that is talking romantic over dessert.
Waiter: "HIT THE ROAD."
Romantic couple: "But we are in the middle of our dessert!"
Waiter: "OK. We have a little stall in the kitchen we use to hold onto people's unfinished food. It is called Kitchen-A-la-SWAPSPACE." He whisks the couple to kitchen with their desserts.
He then quickly leads Mr. VIP to the newly acquired table.
This Mr. VIP is one process, with 2 pages, and it is a page in.
But the young couple that got kicked into the kitchen is a page out. Am I Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 11:56 AM
тАО06-15-2009 11:56 AM
Re: What REALLY is PAGEOUT on vmstat command output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 07:02 PM
тАО06-15-2009 07:02 PM
Re: What REALLY is PAGEOUT on vmstat command output
No, when the process is done, the data vanishes. Only when some other process needs the space, is it paged out.
>But "page ins" do not equal "page outs".
Naturally. You could page in multiple times if only reading a page. Of course you may have to page some other process out to free space.
>Does this mean the memory hardly ever writes back to disk?
Yes. The data is read in at program start and hopefully there was no reason to ever write it back to swap, plenty of memory.
>But why did vmstat call it page out? Why does the term "page out" mean write back to disk?
It is removing the page from memory and putting it out to pasture/swap.
>Waiter: "We have a little stall in the kitchen we use to hold onto people's unfinished food. It is called Kitchen-A-la-SWAPSPACE." He whisks the couple to kitchen with their desserts.
You forgot to mention that the waiter shoots the couple with a dart gun so they go to sleep. ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 08:41 PM
тАО06-15-2009 08:41 PM
Re: What REALLY is PAGEOUT on vmstat command output
Well, in actual case, it happens when the couple fall asleep waiting for the dessert to arrive!...(meaning no action for a long time.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 12:12 AM
тАО06-16-2009 12:12 AM
Re: What REALLY is PAGEOUT on vmstat command output
Virtual Memory Activity runs the vmstat command.
vmstat provides virtual memory statistics. It provides information on the status of
processes, virtual memory, paging activity, faults, and a breakdown of the percentage of
CPU time.
In the following examples, the output was produced nine times at five-second:
intervals. The first argument to the vmstat command is the interval; the second is the
number of times you would like the output produced:
# vmstat 5 9
You certainly get a lot for your money out of the vmstat command. Here is a brief
description of the categories of information produced by vmstat.
Processes are classified into one of three categories: runnable ("r"), blocked on I/O or
short-term resources ("b"), or swapped ("w").
Next, you see information about memory. "avm" is the number of virtual memory pages
owned by processes that have run within the last 20 seconds. If this number is roughly the
size of physical memory minus your kernel, you are near forced paging. The "free" column
indicates the number of pages on the system's free list. It doesn't mean that the process is
finished running and these pages won't be accessed again; it just means that they have not
been accessed recently. I suggest that you ignore this column.
Next, is paging activity. The first field ("re") shows the pages that were reclaimed. These
pages made it to the free list but were later referenced and had to be salvaged.
Next you see the number of faults in three categories: interrupts per second, which usually
come from hardware ("in"), system calls per second ("sy"), and context switches per second
("cs").
The final output is CPU usage percentage for user ("us"), system ("sy"), and idle ("id"). The
nice processes are lumped together with user processes in this output.
If you run an I/O-intensive workload, you may indeed see a much activity in runnable
processes ("r"), blocked processes ("b"), and the runnable but swapped ("w") processes. If
you have many runnable but swapped processes, you probably have insufficient memory.
If you see a lot of waiting on I/O, you probably have an I/O bottleneck.
Addition: The po column is the most important in terms ofpaging: it indicates the number of page-outs and should ideally be very close to zero. If it isn't, processes are contending for the available memory and the system is paging. Paging activity is also reflected in significant decreases in the amount of free memory (fre) and in the number of page reclaims (re)├в memory pages taken away from one process because another one needs them even though the first process needs them too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 05:10 AM
тАО06-16-2009 05:10 AM
Re: What REALLY is PAGEOUT on vmstat command output
pi = number of pages read in from disk. VERY IMPORTANT: page in counts both page back from swap space *and* starting a program for the first time. Both are page in events. Very high page in rates (hundreds) is normal.
page out = write pages of a deactivated program to swap space. This is truly a system that is low on RAM and must make room for more processes.
> It means processes are being paged in or out of swap.
No, page in is whenever a program starts or is returned from swap. These are very different conditions but counted with the same pi counter.
> Higher numbers are bad and indicate a performance problem.
Only po matters. pi can be large on a busy system as it represents program starts. po is also confusing because it measures both paging out to swap space but also count memory-mapped file access. There is no way to tell the difference other than swap space is unused (see: swapinfo -tam) and po is greater than 0.
2 digit numbers 10-99 in po indicate a fair amount of paging and lack or RAM, but performance may be acceptable. 3 digit (100+) indicates serious memory shortage and severe degradation of the entire system. Page out affects everything, especially in a multi-processor system. when memory must be rearranged, a spinlock occurs that prevents all the other processors from making any changes to RAM and this can affect other processes.
There are exactly two fixes for high pagew out:
1. Add a lot more RAM (2-3 times more RAM).
2. Stop running so many processes at the same time.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 06:05 AM
тАО06-16-2009 06:05 AM