LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2014, 07:37 AM   #1
arisu
LQ Newbie
 
Registered: Mar 2014
Posts: 3

Rep: Reputation: Disabled
how to force a process to use a specific swap ?


Is there a way to force a process to use a specific swap ?

I have several programs with memory leak. I would like to make sure the memory leak gets swapped into harddisk swap partition instead of filling up precious zram swap.
 
Old 03-19-2014, 07:48 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,502

Rep: Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431
I do not think there is a way to force it. From the other hand those programs will eat up all of the available memory and swap... You would better try to fix it.
 
Old 03-19-2014, 08:20 AM   #3
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 323

Rep: Reputation: 72
how to force a process to use a specific swap ?

look for cgroups and swappiness
 
Old 03-19-2014, 11:21 AM   #4
arisu
LQ Newbie
 
Registered: Mar 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
The leaking processes are xorg, compiz, and gtk-window-decorator. I might search for the real culpit when I have more time. As the system is otherwise good and stable, I just want to limit the impact for now.

I see how cgroups' swappiness setting can be used to turn off swapping completely for a process. But I can't figure out how to force the kernel to use a specific swap when swapping out a specific process.
 
Old 03-19-2014, 11:34 AM   #5
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 323

Rep: Reputation: 72
highest swappiness level (100) force kernel to swap instantly, or almost; for a specific swap area i think you can use priority, but i'm not sure about it
 
Old 03-19-2014, 09:26 PM   #6
arisu
LQ Newbie
 
Registered: Mar 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
One can set swap priority for each swap via swapon -p or in /etc/fstab, but that applies to all processes.

Setting swap partition priority high for leaking processes and low for all other processes would work, but I can't find cgroups setting which changes swap priority for specific group of processes.

Last edited by arisu; 03-19-2014 at 09:29 PM.
 
  


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
How to swap out (to swap area) page frames a process use? entertainyou Linux - Kernel 3 03-23-2011 10:52 PM
How to force specific domain or user specific emails to proces in sendmail 8.13.5 FC5 peanutsa Linux - Newbie 1 03-22-2009 06:33 AM
Force specific refresh for specific resolution miner49er Linux - General 2 03-20-2009 03:36 AM
How can you force a program/process to run on a specific CPU core? icedfusion Linux - Newbie 2 12-31-2008 11:10 AM
Way to force a specific value for system uptime? soliax Linux - Kernel 8 09-10-2008 01:18 AM


All times are GMT -5. The time now is 01:10 PM.

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