Strange memory behavior


 
Thread Tools Search this Thread
Operating Systems AIX Strange memory behavior
# 1  
Old 10-26-2012
Strange memory behavior

Hello together,

i have a strange memory behavior on a AIX 7.1 System, which i cannot explain.
The Filesystem-Cache will not be grow up and drops often after few minutes. I know if a file was deleted, that the same segment in the FS-Cache will also be cleared. But i am not sure if this is the correct explanation for "my" behavior.

In one test i read a file (dd if=<some file> of=/dev/null) and after the dd finished the fs-cache (file pages) immediately droped out of the memory, but i couldn't reproduce this test.

Does anyone have an idea?
Thanks

P.S.
- tunables like vmo or schedo was not changed
- the System has a lot of nfs V3 exports

Code:
# vmstat -v
              6553600 memory pages
              6274304 lruable pages
              3778457 free pages
                    2 memory pools
              1204754 pinned pages
                 90.0 maxpin percentage
                  3.0 minperm percentage
                 90.0 maxperm percentage
                  5.4 numperm percentage
               342616 file pages
                  0.0 compressed percentage
                    0 compressed pages
                  5.4 numclient percentage
                 90.0 maxclient percentage
               342558 client pages
                    0 remote pageouts scheduled
                34333 pending disk I/Os blocked with no pbuf
                    0 paging space I/Os blocked with no psbuf
                 2228 filesystem I/Os blocked with no fsbuf
                73667 client filesystem I/Os blocked with no fsbuf
               284352 external pager filesystem I/Os blocked with no fsbuf
                 37.1 percentage of memory used for computational pages

Code:
#lparstat -i
Type                                       : Shared-SMT-4
Mode                                       : Uncapped
Entitled Capacity                          : 2.00
Partition Group-ID                         : 32820
Shared Pool ID                             : 3
Online Virtual CPUs                        : 4
Maximum Virtual CPUs                       : 8
Minimum Virtual CPUs                       : 1
Online Memory                              : 25600 MB
Maximum Memory                             : 61440 MB
Minimum Memory                             : 2048 MB
Variable Capacity Weight                   : 4
Minimum Capacity                           : 0.10
Maximum Capacity                           : 4.00
Capacity Increment                         : 0.01
Maximum Physical CPUs in system            : 64
Active Physical CPUs in system             : 32
Active CPUs in Pool                        : 12
Shared Physical CPUs in system             : 12
Maximum Capacity of Pool                   : 3200
Entitled Capacity of Pool                  : 420
Unallocated Capacity                       : 0.00
Physical CPU Percentage                    : 50.00%
Unallocated Weight                         : 0
Memory Mode                                : Dedicated
Total I/O Memory Entitlement               : -
Variable Memory Capacity Weight            : -
Memory Pool ID                             : -
Physical Memory in the Pool                : -
Hypervisor Page Size                       : -
Unallocated Variable Memory Capacity Weight: -
Unallocated I/O Memory entitlement         : -
Memory Group ID of LPAR                    : -
Desired Virtual CPUs                       : 4
Desired Memory                             : 25600 MB
Desired Variable Capacity Weight           : 4
Desired Capacity                           : 2.00
Target Memory Expansion Factor             : -
Target Memory Expansion Size               : -
Power Saving Mode                          : Disabled

Strange memory behavior-memoryjpg

Last edited by -=XrAy=-; 10-26-2012 at 11:18 AM..
# 2  
Old 10-26-2012
Tuning the AIX file caches - Wikistix

Maybe it ignores pages from closed files, which might support a reopened file.
# 3  
Old 10-28-2012
Very interesting. Alas, i have no immediate answer, only some observations:

Code:
                34333 pending disk I/Os blocked with no pbuf
                    0 paging space I/Os blocked with no psbuf
                 2228 filesystem I/Os blocked with no fsbuf
                73667 client filesystem I/Os blocked with no fsbuf
               284352 external pager filesystem I/Os blocked with no fsbuf

these numbers look relatively high. If they remain constant the problem was probably somewhere in the past as the numbers are collected since reboot. You might want to watch them closely, though: if you notice a sharp increase chances are your system is I/O-bound somehow.

Code:
              1204754 pinned pages

This is roughly 1GB memory pinned. Do you have a database running on the system? The Oracle SGA, for instance, is mostly pinned memory. "pinned" means "not to be swapped out in case swapping is necessary".
# 4  
Old 10-29-2012
Thank you for your reply.

@DGPickett
Code:
Maybe it ignores pages from closed files, which might support a reopened file.

Is there a way to check this? Something like filemon?

@bakunin
I allready begun to tune the System but our Storage isn't the fastes. Smilie
Code:
ioo -p -o j2_dynamicBufferPreallocation=256
ioo -p -o numfsbufs=4096
lvmo -v <VG> -o pv_pbuf_count=2048

Code:
              1204754 pinned pages

