Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

begin puzzled with the page-replacement algorithm

Status
Not open for further replies.

signalsys

Technical User
Sep 5, 2005
44
CN
begin puzzled with the page-replacement algorithm

I release a dd command such as "dd if=/dev/zero of=/fs1/zero.out bs=4m count=1000" and
find in my system that a large number of pages was scanned by lrud,and some of them was freed(sr , fr column):
#vmstat
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
0 12 262007 676960 0 0 0 2349 69185 0 1688 2409 6166 9 10 5 76
5 6 262014 676982 0 0 0 11367 151594 0 1425 3182 1680 3 46 10 40
0 8 262022 676873 0 0 0 7829 147428 0 1177 3280 3441 14 30 11 44
3 5 261722 677205 0 0 0 6354 219630 0 1497 4312 2985 14 28 10 48
2 9 261852 677151 0 0 0 160 1663 0 1432 5439 3250 27 6 10 57
5 3 261893 677044 0 0 0 9886 165066 0 1237 4773 3590 18 40 10 33
4 10 261852 677109 0 0 0 16371 609725 2 1724 3028 6112 1 64 5 30

I have 2 questions about the above output:

1. Note that some pages was freed after paging scanning. I think that these pages must first be paged out to paging space before they were freed and added to the free list,But
why the value of "po" is always 0 ?

2. The "minfree" is set to 120, and the value of "fre" is beyond minfree,I think at time
it is not necessary for VMM to invoke page-replacement algorithm, Right ?

Here is the parameters of vmm on my system:

vmtune: current values:
-p -P -r -R -f -F -N -W
minperm maxperm minpgahead maxpgahead minfree maxfree pd_npages maxrandwrt
20971 52428 2 8 120 128 524288 1

-M -w -k -c -b -B -u -l -d
maxpin npswarn npskill numclust numfsbufs hd_pbuf_cnt lvm_bufcnt lrubucket defps
838852 16384 4096 16 93 112 9 131072 1

-s -n -S -L -g -h
sync_release_ilock nokilluid v_pinshm lgpg_regions lgpg_size strict_maxperm
1 0 0 0 0 1

-t
maxclient
52428

PTA balance threshold percentage = 50.0%

number of valid memory pages = 1048565 maxperm=5.0% of real memory
maximum pinable=80.0% of real memory minperm=2.0% of real memory
number of file memory pages = 52303 numperm=5.0% of real memory

number of compressed memory pages = 0 compressed=0.0% of real memory
number of client memory pages = 0 numclient=0.0% of real memory
# of remote pgs sched-pageout = 0 maxclient=5.0% of real memory
 
If you are not paging, that means that you have not run out of memory. I don't understand why you are worried about this? I don't believe that you need to worry about your memory until you start paging - and paging excessively!
 
Hi,
I am not worried about this, I only want to know :
1. when some pages was freed after paging scanning, that these pages must first be paged out to paging space before they were freed and added to the free list,But why the value of "po" is always 0 ?

2.The "minfree" is set to 120, and the value of "fre" is beyond minfree,I think at time
it is not necessary for VMM to invoke page-replacement algorithm, Right ?

 
Answers....
1. The freed pages are from real memory (RAM) not from paging space.
2. This is due to your maxperm setting and using the dd command to write out a file.


Jim Hirschauer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top