Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17
Originally Posted by Mauwges But this would increase swapping. From my experience - when the machine once starts swapping it's not reachable anymore - because its full-loaded with swapping. Am ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    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,459

    Quote Originally Posted by Mauwges View Post
    But this would increase swapping. From my experience - when the machine once starts swapping it's not reachable anymore - because its full-loaded with swapping.
    Am I wrong?
    Swapping will swamp the system with i/o requests. One solution is to keep a terminal window open with a really low priority number (low == high in this case) - nice is the command to do that. From the command line: nice -10 /bin/bash
    That will (usually) give you enough priority to kill off rogue processes. Default priority is 20 (nice == 0). Doing this will set your priority to 9, which will pre-empt the rogue processes so you can kill them.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  2. #12
    Just Joined!
    Join Date
    Jan 2013
    Posts
    8
    Quote Originally Posted by Rubberman View Post
    Swapping will swamp the system with i/o requests. One solution is to keep a terminal window open with a really low priority number (low == high in this case) - nice is the command to do that. From the command line: nice -10 /bin/bash
    That will (usually) give you enough priority to kill off rogue processes. Default priority is 20 (nice == 0). Doing this will set your priority to 9, which will pre-empt the rogue processes so you can kill them.
    Hi,
    thanks for this constructive post.
    I'm quite unsure how to keep a remote terminal. We usually use VNC or SSH for connection on the workstations. And the client machines are laptops - so I cant keep a connection.
    Would it be possible to set a complete VNC-server (including its components) to low prio to ensure it stays reachable even in case of extensive swapping due to oom?

    Or do you see any other solution(s) ?

    br,
    Markus

  3. #13
    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,459
    Quote Originally Posted by Mauwges View Post
    Hi,
    thanks for this constructive post.
    I'm quite unsure how to keep a remote terminal. We usually use VNC or SSH for connection on the workstations. And the client machines are laptops - so I cant keep a connection.
    Would it be possible to set a complete VNC-server (including its components) to low prio to ensure it stays reachable even in case of extensive swapping due to oom?

    Or do you see any other solution(s) ?

    br,
    Markus
    Yes, you can change the priority of the VNC server and associated applications, such as a terminal/console window, using the renice command. See the man page for renice for more details. It allows you to set the priority/niceness of a running process by PID.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #14
    Just Joined!
    Join Date
    Jan 2013
    Posts
    8
    Quote Originally Posted by Rubberman View Post
    Yes, you can change the priority of the VNC server and associated applications, such as a terminal/console window, using the renice command. See the man page for renice for more details. It allows you to set the priority/niceness of a running process by PID.
    Hm - Sound good.
    I'll have a trail on this.

    What do you think about preventing swapping at all?
    In general memory is not a problem - the machines have 384GB RAM. But sometime some tools get crazy. I just want to cover this special case.

    br
    Markus

  5. #15
    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,459
    Quote Originally Posted by Mauwges View Post
    Hm - Sound good.
    I'll have a trail on this.

    What do you think about preventing swapping at all?
    In general memory is not a problem - the machines have 384GB RAM. But sometime some tools get crazy. I just want to cover this special case.

    br
    Markus
    You can limit the amount of RAM (heap) that any application run by specific users can consume. This is a shell (bash) command - ulimit. The relevant argument is "-d maximum-data-segment-size"
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #16
    Just Joined!
    Join Date
    Jan 2013
    Posts
    8
    Quote Originally Posted by Rubberman View Post
    You can limit the amount of RAM (heap) that any application run by specific users can consume. This is a shell (bash) command - ulimit. The relevant argument is "-d maximum-data-segment-size"
    Hi,

    very thanks for you engagement.
    I know ulimit. But - as you say - it's a user limit. I would like something like a global ulimit (hm - I have another scenario where ulimit would not work)
    For example:
    There might me a situation where a user runs a tool which consumes about 200G-250G of memory - and this is fine.
    If a second user starts a tool which consumes also 200G - this might kill the machine. My wish would be that this second process is killed.

    br
    Markus

  7. #17
    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,459
    You can set ulimit in the appropriate /etc/*rc files (depending upon the shell people run, such as bash, csh, etc), but for what you want, you REALLY need to disable the swap space, and with 384GB of RAM, swap is really not needed. That way, when an application causes the system to hit the limit of the OS in RAM, it will be killed as you want. Just comment out the swap entry in /etc/fstab and reboot, or edit /etc/fstab and then execute the swapoff command if you cannot just reboot the system (running server).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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