There is no Database or something like this but AFAIK with AIX 7.1 the Kernel is pinned.
# 5  
Old 10-29-2012
Quote:
Originally Posted by -=XrAy=-
There is no Database or something like this but AFAIK with AIX 7.1 the Kernel is pinned.
According to AIX 7.1 Differences Guide the memory is not pinned but locked (see "5.9 Kernel memory pinning", p199). It might be that this "not-pinned-but-locked" kernel memory is counted as pinned for the purposes of "vmstat", so you are probably right.

I hope this helps.

bakunin
# 6  
Old 10-30-2012
Used to call it wired. In MULTICS, temp files could be created with no backing store, so they were de facto wired. You could bring a sysem to its knees with too much, but it was great for stress testing the apps.

Closed files with not buf sounds like pipes and sockets in a would-block state, possibly with a blocked thread but perhaps just not firing bits into select() or poll(). If they are accumulating, there may be something undermining keepalive for detecting broken connections, or some privileged app leaving sockets open. lsof can tell you about all open fd.
# 7  
Old 11-02-2012
UPDATE

I found the following article:

https://www.ibm.com/developerworks/w...ype/AIXJ2inode

Code:
Ralf Schmidt-Dannert comments that the defaults for the j2_inodeCacheSize and
j2_metadataCacheSize parameters in AIX V7.1 have been changed to 200. 
An implication is that setting both parameters to 200 is likely to prove satisfactory
on most AIX V5.3 and V6.1 LPARs.

I changed them back to the default 400 and after this I increase them to 500.
Now the whole memory is used. I am not sure what's going on exactly.
This system has a lot of filesystems with a lot of small files (cobol sources, etc.).
Maybe the insufficent Inode-cache prevent the System to use the whole FS-cache?

Last edited by -=XrAy=-; 11-02-2012 at 05:29 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strange Ctrl+C behavior

Hello All, I have a strange issue. I've created a shell script which connects to RMAN (Oracle Recovery Manager) and executes full DB backup. I then executed this script with nohup and in the background: $ nohup my_script.sh > logfile.log 2>&1 &The issue is that when I tried to take a look into... (6 Replies)
Discussion started by: JackK
6 Replies

2. AIX

Strange behavior with tar

I am trying to create an archive using tar. I am specifying a list of directories using the -L option. For testing purposes I created a simple directory structure: /backup/test /backup/test/test1 /backup/test/test2 The file specified by the -L option, named files.txt, contains:... (8 Replies)
Discussion started by: judykstra
8 Replies

3. Ubuntu

Ubuntu strange behavior

It is so till login screen. I mean that when I boot my computer, Ubuntu shows a splash screen with mouse instead of Ubuntu logo and in the login screen it shows XUbuntu login screen... It began when I upgraded to previous kernel, I suppose, but I'm not sure... I can't say that it annoys me very... (6 Replies)
Discussion started by: Sapfeer
6 Replies

4. Programming

Strange behavior in C++

I have the following program: int main(int argc, char** argv){ unsigned long int mean=0; for(int i=1;i<10;i++){ mean+=poisson(12); cout<<mean<<endl; } cout<<"Sum of poisson: "<< mean; return 0; } when I run it, I get the... (4 Replies)
Discussion started by: santiagorf
4 Replies

5. Shell Programming and Scripting

nawk strange behavior

Dear guys; when deleting repeated lines using nawk as below ; Why the below syntax works? nawk ' !a++' infile > outfile and when using the other below syntax the nawk doesn't work? nawk ' { !a++ } ' infile > outfile or nawk ' { !a++ } ' infile > outfile BR (4 Replies)
Discussion started by: ahmad.diab
4 Replies

6. Shell Programming and Scripting

Very Strange Behavior for redirection

I have searched far and wide for an explanation for some odd behavior for output redirection and haven't come up with anything. A co-worker was working on old scripts which have run for years and embedded in their code were output redirects which worked for the script during execution and then... (5 Replies)
Discussion started by: cahook
5 Replies

7. AIX

Strange Real Memory usage behavior

We have 2 Rs6000 S-85 Each initially had/have 6 processors and 8 GIG of RAM each Node 1 we added 14 processors and 32 GIG of RAM On May 19. (11 days ago) My memory utilization reporting for node 1 showed a spike in available memory 25-30GB for May 19 to 25 . I kind of expected this because I... (5 Replies)
Discussion started by: Skyybugg
5 Replies

8. UNIX for Dummies Questions & Answers

Strange Behavior on COM2

Hi, I have a problem with a new touch screen controller that I am trying to use on a SCO 3.0 system. THe touch screen controller only wants to talk at 9600baud. I have updated /etc/inittab per the manual and also edited /usr/lib/event/devices to use 9600 baud. The only way I can get the... (0 Replies)
Discussion started by: Elwood51
0 Replies

9. UNIX for Dummies Questions & Answers

strange sed behavior

I have a file called products.kp which contains, for example, 12345678,1^M 87654321,2^M 13579123,3 when I run the command cat products.kp| sed -f kp.sed where kp.sed contains s,^M,, I get the output 12345678,1 87654321,2 13579123,3 (5 Replies)
Discussion started by: Kevin Pryke
5 Replies
Login or Register to Ask a Question