AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Clear the page cache

    Posted Tue December 22, 2009 05:02 AM

    Originally posted by: Chris.Lewis


    Hi,

    We have recently started to develop our application on AIX, before each regression test is run we need to clear the page cache so that performance is consistent. On Redhat/CentOS there is the following command: To free pagecache, dentries and inodes:

    echo 3 > /proc/sys/vm/drop_caches

    However I cant find an equivalent command for AIX. We have been using tail -f /dev/zero to run a huge process until the memory has been flushed which isn't very reliable and slow. Anyone know of a different way to do this?


  • 2.  Re: Clear the page cache

    Posted Tue December 22, 2009 05:38 AM

    Originally posted by: Kosala


    This is a good example many people have the same need...

    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14326736&tstart=0#14326736

    This one is not that old... have a look.

    Cheers,
    Kosala


  • 3.  Re: Clear the page cache

    Posted Tue December 22, 2009 05:47 AM

    Originally posted by: Chris.Lewis


    Hi,

    Thanks for that info I have had a look and they are good suggestions but mounting and unmount file systems wont be an efficient solution during day-to-day testing and using direct IO wont help as we do need to see the performance benefits of page caching but need to make sure the cache is clear before each one starts!


  • 4.  Re: Clear the page cache

    Posted Sun January 03, 2010 12:55 PM

    Originally posted by: nagger


    Your only safe bet is to reboot.
    On a modern fast machine and a LPAR this is only going to take a few minutes - just long enough for a good cup of tea.
    Then you know exactly where you stand.

    You could use command rmss to effectively reduce and return the memory but you are never going to be sure that the caches are in exactly the same state for every test run. You can also get into problems if you reduce the memory too far with rmss.

    Sorry but there is no AIX command to do ditch the cache, Nigel