Find the answer to your Linux question:
Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By drl
We have 2 applications running in same server but from different user ids. We don't want one application to impact other application in terms of memory usage. Can the server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2014
    Posts
    4

    Memory partition


    We have 2 applications running in same server but from different user ids. We don't want one application to impact other application in terms of memory usage. Can the server memory be partitioned into two segments and each can be allotted to one user?
    The server is a virtual server.

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    518
    As far as I know, you cannot. The kernel is pretty darn good about handling memory, better than any sysadmins are going to be anyway. You might be able to cap the memory usage of an app by it's process ID, but it seems silly, especially on mission critical server apps.

    Even if you could, what's the point? You'd have one app running out of memory (and maybe crashing, getting NULL from malloc is serious business) while the other is just sitting in idle and not using it's allocated memory, or the over-using app would just get into swap space and slow down, grinding on the hard-drive while there's still a bunch of unused RAM laying around.

    If I wanted to get that finicky with a couple apps, I'd get the source code, analyze it's memory usage/whatever, tweak the code, and compile my own custom version.

    Peace and Cheer.

  3. #3
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,304
    Hi.

    Off the top of my head:

    1) Create 2 virtual machines, each with the memory you wish, then run each application in a separate VM. That's a lot of overhead just to separate applications, but if you already have a VM setup, it's easy to try.

    2) Look at builtin command ulimit. I have not used it for memory, but i recall using it for other resource restrictions.

    For more on ulimit:
    Code:
    bash: help ulimit
    Code:
    ksh: ulimit --man
    Good luck ... cheers, drl
    docbop likes this.
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. $spacer_open
    $spacer_close

Posting Permissions

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