Operating System - HP-UX
1748284 Members
3448 Online
108761 Solutions
New Discussion юеВ

Under which kinds of circumstance will page out occur?

 
SOLVED
Go to solution
albert_hua
Frequent Advisor

Under which kinds of circumstance will page out occur?

Hi, everyone:
I know that using demand paging technology in UNIX 'page out' will occur when the system is short of memory to allocate for new processes.
But when I look in the Glance,the value of 'Page outs' is actually plus from time to time when the free memory is enough.
That's the explanation of Glance's help of 'page in/page out': "Moving pages of data from virtual memory(disk) to physical memory(page in) or vice versa(page out)."
So I am confused why the system needs to move pages to swap space to free memory even when the free memory is enough. Could someone explain the hidden cause? Thanks very much.

Al.
When going with others together, I can always find my adviser among them. (├д┬╕тА░├д┬║┬║├и┬б┼Т├е┬┐тАж├ж┼УтА░├ж╦ЖтАШ├е┬╕╦Ж├д┬╣┼╕)
8 REPLIES 8
albert_hua
Frequent Advisor

Re: Under which kinds of circumstance will page out occur?

BTW, I can not see any plus value of the item(po) in the result of 'vmstat' while the value of 'page out' in Glance is larger than zero.
What's going on? They calculate in two different ways?
When going with others together, I can always find my adviser among them. (├д┬╕тА░├д┬║┬║├и┬б┼Т├е┬┐тАж├ж┼УтА░├ж╦ЖтАШ├е┬╕╦Ж├д┬╣┼╕)
James Murtagh
Honored Contributor

Re: Under which kinds of circumstance will page out occur?

Hi Albert,

I believe this is due to user processes using memory mapped files. The mmap interface bypasses the normal buffer cache and instead uses the page cache. However, one effect of this is that the VM subsystem is responsible for writing the data back to disk, which is probably the effect you are seeing. Although this is confusing from a user's view, the kernel does not actually take into account user pageouts when determining if the system is thrashing.

I'm not sure if glance and vmstat use a different means to calculate this. I think vmstat uses pstat(), maybe Glance uses the /dev/kmem pseudo driver. I can find out if you really need to know.

If this has been fixed it will be in a later release of Glance. If you let me know which version you are on I can check from there. Also, would be useful to know what OS release you are on.

Regards,

James.
albert_hua
Frequent Advisor

Re: Under which kinds of circumstance will page out occur?

Hi,James:
Thanks a lot for your nice answer.
The version of my GlancePlus is C.02.60.00.
My OS version is HPUX 11.00.
When going with others together, I can always find my adviser among them. (├д┬╕тА░├д┬║┬║├и┬б┼Т├е┬┐тАж├ж┼УтА░├ж╦ЖтАШ├е┬╕╦Ж├д┬╣┼╕)
albert_hua
Frequent Advisor

Re: Under which kinds of circumstance will page out occur?

Hi,James:
Thanks a lot for your nice answer.
The version of my GlancePlus is C.02.60.00.
My OS version is HPUX 11.00.

Al.
When going with others together, I can always find my adviser among them. (├д┬╕тА░├д┬║┬║├и┬б┼Т├е┬┐тАж├ж┼УтА░├ж╦ЖтАШ├е┬╕╦Ж├д┬╣┼╕)
Sridhar Bhaskarla
Honored Contributor

Re: Under which kinds of circumstance will page out occur?

Hi Al,

How much free memory are you seeing now?.

There are limits imposed by kernel - lotsfree, desfree and minfree. The actual paging will start once the memory falls below lotsfree parameter.

But if you are seeing reasonable free memory, then the pageouts that you are seeing are due to memory mapping activity. Memory mapped files use the same paging mechanism. So whenever a file is mappped to/from the memory, you will see the corresponding activity.

Check with your application folks and see if the application uses memory mapped files. This is an efficient way of accessing the files by multiple processes than by the usual IO routines.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James Murtagh
Honored Contributor
Solution

Re: Under which kinds of circumstance will page out occur?

Hi Albert,

I have quickly ran through the release notes for all the versions of Glance since yours, which was released September 2000 for your information. I focussed on known problems and workarounds but could not see any references to this issue. The current version is C.03.70 so you are a bit behind.

As you now know the reason and can upgrade free of charge I would be tempted down this route. If I have a bit of free time I will write a small mmap program and test using the latest version of Glance.

Regards,

James.
albert_hua
Frequent Advisor

Re: Under which kinds of circumstance will page out occur?

Hi, Sri:
The free memory is reasonable(about 4GB).
So I think memory mapping activity is the real reason. I should learn more about the concept of memory mapping.

Hi, James:
Thanks a lot for your kindly help!


Al.
When going with others together, I can always find my adviser among them. (├д┬╕тА░├д┬║┬║├и┬б┼Т├е┬┐тАж├ж┼УтА░├ж╦ЖтАШ├е┬╕╦Ж├д┬╣┼╕)
Bill Hassell
Honored Contributor

Re: Under which kinds of circumstance will page out occur?

Hust a note about old versions of Glance. It is very important to keep Glance up to date, especially after recent kernel patches are applied. Some of the metrics can be affected by patches, and a good deal of logic is dependent on the revisions of modules inside the kernel. I would always schedule Glance (and Measureware if installed) to be updated anytime kernel patches are added.


Bill Hassell, sysadmin