Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! bababobo's Avatar
    Join Date
    May 2008
    Bangkok, Thailand

    How much memory usable to add a new process before paging starts?

    I want to add 1 more large process to my production linux server.

    Using command like vmstat, free, etc can show RAM used respectively by user apps and by file cache.

    My question is: how do I calculate the RAM amount my new process can take before existing executables trigger paging?

    I have 1 technique: run a small test program which allocates more and more memory (and often update the pages to ensure those pages are not paged out) and see how the system behaves.

    Any other idea?

    - bababobo

  2. #2
    it depends on amount of RAM you have....
    it depends on which Linux kernel you are using and how it is configured specially user space and kernel space.
    usually Linux kernel does not provide performance linearly proportional to the size of RAM.
    even if you have big RAM, the performance may not be satisfactory due to kernel space issues.

    coming to your part, I would say : Linux would behave as you insert the new process and if RAM is not enough definitely paging will happen...
    it does not matter whether you allocate test memory memory through test program or your new program.

    I am not sure but may be you can try how much memory will be required for your process, specially if there are lots of dynamic memory then its difficult but still static memory you can count...

    and see the amount of RAM available to you.....I do not mean increasing the RAM will help but still to some extent it helps a lot.

    I think there should be some utility which would tell you the amount of free RAM available currently based on that you may take decision to introduce a new process which involves space of both user space and kernel data structures.

Posting Permissions

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