PGSP value in svmon command on AIX 5.3

I am facing an issue with memory management in AIX 5.3. My Process crashes with malloc/calloc failure. But it is allocating and freeing all the memory when required. I have run svmon command for several times and found that pgsp value is growing continuosly. here is the output for two times taken after six hours:


 Pid Command      Inuse      Pin     Pgsp  Virtual 64-bit Mthrd  16MB

1451 pemnl 17288 9235 27553 51373 N N N

Vsid      Esid   Type Description              PSize  Inuse   Pin   Pgsp  Virtual
   0         0     work kernel segment               s   9578   9232 3941  13455 

7709d d work shared library text s 3857 0 130 10935
11490 2 work process private s 3526 3 23468 26942
49ce6 - clnt /dev/ptv3:950 s 151 0 - -
215ac 1 clnt code,/dev/ptv3:654 s 143 0 - -
4483b f work shared library data s 32 0 14 41
2d56f - clnt /dev/ptv3:667 s 1 0 - -


 Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit Mthrd  16MB

1451 pemnl 13176 9235 32062 52594 N N N

Vsid      Esid  Type Description                  PSize  Inuse   Pin      Pgsp  Virtual
   0         0     work kernel segment                s   9501  9232    3999  13443 

7709d d work shared library text s 2890 0 131 10935
11490 2 work process private s 315 3 27918 28175
25d1d - clnt /dev/ptv3:956 s 276 0 - -
215ac 1 clnt code,/dev/ptv3:654 s 161 0 - -
4483b f work shared library data s 32 0 14 41
2d56f - clnt /dev/ptv3reg1lv:77667 s 1 0 - -

here pgsp and virtual memory values are increasing. My questions are:
1) Does it concludes to a memory leak?
2) If yes, then how can it be solved?

Thanks,
Sebby

Hi,

could you kindly post output of vmstat -I 3 3 and vmo -a

Thanks and regards
zxmaus

Hi,
Thanks a lot for replying. Here I am sending you the output of vmo -a and vmstat -I 3 3:

1) vmstat -I 3 3

bash-3.00# vmstat -I 3 3
System configuration: lcpu=4 mem=1024MB ent=0.50
kthr memory page faults cpu
-------- ----------- ------------------------ ------------ -----------------------
r b p avm fre fi fo pi po fr sr in sy cs us sy id wa pc ec
1 0 0 406397 8014 0 4 0 0 0 0 20 3030 269 4 3 93 0 0.05 9.0
1 0 0 406357 8054 0 4 0 0 0 0 11 2212 251 1 2 97 0 0.02 4.8
1 0 0 406356 8052 0 6 0 0 0 0 12 2083 251 1 2 97 0 0.02 4.4

2)vmo -a

bash-3.00# vmo -a
cpu_scale_memp = 8
data_stagger_interval = 161
defps = 1
force_relalias_lite = 0
framesets = 2
htabscale = n/a
kernel_heap_psize = 4096
kernel_psize = 4096
large_page_heap_size = 0
lgpg_regions = 0
lgpg_size = 0
low_ps_handling = 1
lru_file_repage = 1
lru_poll_interval = 10
lrubucket = 131072
maxclient% = 80
maxfree = 1088
maxperm = 195658
maxperm% = 80
maxpin = 211915
maxpin% = 80
mbuf_heap_psize = 65536
memory_affinity = 1
memory_frames = 262144
memplace_data = 2
memplace_mapped_file = 2
memplace_shm_anonymous = 2
memplace_shm_named = 2
memplace_stack = 2
memplace_text = 2
memplace_unmapped_file = 2
mempools = 2
minfree = 960
minperm = 48914
minperm% = 20
nokilluid = 0
npskill = 4608
npsrpgmax = 36864
npsrpgmin = 27648
npsscrubmax = 36864
npsscrubmin = 27648
npswarn = 18432
num_spec_dataseg = 0
numpsblks = 589824
page_steal_method = 0
pagecoloring = n/a
pinnable_frames = 163192
pta_balance_threshold = n/a
relalias_percentage = 0
rpgclean = 0
rpgcontrol = 2
scrub = 0
scrubclean = 0
soft_min_lgpgs_vmpool = 0
spec_dataseg_int = 512
strict_maxclient = 1
strict_maxperm = 0
v_pinshm = 0
vm_modlist_threshold = -1
vmm_fork_policy = 1
vmm_mpsize_support = 1

Please let me know if this seems to be an issue with virtual memory. I think I need to increase virtual memory for my system.

Hi,

you have an issue with real memory ... you are using 60% more computational than you have physically in the system - so obviously your system is paging a lot - and you do allow your system even to page computational memory - this slows down your system and is causing your memory warnings. If you don't rapidly add memory, your system will crash once the pagingspace is full - and this won't take too long ...

You have physically 1 GB in your box ...
you are using for computational reasons 406397 x 4k pages = 1.6 GB and you are allowing the paging of computational pages: lru_file_repage = 1 so your system is doing exactly what it is supposed to do - whenever a new process is forked, the amount of pagingspace in use will grow - and the AIX kernel will use more memory over time since he is growing continuously - even when that is not much.

Recommendation is to add memory until your avm value is around 70% of your physical memory (so about 1.5 GB memory).

As a rule of thumb - AIX and background processes like you have them hopefully on your box (nmon, monitoring, whatever) are eating up usually between 500 and 1500 MB memory - everything above this is memory for the applications - in your case there is nothing above ...

Just for my curiosity - are you running websphere or mq on this box ?

Rgds
zxmaus

zxmaus,

Thanks again for your instant reply to my problem. As per your note my system is certainly running out of memory and I need to add more memory to it. Could you please help me to know that why does it crashes only this process "pemnl" and not any other. I do not see the paging space growing for any other process. :confused: And all other processes doesnot crash but only this one crashes in gap of 2-3 days.

I have no websphere or mq running on my system.

Rgds,
Sebby

Sebby,
when you are that much out of memory, and the paging space is running dangerously low, the system will kill automatically processes that consume memory - depending on the amount of memory missing it seems to try to kill the processes using the most memory (at least I assume that is the reason why its always the same process on your box - not too sure in this point) ... low_ps_handling = 1 is allowing the system to do so. If this value would not have been set, your system would have already crashed/rebooted itself to free up the paging area.

Kind regards
zxmaus

Okay... I got my answer:) Thank you for your generous help zxmaus.