Find the answer to your Linux question:
Results 1 to 2 of 2
Hello everyone there, I am having this problem with RAM memory not being freed when expected. I am using an ETL tool that is reading massive text files. This ETL ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    1

    Unhappy Running out of RAM memory because IO cached - RHEL 6.4


    Hello everyone there,

    I am having this problem with RAM memory not being freed when expected.

    I am using an ETL tool that is reading massive text files.
    This ETL tool does not manage memory itself, it relies on Unix to do so.

    For some reason, when reading these files, cached memory goes up and it will not go down when ETL process is finished.
    When executing command
    Code:
    free -g
    We can clearly see that all "missing" memory is in cached column.

    Executing the following command:
    Code:
    sudo sync && sudo sysctl w vm.drop_cache=3
    Cached memory is freed just in seconds

    Apparently, there is some way to limit the IO cache, or establish a min and max % IO cache. In my case, I would need this very low (as I will not read again same files, but need as maximum avaliable memory as possible)

    Any ideas guys how can I achieve this?

    Thanks very much in advanced!!

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,746
    The kernel will use all available physical memory. When needed, the kernel will drop any cache/buffer data. Your system does not need the memory for another use, so it leaves the cache in RAM. This is normal/by design - more info about Linux memory management is available via Google.

    I would need this very low
    No you don't. When you open another file, that data is loaded as new cache. Your output in free still shows the same result - a large amount of RAM is being used for cache.

Posting Permissions

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