LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2017, 09:19 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 484

Rep: Reputation: 31
Question Setting swappiness for a single process


Anyone have step by step on how to setup and control swappiness on a single process.

I've seen some google articles talking about cgroups but since I don't even have cgroups setup...

A doc with a start to finish would be nice, if one exists. Any one know if such a doc exists out there?
 
Old 03-02-2017, 01:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,641

Rep: Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760Reputation: 4760
probably I misunderstood, but for me it looks like it has no any meaning. swap is used to move some parts of memory out of RAM to be able to use it for "more important" processes. So if your process is not running (=waiting for something or similar) it can be swapped out, and will be automatically copied back to memory if required.
there is a renice command to rule the "importance" of a process.
https://help.marklogic.com/Knowledge...nux-swappiness
 
Old 03-02-2017, 01:40 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180
"Swappiness" is a global setting which influences the system's propensity to swap. It ranges from "avoid swapping at all costs" to "aggressively swap." It is not a per-process parameter.
 
Old 03-02-2017, 02:19 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654
Could you use LXC to run a single process and set the swappiness in the container to affect only that process? Or docker, whatever.
 
Old 03-02-2017, 05:17 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,960

Rep: Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130Reputation: 3130
It may be possible to write the program to set how it uses swap too.
 
Old 03-03-2017, 01:55 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,569
Blog Entries: 9

Rep: Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069Reputation: 4069
i think op needs to explain all this much better:
Quote:
Originally Posted by MikeyCarter View Post
I've seen some google articles talking about cgroups
and what they think they're going to achieve with it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitoring a single process manoj.linux Linux - Enterprise 1 07-01-2009 12:26 AM
Suspending a single process to disk Ranny Linux - Server 3 02-04-2009 05:32 PM
getting the cpu usage of a single process kits123 Linux - Newbie 2 07-25-2007 10:50 PM
How to throttle a single process? Dria Linux - Software 3 03-02-2007 07:48 PM
kill process in a single command vbseeker Linux - General 4 09-16-2006 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration