Find the answer to your Linux question:
Results 1 to 5 of 5
I am trying to replicate a series of tests that involve processing large input files into an application program (Essbase) under different conditions. To avoid having inconsistent results from having ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    3

    Performance Testing - clear files mapped into memory


    I am trying to replicate a series of tests that involve processing large input files into an application program (Essbase) under different conditions.

    To avoid having inconsistent results from having disk based files remaining in memory from the previous test and to assure that all runs are burdened with the same read from disk requirements i am using the Windows sysInternals program RamMap to clear disk file pages from ram between runs.

    What would the equivalent command be for unix?

    I hope I have explained this properly - I am not speaking of explicitly mapped to ramdisk files but files that (In Windows and from what i remember from unix III many years ago) are files left in mapped memory locations in case needed again or until that space is needed.

    Thank you.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Yes, Linux will cache (not map) recently read files into memory, but if the file is changed on disc, then the cache will become invalidated, so the next read will pull the actual data from disc. IE, you are worrying about nothing. This may be a problem with Windows, but Linux is not so encumbered.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,390
    I believe, the input file(s) are not changed in dpressmīs usecase. So disk cache would influence the tests.

    The disk cache can be cleared with
    Code:
    sync; echo 3 > /proc/sys/vm/drop_caches
    See here
    http://www.kernel.org/doc/Documentation/sysctl/vm.txt
    You must always face the curtain with a bow.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Quote Originally Posted by Irithori View Post
    I believe, the input file(s) are not changed in dpressmīs usecase. So disk cache would influence the tests.

    The disk cache can be cleared with
    Code:
    sync; echo 3 > /proc/sys/vm/drop_caches
    See here
    http://www.kernel.org/doc/Documentation/sysctl/vm.txt
    Good point Irithori. I read the post too quickly to realize that he was using the same input file for multiply tests. I was assuming he was using the same file name, but different contents of that file. If the file contents (or update timestamp) didn't change, then your point is correct.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Feb 2013
    Posts
    3

    Thank you both Gentlemen

    Rubberman - thanks for your original reply and for confirming Irithori's "more nuanced" reply.

    Yes that is myt use case each test re-reads the file. i often find that people do not realize that all modern op systems do this and wonder why they can get such differing results from seemingly equivalent runs.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •