how to clean memory storage? - Aix

This is a discussion on how to clean memory storage? - Aix ; I took a test on my AIX 5.3 steps list as below: 1) before testing $ svmon -G free size : 92366 2) create a big file $ cd /u/myap $ find . -print |cpio -ocduvm > /u/myap.cpi ( myap.cpi ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: how to clean memory storage?

  1. how to clean memory storage?

    I took a test on my AIX 5.3
    steps list as below:
    1) before testing
    $ svmon -G
    free size : 92366
    2) create a big file
    $ cd /u/myap
    $ find . -print |cpio -ocduvm > /u/myap.cpi
    ( myap.cpi about 500 MB)
    check size after creating big file
    $ svmon -G
    free size: 1027
    3) rm big file
    $ rm myap.cpi
    $ svmon -G
    free size: 51926

    My question is :
    How can I run a program that will not keep memory after exit?
    It bothered me on my product site , ate my RAM storage,
    made page out and in , degrade DB performance .


  2. Re: how to clean memory storage?

    On Wed, 18 Jul 2007 16:10:27 -0700, roger wrote:

    > I took a test on my AIX 5.3
    > steps list as below:
    > 1) before testing
    > $ svmon -G
    > free size : 92366
    > 2) create a big file
    > $ cd /u/myap
    > $ find . -print |cpio -ocduvm > /u/myap.cpi
    > ( myap.cpi about 500 MB)
    > check size after creating big file
    > $ svmon -G
    > free size: 1027
    > 3) rm big file
    > $ rm myap.cpi
    > $ svmon -G
    > free size: 51926
    >
    > My question is :
    > How can I run a program that will not keep memory after exit? It bothered
    > me on my product site , ate my RAM storage,
    > made page out and in , degrade DB performance .


    That really depends a lot on what you want to do with the file, and more
    importantly, the other files in the file system. You can mount a JFS2
    file system with the DIO or CIO option to turn off file system buffer
    caches, but they have significant side-effects on your program's design
    and performance and how you can use the file system in general... They
    are really designed for file systems holding Oracle or DB2 (or other)
    database files...

    -Chris

  3. Re: how to clean memory storage?

    First the answer to your question:
    Memory allocated by your programm will be released as soon as it
    exited.
    Now the rest: Files which were accessed by your programm may be kept
    in memory for a while. If you really want to avoid caching use sync io
    read and writes in you programm. Setting flag O_SYNC will do the
    trick. But forget about performance :-) Mounting filesystem with dio
    or sio will do the same but for all you programms.
    If you want to get memory back avfter your expirement, do sync,
    allocate non-swappable memory space, e.g. mkramdisk, run something
    which will use all the rest of real memory plus something in swap and
    then exits. and afterwards delete previosly created ram disk. And yes,
    sync at the end :-) I'm sure you will get you memory back :-)

    On 19 , 01:10, ro...@star2000.com.tw wrote:
    > I took a test on my AIX 5.3
    > steps list as below:
    > 1) before testing
    > $ svmon -G
    > free size : 92366
    > 2) create a big file
    > $ cd /u/myap
    > $ find . -print |cpio -ocduvm > /u/myap.cpi
    > ( myap.cpi about 500 MB)
    > check size after creating big file
    > $ svmon -G
    > free size: 1027
    > 3) rm big file
    > $ rm myap.cpi
    > $ svmon -G
    > free size: 51926
    >
    > My question is :
    > How can I run a program that will not keep memory after exit?
    > It bothered me on my product site , ate my RAM storage,
    > made page out and in , degrade DB performance .




+ Reply to Thread