Обсуждение: Free memory usage Sol10, 8.2.9
All,
I'm trying to understand the free memory usage and why it falls below 17G sometimes and what could be causing it. Any pointers would be appreciated.
root@prod1 # prtconf
System Configuration: Sun Microsystems sun4u
Memory size: 32768 Megabytes
System Configuration: Sun Microsystems sun4u
Memory size: 32768 Megabytes
[postgres@prod1 ~]$ vmstat 5 10
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr 1m 1m 1m m1 in sy cs us sy id
0 0 0 51713480 21130304 58 185 325 104 104 0 0 23 3 7 1 488 604 573 1 2 97
0 0 0 51048768 18523456 6 10 0 192 192 0 0 4 0 3 0 527 753 807 2 1 97
0 0 0 51713480 21130304 58 185 325 104 104 0 0 1 23 3 7 488 604 573 1 2 97
0 0 0 51067112 18538472 0 1 0 171 171 0 0 4 8 0 4 522 573 740 2 1 97
0 0 0 51072744 18542992 0 0 0 187 187 0 0 0 22 0 7 532 657 780 2 1 97
0 0 0 51069944 18540736 146 1729 3 174 174 0 0 0 9 0 3 526 3227 944 4 5 91
0 0 0 51065728 18537360 32 33 0 192 192 0 0 0 20 0 3 522 1147 927 3 2 95
0 0 0 51065728 18537336 0 0 0 190 190 0 0 0 26 0 3 517 628 789 2 1 97
0 0 0 51065728 18537336 0 0 0 168 168 0 0 0 25 0 11 517 668 810 2 2 96
0 0 0 51062960 18535152 0 165 2 190 190 0 0 14 29 0 4 552 732 808 2 1 97
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr 1m 1m 1m m1 in sy cs us sy id
0 0 0 51713480 21130304 58 185 325 104 104 0 0 23 3 7 1 488 604 573 1 2 97
0 0 0 51048768 18523456 6 10 0 192 192 0 0 4 0 3 0 527 753 807 2 1 97
0 0 0 51713480 21130304 58 185 325 104 104 0 0 1 23 3 7 488 604 573 1 2 97
0 0 0 51067112 18538472 0 1 0 171 171 0 0 4 8 0 4 522 573 740 2 1 97
0 0 0 51072744 18542992 0 0 0 187 187 0 0 0 22 0 7 532 657 780 2 1 97
0 0 0 51069944 18540736 146 1729 3 174 174 0 0 0 9 0 3 526 3227 944 4 5 91
0 0 0 51065728 18537360 32 33 0 192 192 0 0 0 20 0 3 522 1147 927 3 2 95
0 0 0 51065728 18537336 0 0 0 190 190 0 0 0 26 0 3 517 628 789 2 1 97
0 0 0 51065728 18537336 0 0 0 168 168 0 0 0 25 0 11 517 668 810 2 2 96
0 0 0 51062960 18535152 0 165 2 190 190 0 0 14 29 0 4 552 732 808 2 1 97
prstat -am
NPROC USERNAME SWAP RSS MEMORY TIME CPU
21 postgres 8312M 8300M 25% 112:24:15 2.1%
53 root 347M 236M 0.7% 130:52:02 0.1%
7 daemon 708M 714M 2.2% 21:53:05 0.0%
4 mot 5552K 15M 0.0% 0:00:00 0.0%
1 smmsp 1384K 5480K 0.0% 0:00:59 0.0%
21 postgres 8312M 8300M 25% 112:24:15 2.1%
53 root 347M 236M 0.7% 130:52:02 0.1%
7 daemon 708M 714M 2.2% 21:53:05 0.0%
4 mot 5552K 15M 0.0% 0:00:00 0.0%
1 smmsp 1384K 5480K 0.0% 0:00:59 0.0%
[postgres@prod1]$ ps -eaf | grep postgres | wc -l
24
max_connections = 600
shared_buffers = 8000MB
temp_buffers = 8MB
work_mem = 2MB
maintenance_work_mem = 256MB
max_fsm_pages = 2048000
max_fsm_relations = 2000
effective_cache_size = 4000MB
shared_buffers = 8000MB
temp_buffers = 8MB
work_mem = 2MB
maintenance_work_mem = 256MB
max_fsm_pages = 2048000
max_fsm_relations = 2000
effective_cache_size = 4000MB
Thanks,
Stalin
On 11/03/2009 07:16 PM, Subbiah Stalin-XCGF84 wrote: > All, > > I'm trying to understand the free memory usage and why it falls below > 17G sometimes and what could be causing it. Any pointers would be > appreciated. > > root@prod1 # prtconf > System Configuration: Sun Microsystems sun4u > Memory size: 32768 Megabytes > > [postgres@prod1 ~]$ vmstat 5 10 > kthr memory page disk faults > cpu > r b w swap free re mf pi po fr de sr 1m 1m 1m m1 in sy cs us > sy id > 0 0 0 51713480 21130304 58 185 325 104 104 0 0 23 3 7 1 488 604 573 1 > 2 97 > 0 0 0 51048768 18523456 6 10 0 192 192 0 0 4 0 3 0 527 753 807 2 > 1 97 Memory used by the OS for caching files is no longer free. Free memory is wasted memory. -J
Jeremy Harris wrote: > On 11/03/2009 07:16 PM, Subbiah Stalin-XCGF84 wrote: >> All, >> >> I'm trying to understand the free memory usage and why it falls below >> 17G sometimes and what could be causing it. Any pointers would be >> appreciated. >> >> root@prod1 # prtconf >> System Configuration: Sun Microsystems sun4u >> Memory size: 32768 Megabytes >> >> [postgres@prod1 ~]$ vmstat 5 10 >> kthr memory page disk faults >> cpu >> r b w swap free re mf pi po fr de sr 1m 1m 1m m1 in sy cs us >> sy id >> 0 0 0 51713480 21130304 58 185 325 104 104 0 0 23 3 7 1 488 604 573 1 >> 2 97 >> 0 0 0 51048768 18523456 6 10 0 192 192 0 0 4 0 3 0 527 753 807 2 >> 1 97 > > Memory used by the OS for caching files is no longer free. > Free memory is wasted memory. To finish the thought: memory used by OS for caching files will be automatically given to applications that need more memory so it is "kind of" free memory. In your case, you really do have 17-18G unused memory which is practically wasted.